aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authormm <mm@FreeBSD.org>2010-03-30 23:39:09 +0800
committermm <mm@FreeBSD.org>2010-03-30 23:39:09 +0800
commita26325efbb139cd689a779b9e6c3b2438830bc22 (patch)
tree610504c3a9dfe610eab0b33c0cb299465d89f483 /net
parentf7fdddde959d7336042c4cf7238dff74766dbf63 (diff)
downloadfreebsd-ports-gnome-a26325efbb139cd689a779b9e6c3b2438830bc22.tar.gz
freebsd-ports-gnome-a26325efbb139cd689a779b9e6c3b2438830bc22.tar.zst
freebsd-ports-gnome-a26325efbb139cd689a779b9e6c3b2438830bc22.zip
- Fix path to perl binary [1]
- Fix configuration directory creation in package [2] - Reorganize documentation and examples - Add missing smbldap-userinfo script - Make migration scripts and PDF documentation optional PR: ports/144107 [1], ports/144784 [2] Submitted by: Gabor Tjong A Hung [1] [2]
Diffstat (limited to 'net')
-rw-r--r--net/smbldap-tools/Makefile81
-rw-r--r--net/smbldap-tools/pkg-plist24
2 files changed, 72 insertions, 33 deletions
diff --git a/net/smbldap-tools/Makefile b/net/smbldap-tools/Makefile
index ef5dd2af3d86..792580c9f215 100644
--- a/net/smbldap-tools/Makefile
+++ b/net/smbldap-tools/Makefile
@@ -7,7 +7,7 @@
PORTNAME= smbldap-tools
PORTVERSION= 0.9.5
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= http://download.gna.org/smbldap-tools/packages/ \
http://download.gna.org/smbldap-tools/packages/old-Idealx-release/
@@ -27,37 +27,80 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:C/a//}
USE_PERL5= yes
NO_BUILD= yes
+PORTDOCS= *
+PORTEXAMPLES= *
+
+OPTIONS= MIGRATION_SCRIPTS "Install migration scripts" off \
+ PDF_DOC "Install PDF documentation" off
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_MIGRATION_SCRIPTS)
+PLIST_SUB+= MIGRATION_SCRIPTS=""
+.else
+PLIST_SUB+= MIGRATION_SCRIPTS="@comment "
+.endif
+
post-patch:
- @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/configure.pl
- @${PERL} -pi -e 's#/etc/samba#${PREFIX}/etc#' ${WRKSRC}/configure.pl \
- ${WRKSRC}/doc/smb.conf \
- ${WRKSRC}/smbldap_tools.pm
- @${PERL} -pi -e 's#/etc/smb/#${PREFIX}/etc/smb/#' ${WRKSRC}/configure.pl \
- ${WRKSRC}/smbldap.conf \
- ${WRKSRC}/smbldap_tools.pm
- @${PERL} -pi -e 's#/etc/opt/IDEALX#${PREFIX}/etc#' ${WRKSRC}/smbldap_tools.pm
- @${PERL} -pi -e 's#/usr/sbin#${LOCALBASE}/sbin#' ${WRKSRC}/smbldap-passwd
+ @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+ -e "s|/etc/samba|${PREFIX}/etc|g" \
+ -e "s|/etc/smb/|${PREFIX}/etc/smb/|g" \
+ ${WRKSRC}/configure.pl \
+ ${WRKSRC}/doc/smb.conf \
+ ${WRKSRC}/smbldap_tools.pm
+.for i in smbldap_tools.pm smbldap-groupadd smbldap-groupdel smbldap-groupmod \
+smbldap-groupshow smbldap-useradd smbldap-userdel smbldap-userinfo \
+smbldap-userlist smbldap-usermod smbldap-usershow smbldap-passwd \
+smbldap-populate \
+doc/migration_scripts/smbldap-migrate-pwdump-groups \
+doc/migration_scripts/smbldap-migrate-unix-accounts \
+doc/migration_scripts/smbldap-migrate-unix-groups \
+doc/migration_scripts/smbldap-migrate-pwdump-accounts
+ @${REINPLACE_CMD} -e "s|/usr/bin/perl|${PERL}|g" \
+ -e "s|/usr/sbin|${LOCALBASE}/sbin|g" \
+ -e "s|/etc/opt/IDEALX|${PREFIX}/etc|g" \
+ ${WRKSRC}/$i
+.endfor
do-install:
- ${MKDIR} ${PREFIX}/etc/${PORTNAME}
- ${MKDIR} ${EXAMPLESDIR}/etc
+ ${MKDIR} ${PREFIX}/etc/smbldap-tools
.for i in smbldap.conf smbldap_bind.conf
- ${INSTALL_DATA} ${WRKSRC}/$i ${EXAMPLESDIR}/etc/$i
- @[ -f ${PREFIX}/etc/${PORTNAME}/$i ] || ${INSTALL_DATA} ${WRKSRC}/$i ${PREFIX}/etc/${PORTNAME}/$i
+ ${INSTALL_DATA} ${WRKSRC}/$i ${PREFIX}/etc/smbldap-tools/$i.sample
+ @[ -f ${PREFIX}/etc/smbldap-tools/$i ] || ${INSTALL_DATA} ${WRKSRC}/$i ${PREFIX}/etc/smbldap-tools/$i
.endfor
-.for i in smbldap-groupadd smbldap-groupdel smbldap-groupmod smbldap-groupshow smbldap-useradd smbldap-userdel smbldap-userlist smbldap-usermod smbldap-usershow smbldap-passwd smbldap-populate
+.for i in smbldap-groupadd smbldap-groupdel smbldap-groupmod \
+smbldap-groupshow smbldap-useradd smbldap-userdel smbldap-userinfo \
+smbldap-userlist smbldap-usermod smbldap-usershow smbldap-passwd \
+smbldap-populate
${INSTALL_SCRIPT} ${WRKSRC}/$i ${PREFIX}/sbin
.endfor
-.for i in smbldap-migrate-pwdump-accounts smbldap-migrate-pwdump-groups smbldap-migrate-unix-accounts smbldap-migrate-unix-groups
- ${INSTALL_SCRIPT} ${WRKSRC}/doc/migration_scripts/$i ${PREFIX}/sbin
-.endfor
${INSTALL_DATA} ${WRKSRC}/smbldap_tools.pm ${SITE_PERL}/
+.if !defined(NOPORTEXAMPLES)
+ ${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/doc/smb.conf ${EXAMPLESDIR}/
+ ${INSTALL_DATA} ${WRKSRC}/doc/slapd.conf ${EXAMPLESDIR}/
${INSTALL_SCRIPT} ${WRKSRC}/configure.pl ${EXAMPLESDIR}/
+.endif
+
+.if defined(WITH_MIGRATION_SCRIPTS)
+ ${MKDIR} ${DOCSDIR}/migration_scripts
+.for i in smbldap-migrate-pwdump-accounts smbldap-migrate-pwdump-groups \
+smbldap-migrate-unix-accounts smbldap-migrate-unix-groups
+ ${INSTALL_SCRIPT} ${WRKSRC}/doc/migration_scripts/$i ${PREFIX}/sbin
+.endfor
+.endif
+
+post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
+.for file in CONTRIBUTORS COPYING ChangeLog FILES INFRA INSTALL README TODO
+ ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}/
+.endfor
+ ${INSTALL_DATA} ${WRKSRC}/doc/smbldap-tools.html ${DOCSDIR}/smbldap-tools.html
+.if defined(WITH_PDF_DOC)
${INSTALL_DATA} ${WRKSRC}/doc/smbldap-tools.pdf ${DOCSDIR}/smbldap-tools.pdf
.endif
+.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/net/smbldap-tools/pkg-plist b/net/smbldap-tools/pkg-plist
index d6f862c725fe..ef1134b7538b 100644
--- a/net/smbldap-tools/pkg-plist
+++ b/net/smbldap-tools/pkg-plist
@@ -2,28 +2,24 @@ sbin/smbldap-groupadd
sbin/smbldap-groupdel
sbin/smbldap-groupmod
sbin/smbldap-groupshow
-sbin/smbldap-migrate-pwdump-accounts
-sbin/smbldap-migrate-pwdump-groups
-sbin/smbldap-migrate-unix-accounts
-sbin/smbldap-migrate-unix-groups
+%%MIGRATION_SCRIPTS%%sbin/smbldap-migrate-pwdump-groups
+%%MIGRATION_SCRIPTS%%sbin/smbldap-migrate-unix-accounts
+%%MIGRATION_SCRIPTS%%sbin/smbldap-migrate-unix-groups
+%%MIGRATION_SCRIPTS%%sbin/smbldap-migrate-pwdump-accounts
sbin/smbldap-passwd
sbin/smbldap-populate
sbin/smbldap-useradd
sbin/smbldap-userdel
+sbin/smbldap-userinfo
sbin/smbldap-userlist
sbin/smbldap-usermod
sbin/smbldap-usershow
-@unexec if cmp -s %D/etc/smbldap-tools/smbldap.conf %D/%%EXAMPLESDIR%%/etc/smbldap.conf; then rm -f %D/etc/smbldap-tools/smbldap.conf; fi
-%%EXAMPLESDIR%%/etc/smbldap.conf
+@exec mkdir -p %D/etc/smbldap-tools
+@unexec if cmp -s %D/etc/smbldap-tools/smbldap.conf %D/etc/smbldap-tools/smbldap.conf.sample; then rm -f %D/etc/smbldap-tools/smbldap.conf; fi
+etc/smbldap-tools/smbldap.conf.sample
@exec [ -f %D/etc/smbldap-tools/smbldap.conf ] || cp %B/%f %D/etc/smbldap-tools/smbldap.conf
-@unexec if cmp -s %D/etc/smbldap-tools/smbldap_bind.conf %D/%%EXAMPLESDIR%%/etc/smbldap_bind.conf; then rm -f %D/etc/smbldap-tools/smbldap_bind.conf; fi
-%%EXAMPLESDIR%%/etc/smbldap_bind.conf
+@unexec if cmp -s %D/etc/smbldap-tools/smbldap_bind.conf %D/etc/smbldap-tools/smbldap_bind.conf.sample; then rm -f %D/etc/smbldap-tools/smbldap_bind.conf; fi
+etc/smbldap-tools/smbldap_bind.conf.sample
@exec [ -f %D/etc/smbldap-tools/smbldap_bind.conf ] || cp %B/%f %D/etc/smbldap-tools/smbldap_bind.conf
-%%EXAMPLESDIR%%/smb.conf
-%%EXAMPLESDIR%%/configure.pl
%%SITE_PERL%%/smbldap_tools.pm
-%%PORTDOCS%%%%DOCSDIR%%/smbldap-tools.pdf
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrmtry etc/smbldap-tools
-@dirrm %%EXAMPLESDIR%%/etc
-@dirrm %%EXAMPLESDIR%%