* Use variables instead of hardcoded prefixes.

* Take care to set a sane PATH.
* Add set -e
* Copy example files into ${PREFIX}/share/examples/PORTNAME.
* Replace PKGNAME with P_NAME in INSTALL/DEINSTALL scripts, unclear
  since it already exists in the Makefile with a different value.
* Change output of INSTALL/DEINSTALL to be more like other scripts
  found in the tree(suggested by heko@).
* Print correct names in DEINSTALL scripts(spotted by
  Aleksander Piotrowski <alek@piestrak.waw.pl>)

From maintainer Nils Nordman <nino@nforced.com>.
This commit is contained in:
naddy 2001-09-20 20:01:22 +00:00
parent f1102792d8
commit 940cbde1f9
4 changed files with 44 additions and 36 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.5 2001/09/20 18:39:13 naddy Exp $
# $OpenBSD: Makefile,v 1.6 2001/09/20 20:01:22 naddy Exp $
COMMENT= "Object Activation Framework for GNOME"
V= 0.6.5
@ -27,6 +27,7 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
post-install:
cp -r ${PREFIX}/../../etc/* ${PREFIX}/share/oaf/
@${INSTALL_DATA_DIR} ${PREFIX}/share/examples/oaf; \
cp -rp ${WRKINST}/${SYSCONFDIR}/* ${PREFIX}/share/examples/oaf/
.include <bsd.port.mk>

View File

@ -1,24 +1,27 @@
#!/bin/sh
#
# $OpenBSD: DEINSTALL,v 1.1.1.1 2001/09/13 20:23:11 todd Exp $
# $OpenBSD: DEINSTALL,v 1.2 2001/09/20 20:01:22 naddy Exp $
#
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
echo
echo "*=================[ $1"
echo "* To really remove $1 from your system you should also"
echo "* remove the configuration files from the /etc directory."
echo "* If you are planning on installing $1 again in the future"
echo "* you can leave it as it is."
echo "*"
echo "* FYI, the following configuration files belongs to this package:"
echo "*"
echo "+--------------- $1"
echo "| To really remove $1 from your system you should also"
echo "| remove the configuration files from the ${SYSCONFDIR} directory."
echo "| If you are planning on installing $1 again in the future"
echo "| you can leave it as it is."
echo "|"
echo "| FYI, the following configuration files belongs to this package:"
echo "|"
for f in \
oaf-config.xml \
oaf-config.xml.sample
oaf/oaf-config.xml \
oaf/oaf-config.xml.sample
do
echo "* /etc/$f"
echo "| ${SYSCONFDIR}/$f"
done
echo "*================= $1 ]"
echo "+--------------- $1"
echo
exit 0

View File

@ -1,18 +1,21 @@
#!/bin/sh
#
# $OpenBSD: INSTALL,v 1.1.1.1 2001/09/13 20:23:11 todd Exp $
# $OpenBSD: INSTALL,v 1.2 2001/09/20 20:01:22 naddy Exp $
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
PKGNAME=oaf
DEST_PFX=/etc
SOURCE_PFX=${PREFIX}/share/${PKGNAME}
P_NAME=oaf
DEST_PFX=${SYSCONFDIR}
SOURCE_PFX=${PREFIX}/share/examples/${P_NAME}
do_post() {
echo
echo "*=================[ ${PKGNAME}"
echo "+--------------- ${P_NAME}"
install -d /etc/oaf
install -d ${DEST_PFX}/oaf
# install or take note of existing config files
for f in \
oaf/oaf-config.xml \
@ -22,7 +25,7 @@ do_post() {
OLD_CONFS="${OLD_CONFS} $f"
else
if ! install -m 644 ${SOURCE_PFX}/$f ${DEST_PFX}/$f; then
echo "* ERROR: The following file could not be installed, exiting: ${DEST_PFX}/$f"
echo "| ERROR: The following file could not be installed, exiting: ${DEST_PFX}/$f"
exit 1
fi
NEW_CONFS="${NEW_CONFS} $f"
@ -31,26 +34,26 @@ do_post() {
# print status report
if [ -n "${NEW_CONFS}" ]; then
echo "* The following NEW configuration files have been installed:"
echo "*"
echo "| The following NEW configuration files have been installed:"
echo "|"
for f in ${NEW_CONFS}; do
echo "* ${DEST_PFX}/$f"
echo "| ${DEST_PFX}/$f"
done
fi
if [ -n "${OLD_CONFS}" ]; then
if [ -n "${NEW_CONFS}" ]; then
echo "*"
echo "|"
fi
echo "* The following OLD configuration files was found and have NOT been overwritten:"
echo "* You should however manually compare it to it's equivalent in ${SOURCE_PFX}"
echo "* and update your configuration if needed."
echo "*"
echo "| The following OLD configuration files was found and have NOT been overwritten:"
echo "| You should however manually compare it to it's equivalent in ${SOURCE_PFX}"
echo "| and update your configuration if needed."
echo "|"
for f in ${OLD_CONFS}; do
echo "* ${DEST_PFX}/$f"
echo "| ${DEST_PFX}/$f"
done
fi
echo "*================= ${PKGNAME} ]"
echo "+--------------- ${P_NAME}"
echo
}

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.2 2001/09/17 20:54:41 naddy Exp $
@comment $OpenBSD: PLIST,v 1.3 2001/09/20 20:01:22 naddy Exp $
bin/oaf-client
bin/oaf-config
bin/oaf-run-query
@ -21,6 +21,8 @@ include/liboaf/oaf.h
lib/liboaf.la
lib/oafConf.sh
share/aclocal/oaf.m4
share/examples/oaf/oaf/oaf-config.xml
share/examples/oaf/oaf/oaf-config.xml.sample
share/idl/oaf-factory.idl
share/idl/oaf.idl
share/locale/da/LC_MESSAGES/oaf.mo
@ -46,12 +48,11 @@ share/locale/tr/LC_MESSAGES/oaf.mo
share/locale/uk/LC_MESSAGES/oaf.mo
share/oaf/OAF_naming-service.oaf
share/oaf/empty.oafinfo
share/oaf/oaf/oaf-config.xml
share/oaf/oaf/oaf-config.xml.sample
%%SHARED%%
@exec mkdir -p %D/share/oaf/html/liboaf
@dirrm share/oaf/html/liboaf
@dirrm share/oaf/html
@dirrm share/oaf/oaf
@dirrm share/oaf
@dirrm share/examples/oaf/oaf
@dirrm share/examples/oaf
@dirrm include/liboaf