summaryrefslogtreecommitdiff
path: root/net/netatalk30/Makefile
blob: 9476f330968dcc6407c48aad4104ecee03085b06 (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
# $NetBSD: Makefile,v 1.4 2015/06/12 10:50:43 wiz Exp $

DISTNAME=	netatalk-3.0.8
PKGNAME=        ${DISTNAME:C/-/30-/}
PKGREVISION=	3
CATEGORIES=	net
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=netatalk/}
EXTRACT_SUFX=	.tar.bz2

MAINTAINER=	hauke@NetBSD.org
HOMEPAGE=	http://netatalk.sourceforge.net/
COMMENT=	Netatalk AFP file services
LICENSE=	gnu-gpl-v2

USE_LIBTOOL=		yes
USE_OLD_DES_API=	yes
USE_TOOLS+=		gmake perl:run
GNU_CONFIGURE=		yes
PKG_CONFIG=		yes

PKG_SYSCONFSUBDIR=	netatalk

EGDIR=			${PREFIX}/share/examples/netatalk
CONF_FILES=		${EGDIR}/afp.conf		${PKG_SYSCONFDIR}/afp.conf
CONF_FILES+=		${EGDIR}/extmap.conf		${PKG_SYSCONFDIR}/extmap.conf

RCD_SCRIPTS=		netatalk
RCD_SCRIPT_SRC.netatalk= ${WRKSRC}/distrib/initscripts/rc.netbsd
SMF_SRCDIR=		${WRKSRC}/distrib/initscripts
SMF_METHODS=		netatalk_smf
SMF_MANIFEST=		netatalk.xml

CONFLICTS=		netatalk22-[0-9]* netatalk-[0-9]* 
CONFLICTS+=		netatalk-asun-[0-9]* netatalk-umich-[0-9]*

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

BUILD_DEFS+=		VARBASE
OWN_DIRS+=		${VARBASE}/db/netatalk/CNID ${ROOT_USER} ${ROOT_GROUP}

CONFIGURE_ARGS+=	--enable-overwrite
CONFIGURE_ARGS+=	--enable-quota
CONFIGURE_ARGS+=	--libexecdir=${PREFIX}/libexec/netatalk
CONFIGURE_ARGS+=	--sbindir=${PREFIX}/libexec/netatalk
CONFIGURE_ARGS+=	--with-pkgconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+=	--with-message-dir=${PKG_SYSCONFDIR}/msg
CONFIGURE_ARGS+=	--localstatedir=${VARBASE}/db
CONFIGURE_ARGS+=	--with-uams-path=${PREFIX}/libexec/netatalk/uams
CONFIGURE_ARGS+=	--with-bdb=${BUILDLINK_PREFIX.db5}
CONFIGURE_ARGS+=	--with-ssl-dir=${BUILDLINK_PREFIX.openssl}
CONFIGURE_ENV+=		MACHINE_ARCH=${MACHINE_ARCH}

# Upstream bug, was supposed to be fixed in 3.0.8?
CFLAGS.SunOS+=		-I/usr/include/kerberosv5

MAKE_DIRS+=		${PKG_SYSCONFDIR}/msg

REPLACE_PYTHON+=	contrib/shell_utils/afpstats
REPLACE_PYTHON+=	libevent/event_rpcgen.py

SUBST_CLASSES+=		paths
SUBST_MESSAGE.paths=	Fixing hardcoded paths.
SUBST_STAGE.paths=	pre-configure
SUBST_FILES.paths=	distrib/initscripts/Makefile.in
SUBST_SED.paths=	-e "s,^\\(DVIPS=\\)\\(/usr/local/tex\\)\\(/bin\\),\\1${PREFIX}\\3,"

PLIST_VARS+=		ea
.if ${OPSYS} == "SunOS" || ${OPSYS} == "DragonFly" || ${OPSYS} == "Linux" || \
	(${OPSYS} == "NetBSD" && empty(OS_VERSION:M[0-6].[0-8]*))
PLIST.ea=		yes
.endif

.include "options.mk"

INSTALLATION_DIRS=	libexec/psffilters etc/netatalk

post-configure:
	${CP} ${FILESDIR}/netatalk_smf.sh ${SMF_SRCDIR}

.if !empty(PKG_OPTIONS:Mpam)
post-install:
	${INSTALL_DATA} ${WRKSRC}/config/pam/netatalk ${DESTDIR}${EGDIR}/netatalk.pam
.endif

.include "../../lang/python/application.mk"
.include "../../security/libgcrypt/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../security/tcp_wrappers/buildlink3.mk"
.include "../../databases/db5/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"