aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2014-06-06 21:04:37 +0800
committermiwi <miwi@FreeBSD.org>2014-06-06 21:04:37 +0800
commite2a11c523d031de70e92f770b714c3e99a762528 (patch)
treef345d2473ed252b78464d29579ec862aa24efc2b /www
parentc5da8b2785089974415ba9e683d19f41d76cf8e0 (diff)
downloadfreebsd-ports-gnome-e2a11c523d031de70e92f770b714c3e99a762528.tar.gz
freebsd-ports-gnome-e2a11c523d031de70e92f770b714c3e99a762528.tar.zst
freebsd-ports-gnome-e2a11c523d031de70e92f770b714c3e99a762528.zip
- Stage support
PR: 190377
Diffstat (limited to 'www')
-rw-r--r--www/py-webware/Makefile22
-rw-r--r--www/py-webware/pkg-install11
-rw-r--r--www/py-webware/pkg-plist1
3 files changed, 14 insertions, 20 deletions
diff --git a/www/py-webware/Makefile b/www/py-webware/Makefile
index 5f6e4ed8cdf2..706010ab140c 100644
--- a/www/py-webware/Makefile
+++ b/www/py-webware/Makefile
@@ -18,6 +18,8 @@ NO_BUILD= yes
WEBWARE_USER?= webkit
WEBWARE_GROUP?= ${WEBWARE_USER}
+USERS=${WEBWARE_USER}
+GROUPS=${WEBWARE_GROUP}
WEBWARE_MASTER_DIR?=${PREFIX}/share/webware
WEBKIT_HOME_DIR?=${PREFIX}/www/webkit
INSTALL_ENV= PKG_PREFIX=${PREFIX} \
@@ -30,7 +32,6 @@ INSTALL_ENV= PKG_PREFIX=${PREFIX} \
PLIST_SUB+= WEBWARE_MASTER_DIR=${WEBWARE_MASTER_DIR:S,^${PREFIX}/,,}
-NO_STAGE= yes
.include <bsd.port.pre.mk>
post-patch:
@@ -39,23 +40,22 @@ post-patch:
@${RM} ${WRKSRC}/WebKit/Adapters/mod_webkit2/Makefile.bak
@${RM} ${WRKSRC}/WebKit/Adapters/mod_webkit1/Makefile.bak
-pre-install:
- @ ${ECHO} '---> Making webware default user and its group'
- ${SETENV} ${INSTALL_ENV} ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
-
do-install:
- @${MKDIR} ${WEBWARE_MASTER_DIR}
- @${CP} -R ${WRKSRC}/* ${WEBWARE_MASTER_DIR}
+ @${MKDIR} ${STAGEDIR}${WEBWARE_MASTER_DIR}
+ @${CP} -R ${WRKSRC}/* ${STAGEDIR}${WEBWARE_MASTER_DIR}
@ ${ECHO} '---> Installing start/stop script'
+ @${MKDIR} ${STAGEDIR}${PREFIX}/etc/rc.d
${SED} -e "s|%%WEBKIT_HOME_DIR%%|${WEBKIT_HOME_DIR}|g" \
< ${FILESDIR}/webkit.sh.tmpl \
- > ${PREFIX}/etc/rc.d/webkit.sh-dist
- ${CHMOD} 755 ${PREFIX}/etc/rc.d/webkit.sh-dist && \
- ${CHOWN} root:wheel ${PREFIX}/etc/rc.d/webkit.sh-dist
+ > ${STAGEDIR}${PREFIX}/etc/rc.d/webkit.sh-dist
+ ${CHMOD} 755 ${STAGEDIR}${PREFIX}/etc/rc.d/webkit.sh-dist && \
+ ${CHOWN} root:wheel ${STAGEDIR}${PREFIX}/etc/rc.d/webkit.sh-dist
post-install:
@ ${ECHO} '---> Compiling Python files and making webkit home directory'
- ${SETENV} ${INSTALL_ENV} ${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
+ ${SETENV} ${INSTALL_ENV} STAGEDIR=${STAGEDIR} ${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
+ ${FIND} ${STAGEDIR} \( -name "*.pyc" -o -name "*.html" -o -name "*.cgi" -o -name "*.log" -o -name "*.py" \) -exec ${REINPLACE_CMD} -e "s|${STAGEDIR}||g" {} \;
+ ${FIND} ${STAGEDIR} -name "*.bak" -exec ${RM} {} \;
.include <bsd.port.post.mk>
diff --git a/www/py-webware/pkg-install b/www/py-webware/pkg-install
index 00e183254e6d..4a394909eb75 100644
--- a/www/py-webware/pkg-install
+++ b/www/py-webware/pkg-install
@@ -11,8 +11,8 @@ PATH=/bin:/usr/sbin:${LOCALBASE}/bin:
# set these if not provided by the Makefile
WEBWARE_USER=${WEBWARE_USER:-webkit}
WEBWARE_GROUP=${WEBWARE_USER:-webkit}
-WEBWARE_MASTER_DIR=${WEBWARE_MASTER_DIR:-${PKG_PREFIX}/share/webware}
-WEBKIT_HOME_DIR=${WEBKIT_HOME_DIR:-${PKG_PREFIX}/www/webkit}
+WEBWARE_MASTER_DIR=${STAGEDIR}${WEBWARE_MASTER_DIR:-${PKG_PREFIX}/share/webware}
+WEBKIT_HOME_DIR=${STAGEDIR}${WEBKIT_HOME_DIR:-${PKG_PREFIX}/www/webkit}
add_webkit_account()
{
@@ -56,13 +56,6 @@ make_webkit_home_dir()
# make application workdir for webkit user
${PYTHON} ${WEBWARE_MASTER_DIR}/bin/MakeAppWorkDir.py \
${WEBKIT_HOME_DIR}
- chown -R root:wheel ${WEBKIT_HOME_DIR}
- echo chown -R ${WEBWARE_USER}:${WEBWARE_GROUP} \
- ${WEBKIT_HOME_DIR}/Cache ${WEBKIT_HOME_DIR}/ErrorMsgs \
- ${WEBKIT_HOME_DIR}/Logs ${WEBKIT_HOME_DIR}/Sessions
- chown -R ${WEBWARE_USER}:${WEBWARE_GROUP} \
- ${WEBKIT_HOME_DIR}/Cache ${WEBKIT_HOME_DIR}/ErrorMsgs \
- ${WEBKIT_HOME_DIR}/Logs ${WEBKIT_HOME_DIR}/Sessions
fi
}
diff --git a/www/py-webware/pkg-plist b/www/py-webware/pkg-plist
index ebcfad74c048..486803962d3a 100644
--- a/www/py-webware/pkg-plist
+++ b/www/py-webware/pkg-plist
@@ -1826,6 +1826,7 @@ www/webkit/MyContext/__init__.py
www/webkit/WebKit.cgi
www/webkit/error404.html
www/webkit/webkit
+@exec chown -R webkit:webkit %D/www/webkit/Cache %D/www/webkit/Logs %D/www/webkit/ErrorMsgs %D/www/webkit/Sessions
@dirrm www/webkit/Cache
@dirrm www/webkit/Configs
@dirrm www/webkit/ErrorMsgs