aboutsummaryrefslogtreecommitdiffstats
path: root/french
diff options
context:
space:
mode:
authorthierry <thierry@FreeBSD.org>2004-04-16 18:59:29 +0800
committerthierry <thierry@FreeBSD.org>2004-04-16 18:59:29 +0800
commitad548b492c570dcc00bb990bfca61feb5921cc7a (patch)
tree74e729ebadc9d919a563b1c81687ba7a1eea390e /french
parentee060c14df4e7c8867aa7e3cf8a1017c6284c430 (diff)
downloadfreebsd-ports-gnome-ad548b492c570dcc00bb990bfca61feb5921cc7a.tar.gz
freebsd-ports-gnome-ad548b492c570dcc00bb990bfca61feb5921cc7a.tar.zst
freebsd-ports-gnome-ad548b492c570dcc00bb990bfca61feb5921cc7a.zip
Fix a deinstallation problem noted on dosirak
+ utilize USE_APACHE and let it run smoothly with Apache2 + utilize PORTDOCS + display a clean PKGMESSAGE when installing a package. Approved by: mat (mentor).
Diffstat (limited to 'french')
-rw-r--r--french/facturier/Makefile29
-rw-r--r--french/facturier/files/pkg-message.in (renamed from french/facturier/pkg-message)0
-rw-r--r--french/facturier/pkg-deinstall20
-rw-r--r--french/facturier/pkg-plist4
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