1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-13 23:36:08 +00:00
freebsd-ports/net/netatalk-devel/pkg-install
Stefan Bethke cd4a8fb9bc Minor additions and fix-ups:
- filenames of Custom Icons for folders ("Icon^M") are properly escaped
- Honors CFLAGS
- package can actually be installed elswhere (pkg_add -p)
- man pages are compressed and properly linked
1998-09-09 01:31:06 +00:00

44 lines
1.1 KiB
Bash

#!/bin/sh
# Check whether config files exist already, and copy the distribution ones
# if not. Warn the user if the existing ones differ from the distribution,
# so changes in the distribution can be merged.
checkfile() {
diff -bBqw $1 $1.dist >/dev/null 2>&1
case $? in
0) # config file exists, but is the same
;;
1) # config file exists and differs
echo "** Make sure $1 is in sync with this version";
echo " of the port. See $1.dist for details.";
;;
*) # no config file exists, copy it
install -c -m 644 $1.dist $1
;;
esac
}
case $2 in
POST-INSTALL)
cd ${PKG_PREFIX}
checkfile ${PKG_PREFIX}/etc/AppleVolumes.default
checkfile ${PKG_PREFIX}/etc/AppleVolumes.system
# install man page aliases
cd man
if [ "x${FAKE_PKG_INSTALL}" = "x" ]; then
if [ -f man1/megatron.1.gz ]; then
MANEXT=.gz
fi
for i in hqx2bin macbinary single2bin unbin unhex unsingle; do
ln -f man1/megatron.1${MANEXT} man1/$i.1${MANEXT}
done
for i in nbplkup nbprgstr nbpunrgstr; do
ln -f man1/nbp.1${MANEXT} man1/$i.1${MANEXT}
done
ln -f man1/pap.1${MANEXT} man1/papstatus.1${MANEXT}
fi
;;
esac