Fix side effects of --sysconfdir bsd.port.mk change
o remove ignored CONFIGURE_ARGS+=--sysconfdir=/lib o add post-install step that calls the INSTALL script o add install script to copy the sample config file to /etc only if there is no existing config in /etc o add deinstall script to remind the user to remove /etc/enscript.conf o add patch to install config as /lib/enscript.cfg-sample even though the config dir is /etc o test installation and de-installation from source o test installation from package
This commit is contained in:
parent
45d04552e8
commit
401e992892
@ -1,9 +1,4 @@
|
||||
# OpenBSD makefile for: enscript
|
||||
# Version required: 1.6.1
|
||||
# Date created: 1998-Jul-21
|
||||
# Whom: marc@OpenBSD.ORG
|
||||
#
|
||||
# $OpenBSD: Makefile,v 1.2 1999/03/07 01:39:00 brad Exp $
|
||||
# $OpenBSD: Makefile,v 1.3 1999/04/03 09:12:57 marc Exp $
|
||||
#
|
||||
|
||||
DISTNAME= enscript-1.6.1
|
||||
@ -12,10 +7,12 @@ CATEGORIES= print
|
||||
MAINTAINER= marc@openbsd.org
|
||||
|
||||
MASTER_SITES= ${MASTER_SITE_GNU}
|
||||
MASTER_SITE_SUBDIR= enscript
|
||||
MASTER_SITE_SUBDIR= enscript
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/lib
|
||||
CONFIGURE_ARGS+= --with-media=Letter
|
||||
|
||||
post-install:
|
||||
@PREFIX="${PREFIX}" ${SH} ${PKGDIR}/INSTALL ${DISTNAME} POST-INSTALL
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
17
print/enscript/patches/patch-config-location
Normal file
17
print/enscript/patches/patch-config-location
Normal file
@ -0,0 +1,17 @@
|
||||
--- lib/Makefile.in.orig Wed Jul 1 02:28:28 1998
|
||||
+++ lib/Makefile.in Sat Apr 3 00:43:56 1999
|
||||
@@ -240,12 +240,8 @@
|
||||
all-local: enscript.cfg
|
||||
|
||||
install-data-local: enscript.cfg
|
||||
- $(top_srcdir)/mkinstalldirs $(sysconfdir)
|
||||
- if test -r $(sysconfdir)/enscript.cfg; then \
|
||||
- cp $(sysconfdir)/enscript.cfg $(sysconfdir)/enscript.cfg.old; \
|
||||
- else :; \
|
||||
- fi
|
||||
- $(INSTALL_DATA) enscript.cfg $(sysconfdir)/enscript.cfg
|
||||
+ $(top_srcdir)/mkinstalldirs $(libdir)
|
||||
+ $(INSTALL_DATA) enscript.cfg $(libdir)/enscript.cfg-sample
|
||||
|
||||
uninstall-local:
|
||||
rm -f $(sysconfdir)/enscript.cfg
|
13
print/enscript/pkg/DEINSTALL
Normal file
13
print/enscript/pkg/DEINSTALL
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
# $OpenBSD: DEINSTALL,v 1.1 1999/04/03 09:12:58 marc Exp $
|
||||
#
|
||||
# Pre/post-uninstallation setup of enscript
|
||||
|
||||
echo ""
|
||||
echo "** To completely deinstall the enscript package you need to perform"
|
||||
echo "** this steps as root:"
|
||||
echo "**"
|
||||
echo "** rm -rf /etc/enscript.cfg"
|
||||
echo ""
|
||||
|
||||
exit 0
|
50
print/enscript/pkg/INSTALL
Normal file
50
print/enscript/pkg/INSTALL
Normal file
@ -0,0 +1,50 @@
|
||||
#!/bin/sh
|
||||
# $OpenBSD: INSTALL,v 1.1 1999/04/03 09:12:58 marc Exp $
|
||||
#
|
||||
# Pre/post-installation setup of enscript
|
||||
|
||||
set -e
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
PREFIX=${PREFIX:-/usr/local}
|
||||
CONFIG_FILE=/etc/enscript.cfg
|
||||
CONFIG_SAMPLE=${PREFIX}/lib/enscript.cfg-sample
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# install the configuration files unless an existing configuration
|
||||
# is found in which case warn the user that it may need to be
|
||||
# updated.
|
||||
#
|
||||
do_configuration()
|
||||
{
|
||||
if [ ! -r ${CONFIG_SAMPLE} ]; then
|
||||
echo "-- Can't find configuration sample file: ${CONFIG_SAMPLE}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -r ${CONFIG_FILE} ]; then
|
||||
echo ""
|
||||
echo "** The file ${CONFIG_FILE} exists. Your existing configuration"
|
||||
echo "** has not been changed. You MAY need to update your"
|
||||
echo "** configuration. See the current configuration sample file"
|
||||
echo "** ${CONFIG_SAMPLE}."
|
||||
echo ""
|
||||
else
|
||||
cp ${CONFIG_SAMPLE} ${CONFIG_FILE}
|
||||
fi
|
||||
}
|
||||
|
||||
case $2 in
|
||||
PRE-INSTALL)
|
||||
: nothing to pre-install for this port
|
||||
;;
|
||||
POST-INSTALL)
|
||||
do_configuration
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
@ -8,7 +8,7 @@ man/man1/diffpp.1
|
||||
man/man1/sliceprint.1
|
||||
man/man1/states.1
|
||||
man/man1/enscript.1
|
||||
lib/enscript.cfg
|
||||
lib/enscript.cfg-sample
|
||||
share/locale/de/LC_MESSAGES/enscript.mo
|
||||
share/locale/fr/LC_MESSAGES/enscript.mo
|
||||
share/locale/nl/LC_MESSAGES/enscript.mo
|
||||
|
Loading…
x
Reference in New Issue
Block a user