an easy and consistent way of installing software ported to FreeBSD
#!/bin/sh
MAKE_CONF=/etc/make.conf
if [ "$2" = "POST-DEINSTALL" ]; then
echo -n "Cleaning up ${MAKE_CONF}..."
if [ -f ${MAKE_CONF} ]; then
sed -e "/# Begin portconf settings/,/# End portconf settings/d" \
-i "" ${MAKE_CONF}
if [ ! -s ${MAKE_CONF} ]; then
rm ${MAKE_CONF}
fi
fi
echo " Done."
fi
Portconf is a simple framework to set ports options in an
universal way. Knobs set to specific ports are honoured
by portmaster, portupgrade, portmanager and 'make install'.
- Alex Dupre
ale@FreeBSD.org
#!/bin/sh
MAKE_CONF=/etc/make.conf
PORTS_DIR=`/bin/realpath /usr/ports`
if [ "$2" = "POST-INSTALL" ]; then
echo -n "Spamming ${MAKE_CONF}..."
cat >> ${MAKE_CONF} << EOF
# Begin portconf settings
# Do not touch these lines
.if !empty(.CURDIR:M${PORTS_DIR}*) && exists(${PKG_PREFIX}/libexec/portconf)
_PORTCONF!=${PKG_PREFIX}/libexec/portconf
.for i in \${_PORTCONF:S/|/ /g}
\${i:S/%/ /g}
.endfor
.endif
# End portconf settings
EOF
echo " Done."
fi