aboutsummaryrefslogtreecommitdiffstats
path: root/deskutils/gcal/Makefile
blob: 5218b34faaba42b0a8477fabe86947523a0d77ed (plain) (blame)
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
# New ports collection makefile for:    gcal
# Date created:             12 October 2000
# Whom:                 Cyrille Lefevre <clefevre@citeweb.net>
#
# $FreeBSD$
#

PORTNAME=       gcal
PORTVERSION=        3.6.2
CATEGORIES=     deskutils
MASTER_SITES=       ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= ${PORTNAME}

MAINTAINER= johans@FreeBSD.org
COMMENT=    The GNU Gregorian calendar program

USE_XZ=     yes
USES=       gettext
GNU_CONFIGURE=  yes
CONFIGURE_ENV=  MAKEINFO="makeinfo --no-split"

INFO=       gcal
#MAN1=      gcal.1 gcal2txt.1 tcal.1 txt2gcal.1

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MNLS}
USES=       gettext
PLIST_SUB+= NLS=""
.else
CONFIGURE_ARGS+=--disable-nls
PLIST_SUB+= NLS="@comment "
.endif

GCAL_SCRIPTS=   daily/daily ddiff/ddiff ddiff/ddiffdrv dst/dst gcalltx/gcalltx \
        gcalltx/gcalltxp moon/moon mrms/mrms srss/srss wloc/wlocdrv

post-patch:
.for p in ${GCAL_SCRIPTS}
    @${REINPLACE_CMD} -e '/^ThisGcal=/s:=.*:=${PREFIX}/bin/gcal:' \
        -e '/^packagedatamiscdir=/s:=.*:=${DATADIR}/misc/${p:H}:' \
        ${WRKSRC}/misc/${p}.in
.endfor

post-install:
    @${TAR} -cf - -C ${WRKSRC} --exclude '*.in' --exclude '*.in.bak' \
        --exclude '*.alias' misc | ${TAR} -xpf - -C ${DATADIR}
.for p in ${GCAL_SCRIPTS}
    @${CHMOD} +x ${DATADIR}/misc/${p}
    @${LN} -s ${DATADIR}/misc/${p} ${PREFIX}/bin/gcal-${p:T}
.endfor

.include <bsd.port.mk>