diff options
-rw-r--r-- | net-im/ejabberd/Makefile | 42 | ||||
-rw-r--r-- | net-im/ejabberd/files/patch-src-Makefile.in | 15 | ||||
-rw-r--r-- | net-im/ejabberd/files/pkg-install.in | 8 | ||||
-rw-r--r-- | net-im/ejabberd/pkg-plist | 4 |
4 files changed, 32 insertions, 37 deletions
diff --git a/net-im/ejabberd/Makefile b/net-im/ejabberd/Makefile index 2eb74feea482..8f50552e90ba 100644 --- a/net-im/ejabberd/Makefile +++ b/net-im/ejabberd/Makefile @@ -15,7 +15,7 @@ LICENSE_FILE= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/COPYING BUILD_DEPENDS= erlc:${PORTSDIR}/lang/erlang RUN_DEPENDS= erl:${PORTSDIR}/lang/erlang -LIB_DEPENDS= expat.6:${PORTSDIR}/textproc/expat2 +LIB_DEPENDS= expat:${PORTSDIR}/textproc/expat2 USERS= ejabberd GROUPS= ${USERS} @@ -25,57 +25,41 @@ USES= iconv gmake pkgconfig USE_RC_SUBR= ${PORTNAME} NOPRECIOUSMAKEVARS= yes -OPTIONS_DEFINE= ODBC PAM +OPTIONS_DEFINE= ODBC PAM DOCS MAKE_ENV= PORTVERSION=${PORTVERSION} -CONFIGURE_ARGS+=--localstatedir=/var --with-openssl=${OPENSSLBASE} +CONFIGURE_ARGS+=--localstatedir=/var --with-openssl=${OPENSSLBASE} --with-expat=${LOCALBASE} PKGMESSAGE= ${WRKDIR}/pkg-message PKGINSTALL= ${WRKDIR}/pkg-install PLIST_SUB= PORTNAME=${PORTNAME} PORTVERSION=${PORTVERSION} SUB_FILES= pkg-message pkg-install SUB_LIST= PORTNAME=${PORTNAME} PORTVERSION=${PORTVERSION} \ - USERS=${USERS} GROUPS=${GROUPS} + USERS=${USERS} GROUPS=${GROUPS} SHAREMODE=${SHAREMODE} \ + SHAREOWN=${SHAREOWN} SHAREGRP=${SHAREGRP} WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/src -NO_STAGE= yes -.include <bsd.port.pre.mk> +OPTIONS_SUB= PAM ODBC +PAM_CONFIGURE_ENABLE= pam +ODBC_CONFIGURE_ENABLE= odbc +DOCS_MAKE_ARGS_OFF= NOPORTDOCS=yes USE_OPENSSL= yes -.include "${PORTSDIR}/Mk/bsd.openssl.mk" - -.if ${PORT_OPTIONS:MODBC} -CONFIGURE_ARGS+=--enable-odbc -PLIST_SUB+= ODBC="" -.else -PLIST_SUB+= ODBC="@comment " -.endif +.include <bsd.port.pre.mk> .if ${PORT_OPTIONS:MPAM} -CONFIGURE_ARGS+=--enable-pam -PLIST_SUB+= PAM="" +SUB_LIST+= PAM="1" .else -PLIST_SUB+= PAM="@comment " -.endif - -.if ! ${PORT_OPTIONS:MDOCS} -MAKE_ARGS+= NOPORTDOCS=${NOPORTDOCS} +SUB_LIST+= PAM="0" .endif post-patch: @${REINPLACE_CMD} -e 's,/usr/local,${LOCALBASE},g' ${WRKSRC}/configure post-install: - @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL - @${FIND} ${PREFIX}/lib/erlang/lib/${DISTNAME} -type f -print0 | ${XARGS} -0 ${CHMOD} ${SHAREMODE} - @${FIND} ${PREFIX}/lib/erlang/lib/${DISTNAME} -type f -print0 | ${XARGS} -0 ${CHOWN} ${SHAREOWN}:${SHAREGRP} - .if ${PORT_OPTIONS:MPAM} - ${CHMOD} 4750 ${PREFIX}/lib/erlang/lib/${DISTNAME}/priv/bin/epam - ${CHOWN} root:ejabberd ${PREFIX}/lib/erlang/lib/${DISTNAME}/priv/bin/epam - ${INSTALL} -m 444 ${FILESDIR}/pam_ejabberd ${PREFIX}/etc/pam.d/ejabberd + ${INSTALL} -m 444 ${FILESDIR}/pam_ejabberd ${STAGEDIR}${PREFIX}/etc/pam.d/ejabberd .endif - @${CAT} ${PKGMESSAGE} .include <bsd.port.post.mk> diff --git a/net-im/ejabberd/files/patch-src-Makefile.in b/net-im/ejabberd/files/patch-src-Makefile.in index 076cde8ea655..da041681cf7c 100644 --- a/net-im/ejabberd/files/patch-src-Makefile.in +++ b/net-im/ejabberd/files/patch-src-Makefile.in @@ -1,15 +1,18 @@ + +$FreeBSD$ + --- Makefile.in.orig +++ Makefile.in -@@ -89,7 +89,7 @@ +@@ -95,7 +95,7 @@ SBINDIR = $(DESTDIR)@sbindir@ # /lib/ejabberd/ -EJABBERDDIR = $(DESTDIR)@libdir@/ejabberd -+EJABBERDDIR = @libdir@/erlang/lib/ejabberd-$(PORTVERSION) ++EJABBERDDIR = $(DESTDIR)@libdir@/erlang/lib/ejabberd-$(PORTVERSION) # /share/doc/ejabberd PACKAGE_TARNAME = @PACKAGE_TARNAME@ -@@ -115,7 +115,7 @@ +@@ -121,7 +121,7 @@ MSGSDIR = $(PRIVDIR)/msgs # /var/lib/ejabberd/ @@ -18,7 +21,7 @@ # /var/lock/ejabberdctl CTLLOCKDIR = $(DESTDIR)@localstatedir@/lock/ejabberdctl -@@ -178,25 +178,22 @@ +@@ -184,25 +184,22 @@ # # Configuration files install -d -m 750 $(G_USER) $(ETCDIR) @@ -51,7 +54,7 @@ # # Init script sed -e "s*@ctlscriptpath@*$(SBINDIR)*" \ -@@ -253,6 +250,7 @@ +@@ -260,6 +257,7 @@ chmod -R 750 $(LOGDIR) # # Documentation @@ -59,7 +62,7 @@ install -d $(DOCDIR) install -m 644 ../doc/dev.html $(DOCDIR) install -m 644 ../doc/guide.html $(DOCDIR) -@@ -262,6 +260,7 @@ +@@ -269,6 +267,7 @@ && install -m 644 ../doc/guide.pdf $(DOCDIR) \ || echo "No ../doc/guide.pdf was built" install -m 644 ../COPYING $(DOCDIR) diff --git a/net-im/ejabberd/files/pkg-install.in b/net-im/ejabberd/files/pkg-install.in index 18d704bed7de..e4cb90168261 100644 --- a/net-im/ejabberd/files/pkg-install.in +++ b/net-im/ejabberd/files/pkg-install.in @@ -10,5 +10,13 @@ install -d -m 750 -o %%USERS%% -g %%GROUPS%% ${USERS_HOME} /var/log/ejabberd chown -R %%USERS%%:%%GROUPS%% %%PREFIX%%/etc/%%PORTNAME%% chown -R %%USERS%%:%%GROUPS%% %%PREFIX%%/lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%% + +find %%PREFIX%%/lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%% -type f -print0 | xargs -0 chmod %%SHAREMODE%% +find %%PREFIX%%/lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%% -type f -print0 | xargs -0 chown %%SHAREOWN%%:%%SHAREGRP%% + +if [ "%%PAM%%" = 1 ]; then + chmod 4750 %%PREFIX%%/lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/priv/bin/epam + chown root:%%GROUPS%% %%PREFIX%%/lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/priv/bin/epam +fi exit 0 diff --git a/net-im/ejabberd/pkg-plist b/net-im/ejabberd/pkg-plist index 0ef477c004c5..aa775f114c29 100644 --- a/net-im/ejabberd/pkg-plist +++ b/net-im/ejabberd/pkg-plist @@ -2,8 +2,8 @@ %%ETCDIR%%/%%PORTNAME%%ctl.cfg.example %%ETCDIR%%/inetrc.example @unexec if cmp -s %D/%%ETCDIR%%/%%PORTNAME%%.defaults.example %D/%%ETCDIR%%/%%PORTNAME%%.defaults; then rm -f %D/%%ETCDIR%%/%%PORTNAME%%.defaults; fi -@unexec if cmp -s %D/%%ETCDIR%%/%%PORTNAME%%.inetrc.example %D/%%ETCDIR%%/%%PORTNAME%%.inetrc; then rm -f %D/%%ETCDIR%%/%%PORTNAME%%.inetrc; fi -@exec [ ! -f %D/%%ETCDIR%%/%%PORTNAME%%.inetrc ] && cp %D/%%ETCDIR%%/%%PORTNAME%%.inetrc.example %D/%%ETCDIR%%/%%PORTNAME%%.inetrc +@unexec if cmp -s %D/%%ETCDIR%%/inetrc.example %D/%%ETCDIR%%/inetrc; then rm -f %D/%%ETCDIR%%/inetrc; fi +@exec [ ! -f %D/%%ETCDIR%%/inetrc ] && cp %D/%%ETCDIR%%/inetrc.example %D/%%ETCDIR%%/inetrc %%PAM%%etc/pam.d/%%PORTNAME%% lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/ELDAPv3.beam lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/XmppAddr.beam |