pkgsrc/www/geeklog/Makefile
taca 6d2698e886 Update geeklog package from 1.4.1nb4 to 1.5.2.4 (1.5.2sr4).
pkgsrc changes: overhaul this package.

	* Add LICENSE.
	* Clean up bmake's macros, such as addition of PRINT_PLIST_AWK.

Geeklog changes: too many chagnes to write here.

	* New user-friendly installation.
	* New Configuration GUI.
	* New Webservice GUI.
	* And more.

	Please refer http://www.geeklog.net/docs/english/changes.html
	for more information.

Fixed some security problems about SQL injection vulnerability.
2009-05-26 14:19:29 +00:00

128 lines
3.9 KiB
Makefile

# $NetBSD: Makefile,v 1.22 2009/05/26 14:19:29 taca Exp $
#
DISTNAME= geeklog-${VER}
PKGNAME= geeklog-${VER:C/(sr|-)/./g}
CATEGORIES= www
MASTER_SITES= http://www.geeklog.net/filemgmt/upload_dir/
MAINTAINER= taca@NetBSD.org
HOMEPAGE= http://www.geeklog.net/
COMMENT= PHP/MySQL based application for managing dynamic web content
LICENSE= gnu-gpl-v2
PKG_DESTDIR_SUPPORT= user-destdir
PRIVILEGED_STAGES+= clean
DEPENDS+= ${APACHE_PKG_PREFIX}-${PHP_PKG_PREFIX}>=4.3.3:../../www/ap-php
DEPENDS+= ${PHP_PKG_PREFIX}-mysql>=4.3.0:../../databases/php-mysql
USE_TOOLS+= pax
VER= 1.5.2sr4
NO_BUILD= YES
PKG_GROUPS_VARS+= APACHE_GROUP
BUILD_DEFS+= GEEKLOG_SITEBASE
CHECK_PERMS_SKIP= ${GEEKLOG_PUB}/backend ${GEEKLOG_PUB}/images/*
GL_SYS= emailgeeklogstories language plugins readme sql system
GL_TMPL_SUB= backend images/articles images/library images/topics \
images/userphotos
GL_CONF_FILES= db-config.php system/lib-custom.php
GL_CONF_PUB_FILES= public_html/siteconfig.php
CONF_FILES+= ${GL_EG}/geeklog.conf \
${PKG_SYSCONFDIR}/geeklog.conf
.for f in ${GL_CONF_FILES}
CONF_FILES_PERMS+= ${GL_EG}/${f:T} ${GEEKLOG_BASE}/${f} \
${BINOWN} ${APACHE_GROUP} 0660
.endfor
.for f in ${GL_CONF_PUB_FILES}
CONF_FILES_PERMS+= ${GL_EG}/${f:T} ${GEEKLOG_PUB}/${f:T} \
${BINOWN} ${APACHE_GROUP} 0660
.endfor
OWN_DIRS_PERMS+= ${GEEKLOG_BASE}/backups ${BINOWN} ${APACHE_GROUP} 0770 \
${GEEKLOG_BASE}/data ${BINOWN} ${APACHE_GROUP} 0770 \
${GEEKLOG_BASE}/logs ${BINOWN} ${APACHE_GROUP} 0775
OWN_DIRS+= ${GEEKLOG_PUB}
FILES_SUBST+= APACHE_GROUP=${APACHE_GROUP:Q} \
GEEKLOG_BASE=${GEEKLOG_BASE:Q} \
GL_EG=${GL_EG:Q} \
GEEKLOG_PUB=${GEEKLOG_PUB:Q} \
GL_ADMIN=${GL_ADMIN:Q} \
GL_TMPL_SUB=${GL_TMPL_SUB:Q} \
GL_TMPL=${GL_TMPL:Q} \
PAX=${PAX:Q}
PLIST_SUBST+= GEEKLOG_BASE=${GEEKLOG_BASE:Q} \
GEEKLOG_PUB=${GEEKLOG_PUB:Q} \
GL_ADMIN=${GL_ADMIN:Q} \
GL_TMPL=${GL_TMPL:Q} \
GL_DOC=${GL_DOC:Q} \
GL_EG=${GL_EG:Q}
.include "../../www/geeklog/Makefile.common"
PKG_SYSCONFSUBDIR?= geeklog
SUBST_CLASSES+= paths
SUBST_FILES.paths+= ${WRKDIR}/README
SUBST_FILES.paths+= ${WRKSRC}/emailgeeklogstories
SUBST_FILES.paths+= ${WRKSRC}/public_html/admin/install/index.php
SUBST_FILES.paths+= ${WRKDIR}/geeklog.conf
SUBST_SED.paths+= -e 's,@GEEKLOG_BASE@,${GEEKLOG_BASE:Q},g'
SUBST_SED.paths+= -e 's,@GEEKLOG_PUB@,${GEEKLOG_PUB:Q},g'
SUBST_SED.paths+= -e 's,@GEEKLOG_SITESUBDIR@,${GEEKLOG_SITESUBDIR:Q},g'
SUBST_SED.paths+= -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR:Q},g'
SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX:Q},g'
.if empty(GEEKLOG_SITEBASE)
SUBST_SED.conf+= -e '/^Alias/s,^,\#,'
.endif
SUBST_STAGE.paths= post-configure
INSTALLATION_DIRS= ${GEEKLOG_BASE} ${GEEKLOG_PUB} ${GL_TMPL}/images \
share/examples/geeklog ${GL_DOC} ${GL_EG}
post-extract:
${CP} ${FILESDIR}/README ${FILESDIR}/geeklog.conf ${WRKDIR}
pre-install:
${FIND} ${WRKSRC:Q} -type f -name "*.orig" -exec ${RM} -f {} \;
cd ${WRKSRC}/public_html; \
${FIND} ${GL_TMPL_SUB} -type f -exec ${CHMOD} -x {} \;
${CHMOD} 0664 ${WRKSRC}/public_html/backend/geeklog.rss
cd ${WRKSRC}/system; \
${FIND} pear -type f -exec ${CHMOD} 0644 {} \;
do-install:
${INSTALL_DATA} ${WRKDIR}/README ${DESTDIR}${PREFIX}/${GL_DOC}
.for f in ${GL_CONF_FILES} ${GL_CONF_PUB_FILES}
${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/${GL_EG}
${RM} ${WRKSRC}/${f}
.endfor
${INSTALL_DATA} ${WRKDIR}/geeklog.conf ${DESTDIR}${PREFIX}/${GL_EG}
.for f in ${GL_SYS}
cd ${WRKSRC}; pax -rw ${f} ${DESTDIR}${PREFIX}/${GEEKLOG_BASE}
.endfor
cd ${WRKSRC}/public_html; \
pax -rw admin ${DESTDIR}${PREFIX}/${GEEKLOG_BASE}; \
${RM} -rf admin
.for d in ${GL_TMPL_SUB}
cd ${WRKSRC}/public_html; \
if [ -d ${d} ]; then \
pax -rw ${d} ${DESTDIR}${PREFIX}/${GL_TMPL}; \
${RM} -rf ${d}; \
fi
.endfor
cd ${WRKSRC}/public_html; pax -rw . ${DESTDIR}${PREFIX}/${GEEKLOG_PUB}
.include "../../mk/apache.mk"
.include "../../lang/php/phpversion.mk"
.include "../../mk/bsd.pkg.mk"