summaryrefslogtreecommitdiff
path: root/comms/hylafax/Makefile
blob: ee4088bc449c3bb9ebe6d0e39192ff608852d232 (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
# $NetBSD: Makefile,v 1.57 2008/06/04 08:54:40 markd Exp $

VERS=		4.2.5
DISTNAME=	hylafax-${VERS}
PKGREVISION=	3
CATEGORIES=	comms
MASTER_SITES_BETA=	ftp://ftp.hylafax.org/source/BETA/
MASTER_SITES_RELEASE=	ftp://ftp.hylafax.org/source/
MASTER_SITES=	${MASTER_SITES_RELEASE}

MAINTAINER=	hallmann@ahatec.de
HOMEPAGE=	http://www.hylafax.org/
COMMENT=	Telecommunication and fax server system

DEPENDS+=	mawk>=1.2.2:../../lang/mawk

CONFLICTS=	hylafax-devel-[0-9]* mgetty-[0-9]*

BUILD_DEFS+=	FAXUSER FAXGROUP VARBASE

USE_LANGUAGES=		c c++
USE_TOOLS+=		gs:run
HAS_CONFIGURE=		yes
CONFIGURE_ARGS+=	--with-MAKE=${MAKE_PROGRAM:Q}
CONFIGURE_ARGS+=	--with-INSTALL="" --nointeractive
CONFIGURE_ARGS+=	--with-ZLIBINC=-I${BUILDLINK_PREFIX.zlib}/include
CONFIGURE_ARGS+=	--with-LIBZ="-L${BUILDLINK_PREFIX.zlib}/lib -lz"
CONFIGURE_ENV+=		PREFIX=${PREFIX:Q} OPTIMIZER=${CFLAGS:Q}
CONFIGURE_ENV+=		FAXUID=${FAXUSER:Q} FAXGID=${FAXGROUP:Q}
CONFIGURE_ENV+=		VARBASE=${VARBASE:Q}
MANCOMPRESSED=		yes

FAXUSER?=	uucp
FAXGROUP?=	dialer
RCD_SCRIPTS=	hylafax

INSTALLATION_DIRS=	libdata/hylafax

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

PKG_OPTIONS_VAR=	PKG_OPTIONS.hylafax
PKG_SUPPORTED_OPTIONS=	pam
#pam doesn't work right now, so disabled by default
#PKG_SUGGESTED_OPTIONS=       pam
.include "../../mk/bsd.options.mk"

.if !empty(PKG_OPTIONS:Mpam)
.include "../../mk/pam.buildlink3.mk"
.else
CONFIGURE_ARGS+=	--disable-pam
.endif

.include "../../mk/bsd.prefs.mk"

.if ${OPSYS} == "NetBSD" && exists(/usr/include/sys/pset.h)
CONFIGURE_ENV+=		MACHDEPLIBS=-lrt
.endif

post-install:
	chown ${FAXUSER} ${SUID_EXES}
	chmod 4555 ${SUID_EXES}

.include "../../devel/zlib/buildlink3.mk"
.include "../../graphics/jpeg/buildlink3.mk"
.include "../../graphics/tiff/buildlink3.mk"

.include "../../mk/bsd.pkg.mk"