1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

Stage www/foswiki

PR:		190083
Submitted by:	Joe (thralling.com)
Tons of TLC:	marino
This commit is contained in:
John Marino 2014-08-06 23:02:16 +00:00
parent 324aa7ffa9
commit 779a7f0c6f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=364229
4 changed files with 28 additions and 70 deletions

View File

@ -9,13 +9,13 @@ DISTNAME= Foswiki-${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Free and open source enterprise wiki
LICENSE= GPLv2
RUN_DEPENDS= p5-Error>=0.15:${PORTSDIR}/lang/p5-Error \
p5-Algorithm-Diff>=1.1901:${PORTSDIR}/devel/p5-Algorithm-Diff \
p5-Text-Diff>=0.35:${PORTSDIR}/textproc/p5-Text-Diff \
p5-Sort-Maker>=0.06:${PORTSDIR}/devel/p5-Sort-Maker
LICENSE= GPLv2
USES= perl5 tar:tgz
NO_BUILD= yes
@ -25,7 +25,6 @@ OPTINT_DESC= Install Perl modules for intl character support
OPTOTH_DESC= Install other optional Perl modules
APACHE_DESC= Install Apache web server and sample config file
NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MOPTINT}
@ -52,8 +51,6 @@ PLIST_SUB+= NOAPACHE=""
PKGMESSAGE= pkg-message-apache
SUB_FILES+= pkg-message-apache
.include <bsd.port.pre.mk>
CONFDIR_REL= ${APACHEETCDIR}/Includes
CONFDIR= ${PREFIX}/${CONFDIR_REL}
@ -64,14 +61,13 @@ PLIST_SUB+= CONFDIR=${CONFDIR_REL}
# the include performed after the USE_APACHE variable is set so
# APACHE_VERSION can be tested above.
.include <bsd.port.pre.mk>
PLIST_SUB+= NOAPACHE="@comment "
PKGMESSAGE= pkg-message-noapache
SUB_FILES+= pkg-message-noapache
.endif
SUB_FILES+= LocalSite.cfg
PLIST_SUB+= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
post-patch:
@${RM} -rf ${WRKSRC}/lib/CPAN
@ -96,9 +92,10 @@ post-patch:
post-install:
.if ${PORT_OPTIONS:MAPACHE}
@if [ -d "${CONFDIR}" ]; then \
@${MKDIR} ${STAGEDIR}${CONFDIR}
@if [ -d "${STAGEDIR}${CONFDIR}" ]; then \
${INSTALL_DATA} ${WRKSRC}/foswiki_httpd_conf.txt \
${CONFDIR}/foswiki.conf.sample; \
${STAGEDIR}${CONFDIR}/foswiki.conf.sample; \
else \
${ECHO_MSG} "" ; \
${ECHO_MSG} "Please check your Apache installation -" ; \
@ -108,7 +105,6 @@ post-install:
${FALSE} ; \
fi
.endif
@${CAT} ${PKGMESSAGE}
.include "${.CURDIR}/bsd.foswiki.mk"
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -15,7 +15,7 @@
PORTVERSION?= 0.0.${SVNREV}
.if ${PORTNAME} == foswiki
.if ${.TARGETS} == make-port
PNAME=
PNAME=
.else
PNAME= core
.endif
@ -40,7 +40,6 @@ PLIST_SUB+= FWDIR=${FWDIR:S|^${PREFIX}/||}
SUB_LIST+= FWDIR=${FWDIR} FIND=${FIND} CHMOD=${CHMOD} CHOWN=${CHOWN} \
TOUCH=${TOUCH} WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} \
CONFDIR=${CONFDIR}
SUB_FILES+= pkg-install
MAINTAINER?= glarkin@FreeBSD.org
RUN_DEPENDS+= ${FWDEP:C/([^=<>]*)([=<>]*)(.*)/foswiki-\1\20.0.\3:${PORTSDIR}\/www\/foswiki-\1/}
@ -60,12 +59,11 @@ create-plist: extract
@${ECHO_CMD} '@dirrm %%FWDIR%%' >> ${PLIST}
do-install:
@${INSTALL} -d ${FWDIR}/
@cd ${WRKSRC}/ && ${COPYTREE_SHARE} . ${FWDIR}/
@${INSTALL} -d ${STAGEDIR}${FWDIR}/
@cd ${WRKSRC}/ && ${COPYTREE_SHARE} . ${STAGEDIR}${FWDIR}/
.if ${PORTNAME} == foswiki
@${INSTALL_DATA} ${WRKDIR}/LocalSite.cfg ${WWWDIR}/lib
@${INSTALL_DATA} ${WRKDIR}/LocalSite.cfg ${STAGEDIR}${WWWDIR}/lib/LocalSite.cfg.sample
.endif
${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
make-fwdep: extract
@echo "FWDEP=`grep -v ^# ${WRKSRC}/lib/*[wW]iki/*/${PORTNAME}/DEPENDENCIES |\
@ -124,4 +122,5 @@ make-port:
sed -E 's|.+[wW]iki:Main[./]||g;s|^|Author: |;s| | |g;s| $$||;\
s|([a-z]) |\1, |;s|([a-z])([A-Z])|\1 \2|g' >> pkg-descr &&\
echo "WWW: http://www.foswiki.org/Support/$$nnam" >> pkg-descr;\
done

View File

@ -1,50 +0,0 @@
#!/bin/sh
#
# $FreeBSD$
#
WWWDIR=%%WWWDIR%%
FIND=%%FIND%%
CHMOD=%%CHMOD%%
CHOWN=%%CHOWN%%
TOUCH=%%TOUCH%%
WWWOWN=%%WWWOWN%%
WWWGRP=%%WWWGRP%%
case $2 in
PRE-INSTALL)
;;
POST-INSTALL)
cd ${WWWDIR}/
${FIND} . -type d -print -exec ${CHMOD} 755 {} \;
${FIND} data -name '*.txt' -type f -exec ${CHMOD} 644 {} \;
${FIND} data pub -name '*,v' -type f -exec ${CHMOD} 444 {} \;
${FIND} lib -type f -exec ${CHMOD} 444 {} \;
${FIND} locale -type f -exec ${CHMOD} 444 {} \;
${FIND} pub -type f -exec ${CHMOD} 644 {} \;
${FIND} bin -type f -exec ${CHMOD} 555 {} \;
${FIND} templates -type f -exec ${CHMOD} 444 {} \;
${FIND} tools -type f -exec ${CHMOD} 555 {} \;
${TOUCH} data/.htpasswd
${CHMOD} 644 data/.htpasswd
${CHMOD} 644 data/mime.types
${CHMOD} 644 bin/LocalLib.cfg.txt bin/.htaccess.txt
${CHMOD} 444 bin/setlib.cfg
${CHMOD} 644 lib/LocalSite.cfg
${CHMOD} 444 tools/extender.pl
${CHMOD} 444 working/tmp/README working/README \
working/registration_approvals/README \
working/work_areas/README
${CHMOD} 660 working/.htaccess
${CHMOD} 444 AUTHORS COPYING COPYRIGHT index.html \
INSTALL.html LICENSE pub-htaccess.txt readme.txt \
robots.txt root-htaccess.txt subdir-htaccess.txt \
foswiki_httpd_conf.txt ReleaseNotes01x01.html
${CHOWN} -R ${WWWOWN}:${WWWGRP} .
;;
*)
echo "Unexpected Argument $2!!!"
exit 1
;;
esac
exit 0

