1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00
freebsd-ports/www/dokuwiki/Makefile
2013-05-13 19:45:26 +00:00

57 lines
1.5 KiB
Makefile

# Created by: Chin-San Huang <chinsan@mail2000.com.tw>
# $FreeBSD$
PORTNAME= dokuwiki
PORTVERSION= ${DIST_VER:S/${PORTNAME}//:S/-//g}
CATEGORIES= www
MASTER_SITES= http://www.splitbrain.org/_media/projects/dokuwiki/ \
LOCAL/chinsan/${PORTNAME}
DISTNAME= ${DIST_VER}
EXTRACT_SUFX= .tgz
MAINTAINER= delphij@FreeBSD.org
COMMENT= A simple and easy to use wiki, no database required
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
DIST_VER= ${PORTNAME}-2013-05-10
USE_PHP= gd mbstring openssl pcre session xml zlib
NO_BUILD= YES
WANT_PHP_WEB= YES
DOKUWIKI_DIR?= www/${PORTNAME}
WRKSRC= ${WRKDIR}/${DIST_VER}
PLIST_SUB= DOKUWIKI_DIR=${DOKUWIKI_DIR}
TEMP_PLIST= ${WRKDIR}/temp-pkg-plist
SUB_FILES= pkg-message
SUB_LIST+= PORTNAME=${PORTNAME} DOKUWIKI_DIR=${DOKUWIKI_DIR}
REINPLACE_ARGS= -i ''
.include <bsd.port.pre.mk>
# This target is only meant to be used by the port maintainer.
x-generate-plist:
@cd ${WRKSRC} && ${FIND} -s . -type f | \
${SED} -e 's|^./||;s|^|%%DOKUWIKI_DIR%%/|' > ${TEMP_PLIST} \
&& ${FIND} -d * -type d | \
${SED} -e 's|^|@dirrm %%DOKUWIKI_DIR%%/|' >> ${TEMP_PLIST} \
&& ${ECHO_CMD} "@dirrmtry %%DOKUWIKI_DIR%%" >> ${TEMP_PLIST}
post-patch:
@${REINPLACE_CMD} -e 's|/usr/bin|${LOCALBASE}/bin|' ${WRKSRC}/bin/*.php
@${FIND} ${WRKSRC} -name '*.orig' -delete
@${RM} ${WRKSRC}/data/deleted.files
do-install:
# Data files
-${MKDIR} ${PREFIX}/${DOKUWIKI_DIR}
@${CP} -R ${WRKSRC}/ ${PREFIX}/${DOKUWIKI_DIR}
@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${DOKUWIKI_DIR}
post-install:
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>