diff --git a/sysutils/apc-upsd/Makefile b/sysutils/apc-upsd/Makefile index 8d3bcc76b5a..6021c9ccc63 100644 --- a/sysutils/apc-upsd/Makefile +++ b/sysutils/apc-upsd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.13 2002/10/28 19:53:43 naddy Exp $ +# $OpenBSD: Makefile,v 1.14 2003/04/26 15:00:32 sturm Exp $ COMMENT= "UPS software for APC UPS models" @@ -22,6 +22,9 @@ MAKE_FLAGS= CFLAGS="${CFLAGS}" NO_REGRESS= Yes +post-patch: + @perl -pi -e "s,%%SYSCONFDIR%%,${SYSCONFDIR}," ${WRKSRC}/apc_upsd.h + do-install: ${INSTALL_DATA_DIR} ${PREFIX}/lib/apc-upsd ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/apc-upsd diff --git a/sysutils/apc-upsd/patches/patch-apc_upsd_h b/sysutils/apc-upsd/patches/patch-apc_upsd_h new file mode 100644 index 00000000000..6912088295f --- /dev/null +++ b/sysutils/apc-upsd/patches/patch-apc_upsd_h @@ -0,0 +1,12 @@ +$OpenBSD: patch-apc_upsd_h,v 1.1 2003/04/26 15:00:32 sturm Exp $ +--- apc_upsd.h.orig Sat Apr 26 14:22:34 2003 ++++ apc_upsd.h Sat Apr 26 14:22:57 2003 +@@ -19,7 +19,7 @@ + + /* ---------------------------------------------------------------------- */ + +-#define UPS_DEFAULT_CONFIG_FILENAME "/etc/apc-upsd.conf" ++#define UPS_DEFAULT_CONFIG_FILENAME "%%SYSCONFDIR%%/apc-upsd.conf" + #define UPS_IDFILE "/var/run/apc-upsd.pid" + #define UPS_SCR "/sbin/halt" + diff --git a/sysutils/apc-upsd/pkg/DEINSTALL b/sysutils/apc-upsd/pkg/DEINSTALL index 5f4c8657c4b..6613413f9a4 100644 --- a/sysutils/apc-upsd/pkg/DEINSTALL +++ b/sysutils/apc-upsd/pkg/DEINSTALL @@ -1,12 +1,12 @@ #!/bin/sh -# $OpenBSD: DEINSTALL,v 1.1 2000/04/20 02:23:39 kevlo Exp $ +# $OpenBSD: DEINSTALL,v 1.2 2003/04/26 15:00:33 sturm Exp $ # # apc-upsd de-installation set -e PATH=/bin:/usr/bin:/sbin:/usr/sbin PREFIX=${PKG_PREFIX:-/usr/local} -APC_UPSD=/etc/apc-upsd.conf +APC_UPSD=${SYSCONFDIR}/apc-upsd.conf if [ -e ${APC_UPSD} ]; then echo diff --git a/sysutils/apc-upsd/pkg/INSTALL b/sysutils/apc-upsd/pkg/INSTALL index f952edb0d71..37e5b437cf4 100644 --- a/sysutils/apc-upsd/pkg/INSTALL +++ b/sysutils/apc-upsd/pkg/INSTALL @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: INSTALL,v 1.1 2000/04/20 02:23:39 kevlo Exp $ +# $OpenBSD: INSTALL,v 1.2 2003/04/26 15:00:33 sturm Exp $ # # Pre/post-installation setup of apc-upsd @@ -8,7 +8,7 @@ set -e PATH=/bin:/usr/bin:/sbin:/usr/sbin PREFIX=${PKG_PREFIX:-/usr/local} -APC_UPSD=/etc/apc-upsd.conf +APC_UPSD=${SYSCONFDIR}/apc-upsd.conf # Function: tell the user what s/he needs to do to use the port just installed # @@ -27,7 +27,7 @@ do_notice() # do_install() { - cp ${PREFIX}/lib/apc-upsd/apc-upsd.conf /etc + cp ${PREFIX}/lib/apc-upsd/apc-upsd.conf ${SYSCONFDIR} echo echo "+---------------" echo "| The file ${APC_UPSD} has been created on your system."