diff options
author | itetcu <itetcu@FreeBSD.org> | 2007-10-21 18:39:39 +0800 |
---|---|---|
committer | itetcu <itetcu@FreeBSD.org> | 2007-10-21 18:39:39 +0800 |
commit | 5fc937a962a4f20e4f6623bb11bb43cc6f6b05a4 (patch) | |
tree | 74a3a93541412b044d23ba147abe43216f917363 /sysutils/apcupsd | |
parent | 5e736e8a175447d9346608a51454cb43e219abae (diff) | |
download | freebsd-ports-gnome-5fc937a962a4f20e4f6623bb11bb43cc6f6b05a4.tar.gz freebsd-ports-gnome-5fc937a962a4f20e4f6623bb11bb43cc6f6b05a4.tar.zst freebsd-ports-gnome-5fc937a962a4f20e4f6623bb11bb43cc6f6b05a4.zip |
- Update to 3.14.2
- Now the port build depends on devel/makedepend
- Utilize ETCDIR for Makefile and pkg-plist
- Move pkg-message to FILESDIR
- No need to use USE_GETTEXT=yes, because port doesn't install any mo files
and --enable-nls option doesn't help. With --with-included-gettext apcupsd
doesn't build.
PR: ports/116774
Submitted by: Alexander Logvinov
Diffstat (limited to 'sysutils/apcupsd')
-rw-r--r-- | sysutils/apcupsd/Makefile | 27 | ||||
-rw-r--r-- | sysutils/apcupsd/distinfo | 6 | ||||
-rw-r--r-- | sysutils/apcupsd/files/apcupsd.in | 2 | ||||
-rw-r--r-- | sysutils/apcupsd/files/pkg-message.in (renamed from sysutils/apcupsd/pkg-message) | 6 | ||||
-rw-r--r-- | sysutils/apcupsd/pkg-plist | 40 |
5 files changed, 42 insertions, 39 deletions
diff --git a/sysutils/apcupsd/Makefile b/sysutils/apcupsd/Makefile index 1cdd5ed66a72..e94e9f1affea 100644 --- a/sysutils/apcupsd/Makefile +++ b/sysutils/apcupsd/Makefile @@ -6,7 +6,7 @@ # PORTNAME= apcupsd -PORTVERSION= 3.14.1 +PORTVERSION= 3.14.2 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:S/$/:src_sf/g} \ http://sce-tindy.tecnik93.com/FreeBSD/ports/${PORTNAME}/sources/:src_bk \ @@ -21,14 +21,16 @@ IGNOREFILES= ${PORTNAME}.pdf MAINTAINER= itetcu@FreeBSD.org COMMENT= A daemon for controlling APC UPS -USE_GETTEXT= yes +BUILD_DEPENDS= makedepend:${PORTSDIR}/devel/makedepend + USE_RC_SUBR= apcupsd +SUB_FILES= pkg-message GNU_CONFIGURE= yes CONFIGURE_ARGS= --sbindir=${PREFIX}/sbin \ --with-nologin=/var/run \ --disable-install-distdir \ - --sysconfdir=${PREFIX}/etc/apcupsd \ + --sysconfdir=${ETCDIR} \ --with-serial-dev=/dev/usv CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -L${LOCALBASE}/lib" \ @@ -51,7 +53,7 @@ CONFIGURE_ARGS+= --enable-net .endif .if defined(WITH_CGI) -CONFIGURE_ARGS+= --enable-cgi --with-cgi-bin=${PREFIX}/etc/apcupsd/cgi +CONFIGURE_ARGS+= --enable-cgi --with-cgi-bin=${ETCDIR}/cgi LIB_DEPENDS+= gd.4:${PORTSDIR}/graphics/gd PLIST_SUB+= CGI="" .else @@ -79,21 +81,21 @@ post-install: # the package list. So the port could be removed without problems for na in apccontrol commfailure mainsback mastertimeout \ changeme commok masterconnect onbattery; do \ - if [ -f ${PREFIX}/etc/apcupsd/$$na.orig ]; then \ - if cmp -s ${PREFIX}/etc/apcupsd/$$na ${PREFIX}/etc/apcupsd/$$na.orig; then \ - ${ECHO_CMD} "etc/apcupsd/$$na.orig" >> ${TMPPLIST}; \ + if [ -f ${ETCDIR}/$$na.orig ]; then \ + if cmp -s ${ETCDIR}/$$na ${ETCDIR}/$$na.orig; then \ + ${ECHO_CMD} "%%ETCDIR%%/$$na.orig" >> ${TMPPLIST}; \ fi \ fi; \ done - @${ECHO_CMD} "@unexec if [ -d %D/etc/apcupsd ]; then ${ECHO_CMD} \"If you are permanently removing this port, you should do a ``rm -rf ${PREFIX}/etc/apcupsd`` to remove config files left.\" | ${FMT} ; fi" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec if [ -d %D/${ETCDIR_REL} ]; then ${ECHO_CMD} \"If you are permanently removing this port, you should do a ``rm -rf ${ETCDIR}`` to remove config files left.\" | ${FMT} ; fi" >> ${TMPPLIST} # Install sample startup script # If there is already a config file it is installed as ...new for na in apcupsd.conf apcupsd.css hosts.conf multimon.conf; do \ - if [ -f ${PREFIX}/etc/apcupsd/$$na ]; then \ - if [ -f ${PREFIX}/etc/apcupsd/$$na.new ]; then \ - ${MV} ${PREFIX}/etc/apcupsd/$$na.new ${PREFIX}/etc/apcupsd/$$na.sample; \ + if [ -f ${ETCDIR}/$$na ]; then \ + if [ -f ${ETCDIR}/$$na.new ]; then \ + ${MV} ${ETCDIR}/$$na.new ${ETCDIR}/$$na.sample; \ else \ - ${CP} ${PREFIX}/etc/apcupsd/$$na ${PREFIX}/etc/apcupsd/$$na.sample; \ + ${CP} ${ETCDIR}/$$na ${ETCDIR}/$$na.sample; \ fi; \ fi; \ done @@ -101,5 +103,6 @@ post-install: @${MKDIR} ${DOCSDIR} cd ${DISTDIR} && ${INSTALL_DATA} ${PORTNAME}.pdf ${DOCSDIR} .endif + @${CAT} ${PKGMESSAGE} .include <bsd.port.post.mk> diff --git a/sysutils/apcupsd/distinfo b/sysutils/apcupsd/distinfo index 7224c63b9faa..374e637e5dbf 100644 --- a/sysutils/apcupsd/distinfo +++ b/sysutils/apcupsd/distinfo @@ -1,5 +1,5 @@ -MD5 (apcupsd-3.14.1.tar.gz) = 258eb7515a12de493bb8952bc6d2f4e1 -SHA256 (apcupsd-3.14.1.tar.gz) = 3d68ce2c387194a8d6d2afae40dbaa0c02a87992ac1bdbd2495b1b610266c123 -SIZE (apcupsd-3.14.1.tar.gz) = 4352400 +MD5 (apcupsd-3.14.2.tar.gz) = fd8785e7607d20cefa68dc20e44eebc4 +SHA256 (apcupsd-3.14.2.tar.gz) = 72605e54356ffe32dc24159b4094a5b7e5e978d2440edded8b01496af9caca50 +SIZE (apcupsd-3.14.2.tar.gz) = 4345034 MD5 (apcupsd.pdf) = IGNORE SHA256 (apcupsd.pdf) = IGNORE diff --git a/sysutils/apcupsd/files/apcupsd.in b/sysutils/apcupsd/files/apcupsd.in index 0f82cfb9e4a2..09f6cee2a6b0 100644 --- a/sysutils/apcupsd/files/apcupsd.in +++ b/sysutils/apcupsd/files/apcupsd.in @@ -28,7 +28,7 @@ load_rc_config $name : ${apcupsd_lockfile="/var/spool/lock/apcupsd.lock"} pidfile="/var/run/apcupsd.pid" -required_files="%%PREFIX%%/etc/apcupsd/apcupsd.conf" +required_files="%%ETCDIR%%/apcupsd.conf" command="%%PREFIX%%/sbin/apcupsd" run_rc_command "$1" diff --git a/sysutils/apcupsd/pkg-message b/sysutils/apcupsd/files/pkg-message.in index 5e9629f52a54..ad709025e578 100644 --- a/sysutils/apcupsd/pkg-message +++ b/sysutils/apcupsd/files/pkg-message.in @@ -1,14 +1,14 @@ ********************************************************************** Read the manual - ${PREFIX}/share/doc/apcupsd/manual.pdf + %%DOCSDIR%%/manual.pdf to do site specific configuration assigenments! Especially have a detailed look into the chapter describing the shutdown procedure. -Sample files are installed in ${PREFIX}/etc/apcupsd. These files +Sample files are installed in %%ETCDIR%%. These files must be copied and/or configured for a proper working apcupsd. -You need to modify ${PREFIX}/etc/apcupsd/apcupsd.conf as follows: +You need to modify %%ETCDIR%%/apcupsd.conf as follows: For serial cable: DEVICE /dev/cuadX (or /dev/cuaaX for [45.]x) For USB cable: DEVICE (yes, leave it blank after DEVICE) diff --git a/sysutils/apcupsd/pkg-plist b/sysutils/apcupsd/pkg-plist index 02253d04466d..a520a0e81f68 100644 --- a/sysutils/apcupsd/pkg-plist +++ b/sysutils/apcupsd/pkg-plist @@ -3,23 +3,23 @@ sbin/apcaccess sbin/apctest sbin/smtp %%POWERFL%%sbin/powerflute -@unexec if cmp -s %D/etc/apcupsd/apcupsd.conf.sample %D/etc/apcupsd/apcupsd.conf; then rm -f %D/etc/apcupsd/apcupsd.conf; fi -etc/apcupsd/apcupsd.conf.sample -etc/apcupsd/apccontrol -etc/apcupsd/changeme -etc/apcupsd/commfailure -etc/apcupsd/commok -etc/apcupsd/onbattery -etc/apcupsd/offbattery -%%CGI%%@unexec if cmp -s %D/etc/apcupsd/apcupsd.css.sample %D/etc/apcupsd/apcupsd.css; then rm -f %D/etc/apcupsd/apcupsd.css; fi -%%CGI%%etc/apcupsd/apcupsd.css.sample -%%CGI%%@unexec if cmp -s %D/etc/apcupsd/hosts.conf.sample %D/etc/apcupsd/hosts.conf; then rm -f %D/etc/apcupsd/hosts.conf; fi -%%CGI%%etc/apcupsd/hosts.conf.sample -%%CGI%%@unexec if cmp -s %D/etc/apcupsd/multimon.conf.sample %D/etc/apcupsd/multimon.conf; then rm -f %D/etc/apcupsd/multimon.conf; fi -%%CGI%%etc/apcupsd/multimon.conf.sample -%%CGI%%etc/apcupsd/cgi/multimon.cgi -%%CGI%%etc/apcupsd/cgi/upsfstats.cgi -%%CGI%%etc/apcupsd/cgi/upsimage.cgi -%%CGI%%etc/apcupsd/cgi/upsstats.cgi -%%CGI%%@dirrm etc/apcupsd/cgi -@dirrmtry etc/apcupsd +@unexec if cmp -s %D/%%ETCDIR%%/apcupsd.conf.sample %D/%%ETCDIR%%/apcupsd.conf; then rm -f %D/%%ETCDIR%%/apcupsd.conf; fi +%%ETCDIR%%/apcupsd.conf.sample +%%ETCDIR%%/apccontrol +%%ETCDIR%%/changeme +%%ETCDIR%%/commfailure +%%ETCDIR%%/commok +%%ETCDIR%%/onbattery +%%ETCDIR%%/offbattery +%%CGI%%@unexec if cmp -s %D/%%ETCDIR%%/apcupsd.css.sample %D/%%ETCDIR%%/apcupsd.css; then rm -f %D/%%ETCDIR%%/apcupsd.css; fi +%%CGI%%%%ETCDIR%%/apcupsd.css.sample +%%CGI%%@unexec if cmp -s %D/%%ETCDIR%%/hosts.conf.sample %D/%%ETCDIR%%/hosts.conf; then rm -f %D/%%ETCDIR%%/hosts.conf; fi +%%CGI%%%%ETCDIR%%/hosts.conf.sample +%%CGI%%@unexec if cmp -s %D/%%ETCDIR%%/multimon.conf.sample %D/%%ETCDIR%%/multimon.conf; then rm -f %D/%%ETCDIR%%/multimon.conf; fi +%%CGI%%%%ETCDIR%%/multimon.conf.sample +%%CGI%%%%ETCDIR%%/cgi/multimon.cgi +%%CGI%%%%ETCDIR%%/cgi/upsfstats.cgi +%%CGI%%%%ETCDIR%%/cgi/upsimage.cgi +%%CGI%%%%ETCDIR%%/cgi/upsstats.cgi +%%CGI%%@dirrm %%ETCDIR%%/cgi +@dirrmtry %%ETCDIR%% |