diff options
author | billf <billf@FreeBSD.org> | 2000-03-21 01:20:00 +0000 |
---|---|---|
committer | billf <billf@FreeBSD.org> | 2000-03-21 01:20:00 +0000 |
commit | e8a6a409562bb90b07f77c0867af36942ea55645 (patch) | |
tree | 939f53731a9c28b1e548921e6dd34ff862110946 /www/apache13-fp/pkg-install | |
parent | d9c00bb32140f28cc47012fb6b60390915bd23b0 (diff) | |
download | FreeBSD-ports-e8a6a409562bb90b07f77c0867af36942ea55645.zip FreeBSD-ports-e8a6a409562bb90b07f77c0867af36942ea55645.tar.gz |
More packaging fixups from maintainer.
PR: ports/17139
Submitted by: maintainer
Diffstat (limited to 'www/apache13-fp/pkg-install')
-rw-r--r-- | www/apache13-fp/pkg-install | 75 |
1 files changed, 51 insertions, 24 deletions
diff --git a/www/apache13-fp/pkg-install b/www/apache13-fp/pkg-install index d2b43b8..943c41d 100644 --- a/www/apache13-fp/pkg-install +++ b/www/apache13-fp/pkg-install @@ -7,35 +7,50 @@ PKG_BATCH=${BATCH:=NO} PKG_PREFIX=${PKG_PREFIX} -AP_SHARE=${PKG_PREFIX}/share/doc/apache HOST_NAME=`/bin/hostname` + +AP_CGI=${PKG_PREFIX}/www/cgi-bin +AP_CONF=${PKG_PREFIX}/etc/apache AP_DATA=${PKG_PREFIX}/www/data +AP_SHARE=${PKG_PREFIX}/share/doc/apache + FPINSTALL=${PKG_PREFIX}/frontpage/version4.0/fp_install.sh CHANGESERVER=${PKG_PREFIX}/frontpage/version4.0/change_server.sh FPDOCDIR=${AP_SHARE}/manual/mod/mod_frontpage +IMAGES_DIR=${AP_SHARE}/manual/images IMAGES_VTI=${PKG_PREFIX}/www/data/images/_vti_cnf -HTTPD_CONF=${PKG_PREFIX}/etc/apache/httpd.conf create_apache_lang_doc () { - if [ ! -d ${AP_DATA} ]; then - /bin/mkdir -p ${AP_DATA} - fi - for lang in ca cz de dk ee en es fr it ja.jis lu nl po.iso-pl pt pt-br se { /bin/cat ${AP_SHARE}/index.html.${lang}-dist | \ - /usr/bin/sed -e 's;@@HOSTNAME@@;'${HOST_NAME}';' \ - > ${AP_SHARE}/index.html.${lang} - if [ ! -f ${AP_DATA}/index.html ] ; then - if [ ! -f ${AP_DATA}/index.html.${lang} ]; then - /bin/cp -rp ${AP_SHARE}/index.html.${lang} \ - ${AP_DATA}/index.html.${lang} - fi - fi + /usr/bin/sed -e 's;@@HOSTNAME@@;'${HOST_NAME}';' \ + > ${AP_SHARE}/index.html.${lang} } } +create_apache_doc_root () +{ + if [ ! -d ${AP_CGI} ]; then + /bin/cp -rp ${AP_CGI}.default ${AP_CGI} + fi + + if [ ! -d ${AP_DATA} ]; then + /bin/mkdir -p ${AP_DATA}/images + for file in apache_pb.gif fplogo.gif powerlogo.gif + { + /bin/cp -rp ${IMAGES_DIR}/${file} ${AP_DATA}/images + } + + for lang in ca cz de dk ee en es fr it ja.jis lu nl po.iso-pl pt pt-br se + { + /bin/cp -rp ${AP_SHARE}/index.html.${lang} \ + ${AP_DATA}/index.html.${lang} + } + fi +} + fix_frontpage_scripts () { /bin/cat ${FPINSTALL}-dist | \ @@ -51,24 +66,35 @@ fix_frontpage_scripts () fix_httpd_conf () { - if [ ! -f ${HTTPD_CONF} ] ; then - /bin/cat ${HTTPD_CONF}.default | \ + if [ ! -f ${AP_CONF}/httpd.conf} ] ; then + /bin/cat ${AP_CONF}/httpd.conf.default | \ /usr/bin/sed -e 's;@@HOSTNAME@@;'${HOST_NAME}';' \ - > ${HTTPD_CONF} + > ${AP_CONF}/httpd.conf fi + + for file in mime.types magic srm.conf access.conf + { + if [ ! -f ${AP_CONF}/${file} ]; then + cp -rp ${AP_CONF}/${file}.default ${AP_CONF}/${file} + fi + } } + #Add the appropriate comment to the images/_vti_cnf file. comment_files () { - if [ -d ${IMAGES_VTI} ]; then \ - if [ ! "`grep description ${IMAGES_VTI}/apache_pb.gif`" ] ; then \ - /bin/echo "vti_description:SW|Apache Webserver" >> ${IMAGES_VTI}/apache_pb.gif ;\ + if [ -d ${IMAGES_VTI} ]; then + if [ -f ${IMAGES_VTI}/apache_pb.gif ] && \ + [ ! "`grep description ${IMAGES_VTI}/apache_pb.gif`" ] ; then + /bin/echo "vti_description:SW|Apache Webserver" >> ${IMAGES_VTI}/apache_pb.gif fi - if [ ! "`grep description ${IMAGES_VTI}/fplogo.gif`" ] ; then \ - /bin/echo "vti_description:SW|Created with Microsoft FrontPage 2000" >> ${IMAGES_VTI}/fplogo.gif ; \ + if [ -f ${IMAGES_VTI}/fplogo.gif ] && \ + [ ! "`grep description ${IMAGES_VTI}/fplogo.gif`" ] ; then + /bin/echo "vti_description:SW|Created with Microsoft FrontPage 2000" >> ${IMAGES_VTI}/fplogo.gif fi - if [ ! "`grep description ${IMAGES_VTI}/powerlogo.gif`" ] ; then \ - /bin/echo "vti_description:SW|Powered by FreeBSD" >> ${IMAGES_VTI}/powerlogo.gif ; \ + if [ -f ${IMAGES_VTI}/powerlogo.gif ] && \ + [ ! "`grep description ${IMAGES_VTI}/powerlogo.gif`" ] ; then + /bin/echo "vti_description:SW|Powered by FreeBSD" >> ${IMAGES_VTI}/powerlogo.gif fi fi } @@ -80,6 +106,7 @@ case $2 in # If we are not in batch mode then run the FP install script. if [ "${PKG_BATCH}" = "NO" ]; then create_apache_lang_doc + create_apache_doc_root fix_frontpage_scripts fix_httpd_conf ${FPINSTALL} |