summaryrefslogtreecommitdiffstats
path: root/misc/pdmenu/Makefile
blob: e7a21ef2e7b8615ef5a5a6e0a08bf88048026134 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# New ports collection makefile for:	pdmenu
# Date created:		14 December 1998
# Whom:			Neil Blakey-Milner <nbm@rucus.ru.ac.za>
#
# $FreeBSD$

PORTNAME=	pdmenu
PORTVERSION=	1.3.2
CATEGORIES=	misc
MASTER_SITES=	DEBIAN
DISTNAME=	${PORTNAME}_${PORTVERSION}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	A simple console menu program

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/doc/COPYING

LIB_DEPENDS=	slang.2:${PORTSDIR}/devel/libslang2

WRKSRC=		${WRKDIR}/${PORTNAME}

USE_GETTEXT=	yes
USE_GMAKE=	yes
GNU_CONFIGURE=	yes
CONFIGURE_ENV=	SLANG_H_LOC="${LOCALBASE}/include/slang.h" \
		SLANG_LIB_LOC="${LOCALBASE}/lib" \
		LIBS="-lcurses -lintl"
CFLAGS+=	-I${LOCALBASE}/include -L${LOCALBASE}/lib
MAKE_JOBS_SAFE=	yes

MAN1=		pdmenu.1
MAN5=		pdmenurc.5
PLIST_FILES=	bin/pdmenu \
		etc/pdmenurc \
		share/locale/da/LC_MESSAGES/pdmenu.mo \
		share/locale/es/LC_MESSAGES/pdmenu.mo \
		share/locale/fr/LC_MESSAGES/pdmenu.mo \
		share/locale/ru/LC_MESSAGES/pdmenu.mo \
		%%DATADIR%%/editdir.pl \
		%%DATADIR%%/showdir.pl
PLIST_DIRS=	%%DATADIR%%

post-patch:
	@${REINPLACE_CMD} -e \
		'/^LANGS/s|=.*$$|= da es fr ru|g' ${WRKSRC}/Makefile

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/pdmenu ${PREFIX}/bin
	${INSTALL_DATA} ${WRKSRC}/examples/pdmenurc ${PREFIX}/etc
	${INSTALL_MAN} ${WRKSRC}/doc/pdmenu.man ${MANPREFIX}/man/man1/pdmenu.1
	${INSTALL_MAN} ${WRKSRC}/doc/pdmenurc.man ${MAN5PREFIX}/man/man5/pdmenurc.5
	@${MKDIR} ${DATADIR}
	${INSTALL_DATA} ${WRKSRC}/examples/*.pl ${DATADIR}
.for lang in da es fr ru
	@${MKDIR} ${PREFIX}/share/locale/${lang}/LC_MESSAGES
	${INSTALL_DATA} ${WRKSRC}/po/${lang}.mo \
		${PREFIX}/share/locale/${lang}/LC_MESSAGES/pdmenu.mo
.endfor

post-install:
	@${STRIP_CMD} ${PREFIX}/bin/pdmenu

.include <bsd.port.mk>
OpenPOWER on IntegriCloud