diff options
author | Thierry Thomas <thierry@FreeBSD.org> | 2004-04-16 10:59:29 +0000 |
---|---|---|
committer | Thierry Thomas <thierry@FreeBSD.org> | 2004-04-16 10:59:29 +0000 |
commit | c86ae035558890222a469226e8af9de157cb204d (patch) | |
tree | 282f3e28d5eaeb78a3742ab73d03760575d796f3 /french | |
parent | b6adcb2390d1f928b21dd97df57305fdd8740a9e (diff) | |
download | ports-c86ae035558890222a469226e8af9de157cb204d.tar.gz ports-c86ae035558890222a469226e8af9de157cb204d.zip |
Notes
Diffstat (limited to 'french')
-rw-r--r-- | french/facturier/Makefile | 29 | ||||
-rw-r--r-- | french/facturier/files/pkg-message.in (renamed from french/facturier/pkg-message) | 0 | ||||
-rw-r--r-- | french/facturier/pkg-deinstall | 20 | ||||
-rw-r--r-- | french/facturier/pkg-plist | 4 |
4 files changed, 34 insertions, 19 deletions
diff --git a/french/facturier/Makefile b/french/facturier/Makefile index 83dcd82c7a79..7ad124b47160 100644 --- a/french/facturier/Makefile +++ b/french/facturier/Makefile @@ -14,20 +14,23 @@ EXTRACT_SUFX= .tgz MAINTAINER= thierry@pompo.net COMMENT= Logiciel de facturation pour P.M.I. & P.M.E. -BUILD_DEPENDS= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/${APACHE_PORT} -RUN_DEPENDS= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/${APACHE_PORT} \ - ${LOCALBASE}/bin/htmldoc:${PORTSDIR}/textproc/htmldoc \ +RUN_DEPENDS= ${LOCALBASE}/bin/htmldoc:${PORTSDIR}/textproc/htmldoc \ ${PBASE}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/databases/p5-Mysql \ ${PBASE}/Tie/IxHash.pm:${PORTSDIR}/devel/p5-Tie-IxHash WRKSRC= ${WRKDIR}/${PORTNAME} NO_BUILD= yes +USE_APACHE= yes USE_PERL5_RUN= yes USE_REINPLACE= yes -APACHE_PORT?= www/apache13 -APACHE_CNFDIR?= ${LOCALBASE}/etc/apache +.if defined(WITH_APACHE2) +APACHE_CNFDIR= ${LOCALBASE}/etc/apache2 +.else +APACHE_CNFDIR= ${LOCALBASE}/etc/apache +.endif + APACHE_CONF= ${APACHE_CNFDIR}/httpd.conf PBASE= ${SITE_PERL} @@ -45,7 +48,9 @@ PLIST_SUB= FACT_REP=${LFACT_REP} SS_REPS= cgi-bin html lib log sql REINPLACE_ARGS= -i.beforeFacturier -DOCS= COPYING README.txt todo.txt +PORTDOCS= COPYING README.txt todo.txt + +PKGMESSAGE= ${WRKDIR}/pkg-message pre-everything:: @${ECHO_MSG} "" @@ -96,21 +101,23 @@ do-install: ${ECHO_CMD} "# Le Facturier's cgi-bin directory" >> ${APACHE_CONF} ; \ ${ECHO_CMD} "Include ${FACT_INC}" >> ${APACHE_CONF} ; \ fi) + .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} -.for FILE in ${DOCS} - @${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR} +.for doc in ${PORTDOCS} + @${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR} .endfor @${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}." .endif post-install: @${ECHO_MSG} - @${CAT} ${PKGMESSAGE} | \ - ${SED} -e "s:/usr/local/www/facturier:${FACT_REP}:" \ + @${SED} -e "s:/usr/local/www/facturier:${FACT_REP}:" \ -e "s:/usr/local/share/doc/facturier:${DOCSDIR}:" \ -e "s:%%DBOWN%%:${DBOWN}:;s:%%DBPWD%%:${DBPWD}:" \ - -e "s:%%DBSERV%%:${DBSERV}:" + -e "s:%%DBSERV%%:${DBSERV}:" \ + ${FILESDIR}/pkg-message.in > ${PKGMESSAGE} + @${CAT} ${PKGMESSAGE} @${ECHO_MSG} .include <bsd.port.mk> diff --git a/french/facturier/pkg-message b/french/facturier/files/pkg-message.in index 9c32592d00cc..9c32592d00cc 100644 --- a/french/facturier/pkg-message +++ b/french/facturier/files/pkg-message.in diff --git a/french/facturier/pkg-deinstall b/french/facturier/pkg-deinstall index 5e21f733ef5e..f1b568e043eb 100644 --- a/french/facturier/pkg-deinstall +++ b/french/facturier/pkg-deinstall @@ -8,12 +8,20 @@ if [ x$2 != xDEINSTALL ]; then exit fi -if [ -f ${PKG_PREFIX}/etc/apache/httpd.conf.beforeFacturier ] ; then +if [ -d ${PKG_PREFIX}/etc/apache2 ] ; then + AP_CNF=${PKG_PREFIX}/etc/apache2/httpd.conf +else + AP_CNF=${PKG_PREFIX}/etc/apache/httpd.conf +fi +if [ -f ${AP_CNF}.beforeFacturier ] ; then echo "Restoring httpd.conf..." - cp ${PKG_PREFIX}/etc/apache/httpd.conf ${PKG_PREFIX}/etc/apache/httpd.conf.deinstFacturier + cp ${AP_CNF} ${AP_CNF}.deinstFacturier sed -i.tmp -e "s:Include ${PKG_PREFIX}/etc/facturier:# Include ${PKG_PREFIX}/etc/facturier:" \ - ${PKG_PREFIX}/etc/apache/httpd.conf - rm ${PKG_PREFIX}/etc/apache/httpd.conf.tmp + ${AP_CNF} + rm ${AP_CNF}.tmp + if ! [ -z "${PACKAGE_BUILDING}" ]; then + rm ${AP_CNF}.deinstFacturier + fi fi # Backup Le Facturier's config files, if needed. @@ -34,4 +42,8 @@ if [ -z "${PACKAGE_BUILDING}" ]; then *) # not found? ;; esac +else + if [ -f ${AP_CNF}.beforeFacturier ] ; then + rm ${AP_CNF}.beforeFacturier + fi fi diff --git a/french/facturier/pkg-plist b/french/facturier/pkg-plist index 5e29c8ee4c03..f413583b9b99 100644 --- a/french/facturier/pkg-plist +++ b/french/facturier/pkg-plist @@ -1,7 +1,4 @@ etc/facturier/httpd.conf.facturier -%%PORTDOCS%%share/doc/facturier/COPYING -%%PORTDOCS%%share/doc/facturier/README.txt -%%PORTDOCS%%share/doc/facturier/todo.txt %%FACT_REP%%/cgi-bin/cherchcontact.cgi %%FACT_REP%%/cgi-bin/clientmodif.cgi %%FACT_REP%%/cgi-bin/clients.cgi @@ -320,7 +317,6 @@ etc/facturier/httpd.conf.facturier %%FACT_REP%%/sql/majpropal.sql %%FACT_REP%%/sql/majvers2_0tovers2_1.sql @dirrm etc/facturier -%%PORTDOCS%%@dirrm share/doc/facturier @dirrm %%FACT_REP%%/cgi-bin @dirrm %%FACT_REP%%/html/temp @dirrm %%FACT_REP%%/html/UNGI/lang |