summaryrefslogtreecommitdiffstats
path: root/comms/hylafax/Makefile
blob: b8da1539dd3d132872ce6216661e6c139006be2a (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# ports collection makefile for:	hylafax
# Date created:		16 May 1995
# Whom:			Julian Stacey <jhs@freebsd.org>
#
# $FreeBSD$
#

PORTNAME=	hylafax
PORTVERSION=	4.1.8
CATEGORIES=	comms
MASTER_SITES=	ftp://ftp.hylafax.org/source/

MAINTAINER=	tdv94ped@cs.umu.se
COMMENT=	Fax software

BUILD_DEPENDS=	${LOCALBASE}/lib/afm/Courier:${PORTSDIR}/print/afm

# no dependency on ghostscript because we don't know which
# version the user prefers
LIB_DEPENDS=	tiff.4:${PORTSDIR}/graphics/tiff \
		jpeg.9:${PORTSDIR}/graphics/jpeg

DIST_SUBDIR=	hylafax

CONFIGURE_ARGS=	--with-INSTALL="" \
		--with-LIBTIFF="-L${LOCALBASE}/lib -ltiff -ljpeg" \
		--with-ZLIB=no --with-LIBZ=-lz --with-ZLIBINC=none \
		--with-TIFFINC="${LOCALBASE}/include" \
		--with-GCOPTS=" " --with-GCXXOPTS=" " \
		--with-REGEX=no --with-LIBREGEX='' --with-REGEXINC=none \
		--with-DIR_HTML="${DOCSDIR}"

# Defaults to "North American Letter".  Use "ISO A4" for A4.
.ifdef PAGESIZE
CONFIGURE_ARGS+=--with-PAGESIZE="${PAGESIZE}"
.endif

.if defined(PACKAGE_BUILDING) || defined(BATCH)
CONFIGURE_ARGS+=--nointeractive
.endif

MAKE_ARGS+=	OPTIMIZER="" -EOPTIMIZER
HAS_CONFIGURE=	yes
CONFIGURE_ENV=	ENVOPTS="${CFLAGS}"
USE_REINPLACE=	yes

MAN1=	hylafax-client.1 faxalter.1 faxcover.1 faxmail.1 \
	faxrm.1 faxstat.1 sendfax.1 \
	sendpage.1 sgi2fax.1 textfmt.1 edit-faxcover.1
MAN5=	pagesizes.5f typerules.5f hosts.hfaxd.5f xferfaxlog.5f \
	cid.5f doneq.5f hylafax-config.5f destctrls.5f dialrules.5f \
	hylafax-info.5f hylafax-log.5f pagermap.5f recvq.5f sendq.5f \
	hylafax-server.5f hylafax-shutdown.5f status.5f tsi.5f
MAN8=	cqtest.8c choptest.8c dialtest.8c faxabort.8c faxaddmodem.8c \
	faxadduser.8c faxanswer.8c faxconfig.8c faxdeluser.8c faxmodem.8c \
	faxstate.8c faxcron.8c faxgetty.8c faxinfo.8c faxlock.8c faxq.8c \
	faxqclean.8c faxquit.8c faxrcvd.8c faxsend.8c faxsetup.8c \
	faxwatch.8c hfaxd.8c mkcover.8c notify.8c pagesend.8c pdf2fax.8c \
	pollrcvd.8c ps2fax.8c recvstats.8c \
	tagtest.8c tiff2fax.8c tiffcheck.8c tsitest.8c wedged.8c \
	xferfaxstats.8c

SUID_EXES=	${PREFIX}/sbin/faxgetty ${PREFIX}/sbin/faxq \
		${PREFIX}/bin/faxrm ${PREFIX}/bin/faxalter

post-extract:
	${RM} -rf ${WRKSRC}/zlib ${WRKSRC}/regex

post-patch:
	${REINPLACE_CMD} \
		-e 's,/usr/local,${LOCALBASE},g' \
		${WRKSRC}/configure
	${REINPLACE_CMD} \
		-e 's,%%LOCALBASE%%,${LOCALBASE},g' \
		${WRKSRC}/util/faxrcvd.sh.in

pre-install:
PLIST_SUB=	SPOOL="`${GREP} SPOOL ${WRKSRC}/defs | ${CUT} -c10-`"

post-install:
	${CHOWN} uucp ${SUID_EXES}
	${CHMOD} 4555 ${SUID_EXES}
	@if [ ! -f ${PREFIX}/etc/rc.d/hylafax.sh.sample ]; then	\
		${SED} 's^/usr/local^${PREFIX}^g' \
			< ${FILESDIR}/hylafax.sh.sample \
			> ${PREFIX}/etc/rc.d/hylafax.sh.sample;	\
	fi
	@${SED} 's^/usr/local^${PREFIX}^g' < ${PKGMESSAGE}

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