pkgsrc/databases/phpldapadmin/Makefile
bsiegert 11eb68bbc8 Fix a common mistake in many different packages: POSIX says that when using
pax -rw, the destination directory must exist. pax in NetBSD creates it if
not, pax in MirBSD complains. I read through all pkgsrc Makefiles that use
pax and added an entry to INSTALLATION_DIRS, or an INSTALL_DATA_DIR
invocation.

I did not test all the changes but they should be fairly safe. If you notice
any breakage because of this change, please contact me.
2013-10-18 11:41:17 +00:00

62 lines
2.1 KiB
Makefile

# $NetBSD: Makefile,v 1.37 2013/10/18 11:41:17 bsiegert Exp $
DISTNAME= phpldapadmin-${VERSION}
CATEGORIES= databases www
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=phpldapadmin/}
EXTRACT_SUFX= .tgz
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://phpldapadmin.sourceforge.net/
COMMENT= Set of PHP-scripts to administer an LDAP directory over the WWW
LICENSE= gnu-gpl-v2
.include "../../mk/bsd.prefs.mk"
.include "../../lang/php/phpversion.mk"
REPLACE_SH= tools/po/make*
DEPENDS+= ${PHP_PKG_PREFIX}-ldap>=4.1.2:../../databases/php-ldap
DEPENDS+= ${PHP_PKG_PREFIX}-gettext>=4.1.2:../../devel/php-gettext
USE_TOOLS+= pax
VERSION= 1.2.3
NO_BUILD= YES
CONF_FILES+= ${PREFIX}/share/examples/phpldapadmin/config.php.example \
${PREFIX}/share/phpldapadmin/config/config.php
CONF_FILES+= ${PREFIX}/share/examples/phpldapadmin/phpldapadmin.conf \
${PKG_SYSCONFDIR}/phpldapadmin.conf
PAX_DIRS= config doc hooks htdocs lib locale queries templates tools
INSTALLATION_DIRS+= \
share/doc/phpldapadmin share/examples/phpldapadmin \
share/phpldapadmin/config
do-configure:
${SED} -e "s|@LDAPADMINDIR@|${PREFIX}/share/phpldapadmin/htdocs|g" \
${FILESDIR}/phpldapadmin.conf > ${WRKDIR}/phpldapadmin.conf
${RM} -f ${WRKSRC}/.gitignore
${FIND} ${WRKSRC} -type d | ${XARGS} ${CHMOD} ${PKGDIRMODE}
${FIND} ${WRKSRC} -type f | ${XARGS} ${CHMOD} ${NONBINMODE}
do-install:
${INSTALL_DATA} ${WRKSRC}/config/config.php.example \
${DESTDIR}${PREFIX}/share/examples/phpldapadmin/config.php.example
${INSTALL_DATA} ${WRKDIR}/phpldapadmin.conf \
${DESTDIR}${PREFIX}/share/examples/phpldapadmin/phpldapadmin.conf
${INSTALL_DATA} ${WRKSRC}/index.php \
${DESTDIR}${PREFIX}/share/phpldapadmin
.for i in ${PAX_DIRS}
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/phpldapadmin/${i:Q}
cd ${WRKSRC}/${i:Q} && ${FIND} . -type f \! -name '*.orig' -print | \
pax -rwppm ${DESTDIR}${PREFIX}/share/phpldapadmin/${i:Q}
.endfor
${INSTALL_DATA} ${WRKSRC}/INSTALL \
${DESTDIR}${PREFIX}/share/doc/phpldapadmin
${INSTALL_DATA} ${WRKSRC}/LICENSE \
${DESTDIR}${PREFIX}/share/doc/phpldapadmin
${INSTALL_DATA} ${WRKSRC}/VERSION \
${DESTDIR}${PREFIX}/share/phpldapadmin
.include "../../mk/bsd.pkg.mk"