View File

@ -1,4 +1,6 @@
%%NOAPACHE%%%%CONFDIR%%/foswiki.conf.sample
%%NOAPACHE%%@sample %%CONFDIR%%/foswiki.conf.sample
@owner %%WWWOWN%%
@group %%WWWGRP%%
%%WWWDIR%%/AUTHORS
%%WWWDIR%%/COPYING
%%WWWDIR%%/COPYRIGHT
@ -10,6 +12,7 @@
%%WWWDIR%%/bin/.htaccess.txt
%%WWWDIR%%/bin/LocalLib.cfg
%%WWWDIR%%/bin/LocalLib.cfg.txt
@mode 555
%%WWWDIR%%/bin/attach
%%WWWDIR%%/bin/changes
%%WWWDIR%%/bin/compare
@ -38,7 +41,10 @@
%%WWWDIR%%/bin/viewauth
%%WWWDIR%%/bin/viewfile
%%WWWDIR%%/bin/viewfileauth
@mode 444
@unexec if [ ! -s %%WWWDIR%%/data/.htpasswd ]; then rm -f %D/%%WWWDIR%%/data/.htpasswd; fi
%%WWWDIR%%/data/Sandbox/CompareRevisionsAddOnDemoTopic.txt,v
@mode 644
%%WWWDIR%%/data/Main/AdminGroup.txt
%%WWWDIR%%/data/Main/AdminUser.txt
%%WWWDIR%%/data/Main/AdminUserLeftBar.txt
@ -73,7 +79,6 @@
%%WWWDIR%%/data/Sandbox/CommentPluginExamples.txt
%%WWWDIR%%/data/Sandbox/CommentPluginTemplateExample.txt
%%WWWDIR%%/data/Sandbox/CompareRevisionsAddOnDemoTopic.txt
%%WWWDIR%%/data/Sandbox/CompareRevisionsAddOnDemoTopic.txt,v
%%WWWDIR%%/data/Sandbox/PluginTestEmptyPlugin.txt
%%WWWDIR%%/data/Sandbox/WebAtom.txt
%%WWWDIR%%/data/Sandbox/WebChanges.txt
@ -617,9 +622,12 @@
%%WWWDIR%%/data/_default/WebSearchAdvanced.txt
%%WWWDIR%%/data/_default/WebTopicList.txt
%%WWWDIR%%/data/_empty/WebPreferences.txt
@mode 644
%%WWWDIR%%/data/mime.types
@mode
%%WWWDIR%%/foswiki_httpd_conf.txt
%%WWWDIR%%/index.html
@mode 444
%%WWWDIR%%/lib/Assert.pm
%%WWWDIR%%/lib/Foswiki.pm
%%WWWDIR%%/lib/Foswiki.spec
@ -1141,7 +1149,7 @@
%%WWWDIR%%/lib/Foswiki/Validation.pm
%%WWWDIR%%/lib/Foswiki/ValidationException.pm
%%WWWDIR%%/lib/Foswiki/WebFilter.pm
@unexec if [ "`md5 -q %D/%%WWWDIR%%/lib/LocalSite.cfg`" = "c648a70f925757e7e982a5a13d47cfe7" ]; then rm -f %D/%%WWWDIR%%/lib/LocalSite.cfg; fi
%%WWWDIR%%/lib/LocalSite.cfg.sample
%%WWWDIR%%/lib/MANIFEST
%%WWWDIR%%/lib/Monitor.pm
%%WWWDIR%%/lib/TWiki.pm
@ -1181,6 +1189,7 @@
%%WWWDIR%%/locale/uk.po
%%WWWDIR%%/locale/zh-cn.po
%%WWWDIR%%/locale/zh-tw.po
@mode 644
%%WWWDIR%%/pub-htaccess.txt
%%WWWDIR%%/pub/System/BeginnersStartHere/BT_logo.gif
%%WWWDIR%%/pub/System/BeginnersStartHere/Disney_logo.gif
@ -5999,10 +6008,12 @@
%%WWWDIR%%/pub/System/WabiSabi/wabisabi.gif
%%WWWDIR%%/pub/System/WindowsInstallCookbook/cygwin-icon.gif
%%WWWDIR%%/pub/System/WysiwygPlugin/wikiringlogo20x20.png
@mode
%%WWWDIR%%/readme.txt
%%WWWDIR%%/robots.txt
%%WWWDIR%%/root-htaccess.txt
%%WWWDIR%%/subdir-htaccess.txt
@mode 444
%%WWWDIR%%/templates/attachtables.pattern01x00.tmpl
%%WWWDIR%%/templates/backlinks.pattern01x00.tmpl
%%WWWDIR%%/templates/foswiki.pattern01x00.tmpl
@ -6119,6 +6130,7 @@
%%WWWDIR%%/templates/viewsidebar.pattern.tmpl
%%WWWDIR%%/templates/viewtopbar.pattern.tmpl
%%WWWDIR%%/templates/viewtopicactionbuttons.tmpl
@mode 555
%%WWWDIR%%/tools/dependencies_installer.pl
%%WWWDIR%%/tools/extender.pl
%%WWWDIR%%/tools/extension_installer
@ -6133,6 +6145,7 @@
%%WWWDIR%%/tools/tml2html.pl
%%WWWDIR%%/tools/upgrade_emails.pl
%%WWWDIR%%/tools/yuicompressor.jar
@mode
%%WWWDIR%%/working/.htaccess
%%WWWDIR%%/working/README
%%WWWDIR%%/working/logs/README