aboutsummaryrefslogtreecommitdiff
path: root/www/coppermine/Makefile
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2004-05-08 00:29:54 +0000
committerBrooks Davis <brooks@FreeBSD.org>2004-05-08 00:29:54 +0000
commit8924156e6bd6e8deb2461ed5e9e005fe8cda51fa (patch)
treeea714262f568069d3b69c72a55c25a1c2a44ebfe /www/coppermine/Makefile
parent1d089609715abbc976d8108a18e4058b5cb9b100 (diff)
downloadports-8924156e6bd6e8deb2461ed5e9e005fe8cda51fa.tar.gz
ports-8924156e6bd6e8deb2461ed5e9e005fe8cda51fa.zip
Notes
Diffstat (limited to 'www/coppermine/Makefile')
-rw-r--r--www/coppermine/Makefile83
1 files changed, 83 insertions, 0 deletions
diff --git a/www/coppermine/Makefile b/www/coppermine/Makefile
new file mode 100644
index 000000000000..3661598c488f
--- /dev/null
+++ b/www/coppermine/Makefile
@@ -0,0 +1,83 @@
+# Ports collection makefile for: coppermine
+# Date created: 05 April 2004
+# Whom: Brooks Davis <brooks@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= coppermine
+PORTVERSION= 1.2.1
+CATEGORIES= www
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= ${PORTNAME}
+DISTNAME= cpg${PORTVERSION}
+
+MAINTAINER= brooks@FreeBSD.org
+COMMENT= Coppermine is a web picture gallery script
+
+USE_PHP= yes
+WANT_PHP_MOD= yes
+USE_ZIP= yes
+
+PKGMESSAGE= ${WRKDIR}/pkg-message
+NO_BUILD= yes
+WRKSRC= ${WRKDIR}/${DISTNAME}_standalone
+DOCFILES= CHANGELOG
+EXCEPTFILES= ${DOCFILES} doc/COPYING
+CPIOARGS= --quiet -pdum -R
+PLIST_SUB= CPGDIR=${CPGDIR}
+
+pre-fetch:
+.if !defined(CPGDIR)
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "Define CPGDIR to override default of 'www/coppermine'."
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "You must either install PHP with GD support or ImageMagick."
+ @${ECHO_MSG} ""
+.endif
+
+pre-patch:
+ @${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \
+ -e 's|%%CPGDIR%%|${CPGDIR}|g' \
+ ${.CURDIR}/pkg-message > ${PKGMESSAGE}
+
+CPGDIR?= www/coppermine
+WWWOWN?= www
+WWWGRP?= www
+
+do-install:
+ @${MKDIR} -m 0755 ${PREFIX}/${CPGDIR}
+ @cd ${WRKSRC} && \
+ ${FIND} . -name \*.orig ${EXCEPTFILES:S/^/-o -name /} -o -print | \
+ ${CPIO} ${CPIOARGS} ${WWWOWN}:${WWWGRP} ${PREFIX}/${CPGDIR}
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ @cd ${WRKSRC} && ${INSTALL_DATA} ${DOCFILES} ${DOCSDIR}
+.endif
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+########################################################################
+# The following targets are for the port maintainer. Use are your own #
+# risk, no user-serviceable parts inside. #
+########################################################################
+# Assuming the port is installed cleanly (i.e. it's unconfigured)
+# build a pkg-plist file.
+build-plist:
+ ${FIND} ${DOCSDIR} -type f | \
+ ${SED} -e 's|${DOCSDIR}|%%PORTDOCS%%%%DOCSDIR%%|' | \
+ ${SORT} > pkg-plist
+ ${FIND} ${PREFIX}/${CPGDIR}/* -type f | \
+ ${SED} -e 's|${PREFIX}/${CPGDIR}|%%CPGDIR%%|' | \
+ ${SORT} >> pkg-plist
+ ${FIND} ${PREFIX}/${CPGDIR}/* -type d | \
+ ${SED} -e 's|${PREFIX}/${CPGDIR}|@dirrm %%CPGDIR%%|' | \
+ ${SORT} -r >> pkg-plist
+ ${FIND} ${DOCSDIR} -type d | \
+ ${SED} -e 's|${DOCSDIR}|%%PORTDOCS%%@dirrm %%DOCSDIR%%|' | \
+ ${SORT} -r >> pkg-plist
+ ${ECHO} "@unexec rmdir %D/%%CPGDIR%% 2>/dev/null || true" \
+ >> pkg-plist
+
+.include <bsd.port.mk>