From f827779c9da7598bf595fb5a46928a2132f0fdb4 Mon Sep 17 00:00:00 2001 From: marcus Date: Tue, 25 Jul 2006 22:45:52 +0000 Subject: * Use new USE_RC_SUBR layout * Use USE_BDB to make the bdb requirement more flexible --- net/netatalk/Makefile | 17 ++++++------ net/netatalk/files/netatalk.in | 53 ++++++++++++++++++++++++++++++++++++++ net/netatalk/files/netatalk.sh | 53 -------------------------------------- net/netatalk/files/patch-configure | 2 +- 4 files changed, 62 insertions(+), 63 deletions(-) create mode 100644 net/netatalk/files/netatalk.in delete mode 100644 net/netatalk/files/netatalk.sh (limited to 'net/netatalk') diff --git a/net/netatalk/Makefile b/net/netatalk/Makefile index 9188f2dee46d..446abaab658f 100644 --- a/net/netatalk/Makefile +++ b/net/netatalk/Makefile @@ -7,7 +7,7 @@ PORTNAME= netatalk PORTVERSION= 2.0.3 -PORTREVISION= 2 +PORTREVISION= 3 PORTEPOCH= 1 CATEGORIES= net print MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} @@ -16,14 +16,14 @@ MASTER_SITE_SUBDIR= netatalk MAINTAINER= marcus@FreeBSD.org COMMENT= File and print server for AppleTalk networks -LIB_DEPENDS= db41.1:${PORTSDIR}/databases/db41 .if defined(WITH_SRVLOC) LIB_DEPENDS+= slp.1:${PORTSDIR}/net/openslp .endif USE_BZIP2= yes USE_ICONV= yes -USE_RC_SUBR= yes +USE_BDB= 41+ +USE_RC_SUBR= netatalk CONFIGURE_ARGS+= --with-tcp-wrappers \ --with-pkgconfdir=${PREFIX}/etc \ --with-libiconv=${LOCALBASE} @@ -68,12 +68,11 @@ MAN8= afpd.8 atalkd.8 cnid_dbd.8 cnid_metad.8 papd.8 papstatus.8 \ psf.8 timelord.8 CONFLICTS= bigloo-2.* cap-6.0.* tct-1.* netatalk-1* -RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} .if defined(WITH_SRVLOC) -RC_SCRIPTS_SUB+= SRVLOC="slpd" +SUB_LIST+= SRVLOC="slpd" .else -RC_SCRIPTS_SUB+= SRVLOC="" +SUB_LIST+= SRVLOC="" .endif pre-everything:: @@ -86,9 +85,9 @@ pre-everything:: @${ECHO_MSG} "See Netatalk's Makefile for more details on some of these options." @${ECHO_MSG} "" -post-extract: - @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ - ${FILESDIR}/netatalk.sh > ${WRKSRC}/netatalk.sh +post-patch: + @${REINPLACE_CMD} -e 's|%%BDB_NAME%%|${BDB_INCLUDE_DIR:T}|' \ + ${WRKSRC}/configure post-install: @${RM} -f ${PREFIX}/bin/nu ${PREFIX}/bin/lp2pap.sh \ diff --git a/net/netatalk/files/netatalk.in b/net/netatalk/files/netatalk.in new file mode 100644 index 000000000000..67d514d2e965 --- /dev/null +++ b/net/netatalk/files/netatalk.in @@ -0,0 +1,53 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: atalkd papd cnid_metad afpd timelord +# REQUIRE: DAEMON %%SRVLOC%% +# KEYWORD: shutdown +# +# AppleTalk daemons. Make sure not to start atalkd in the background: +# its data structures must have time to stablize before running the +# other processes. +# + +netatalk_enable=${netatalk_enable-"NO"} +atalkd_enable=${atalkd_enable-"NO"} +papd_enable=${papd_enable-"NO"} +cnid_metad_enable=${cnid_metad_enable-"NO"} +afpd_enable=${afpd_enable-"NO"} +timelord_enable=${timelord_enable-"NO"} + +. %%RC_SUBR%% + +name=netatalk +rcvar=`set_rcvar` +hostname=`hostname -s` + +start_cmd=netatalk_start +stop_cmd=netatalk_stop + +netatalk_start() { + checkyesno atalkd_enable && %%PREFIX%%/sbin/atalkd + checkyesno atalkd_enable && \ + %%PREFIX%%/bin/nbprgstr -p 4 ${hostname}:Workstation & + checkyesno atalkd_enable && \ + %%PREFIX%%/bin/nbprgstr -p 4 ${hostname}:netatalk & + checkyesno papd_enable && %%PREFIX%%/sbin/papd + checkyesno cnid_metad_enable && %%PREFIX%%/sbin/cnid_metad + checkyesno afpd_enable && \ + %%PREFIX%%/sbin/afpd -s %%PREFIX%%/etc/AppleVolumes.system \ + -f %%PREFIX%%/etc/AppleVolumes.default + checkyesno timelord_enable && %%PREFIX%%/sbin/timelord +} + +netatalk_stop() { + checkyesno timelord_enable && killall timelord + checkyesno afpd_enable && killall afpd + checkyesno cnid_metad_enable && killall cnid_metad + checkyesno papd_enable && killall papd + checkyesno atalkd_enable && killall atalkd +} + +load_rc_config ${name} +run_rc_command "$1" diff --git a/net/netatalk/files/netatalk.sh b/net/netatalk/files/netatalk.sh deleted file mode 100644 index e1f7a1690b8d..000000000000 --- a/net/netatalk/files/netatalk.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: /tmp/pcvs/ports/net/netatalk/files/Attic/netatalk.sh,v 1.5 2006-01-08 21:50:27 marcus Exp $ -# -# PROVIDE: atalkd papd cnid_metad afpd timelord -# REQUIRE: DAEMON %%SRVLOC%% -# KEYWORD: shutdown -# -# AppleTalk daemons. Make sure not to start atalkd in the background: -# its data structures must have time to stablize before running the -# other processes. -# - -netatalk_enable=${netatalk_enable-"NO"} -atalkd_enable=${atalkd_enable-"NO"} -papd_enable=${papd_enable-"NO"} -cnid_metad_enable=${cnid_metad_enable-"NO"} -afpd_enable=${afpd_enable-"NO"} -timelord_enable=${timelord_enable-"NO"} - -. %%RC_SUBR%% - -name=netatalk -rcvar=`set_rcvar` -hostname=`hostname -s` - -start_cmd=netatalk_start -stop_cmd=netatalk_stop - -netatalk_start() { - checkyesno atalkd_enable && %%PREFIX%%/sbin/atalkd - checkyesno atalkd_enable && \ - %%PREFIX%%/bin/nbprgstr -p 4 ${hostname}:Workstation & - checkyesno atalkd_enable && \ - %%PREFIX%%/bin/nbprgstr -p 4 ${hostname}:netatalk & - checkyesno papd_enable && %%PREFIX%%/sbin/papd - checkyesno cnid_metad_enable && %%PREFIX%%/sbin/cnid_metad - checkyesno afpd_enable && \ - %%PREFIX%%/sbin/afpd -s %%PREFIX%%/etc/AppleVolumes.system \ - -f %%PREFIX%%/etc/AppleVolumes.default - checkyesno timelord_enable && %%PREFIX%%/sbin/timelord -} - -netatalk_stop() { - checkyesno timelord_enable && killall timelord - checkyesno afpd_enable && killall afpd - checkyesno cnid_metad_enable && killall cnid_metad - checkyesno papd_enable && killall papd - checkyesno atalkd_enable && killall atalkd -} - -load_rc_config ${name} -run_rc_command "$1" diff --git a/net/netatalk/files/patch-configure b/net/netatalk/files/patch-configure index d14d0f1f9714..2801280ef7b7 100644 --- a/net/netatalk/files/patch-configure +++ b/net/netatalk/files/patch-configure @@ -5,7 +5,7 @@ dobdbsearch=yes bdb_search_dirs="/usr/local/include /usr/include" - search_subdirs="/db4.2 /db42 /db4.1 /db41 /db4 /" -+ search_subdirs="/db4.1 /db41 /db4 /" ++ search_subdirs="/%%BDB_NAME%% /db4.2 /db42 /db4.1 /db41 /db4 /" DB_MAJOR_REQ=4 DB_MINOR_REQ=1 -- cgit