Use INSTALL_EXTRA_TMPL and DEINSTALL_EXTRA_TMPL. Fix the output of
DEINSTALL to only print the delimiting line if the opening line was written as well. Makes the output a bit nicer when no file was modified.
This commit is contained in:
parent
5dc881fc03
commit
6a585133a6
2 changed files with 5 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: DEINSTALL,v 1.3 2004/09/06 10:44:44 martti Exp $
|
||||
# $NetBSD: DEINSTALL,v 1.4 2006/01/22 00:57:02 joerg Exp $
|
||||
|
||||
PKGNAME=$1
|
||||
STAGE=$2
|
||||
|
@ -70,10 +70,10 @@ EOF
|
|||
do
|
||||
echo " ${file}"
|
||||
done
|
||||
fi
|
||||
${CAT} << EOF
|
||||
===========================================================================
|
||||
EOF
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.22 2005/12/29 06:22:06 jlam Exp $
|
||||
# $NetBSD: Makefile,v 1.23 2006/01/22 00:57:02 joerg Exp $
|
||||
|
||||
DISTNAME= LPRng-3.8.28
|
||||
PKGNAME= LPRng-core-3.8.28
|
||||
|
@ -43,8 +43,8 @@ FILTER_PATH= ${FILTER_DIR}:/sbin:/usr/sbin:/bin:/usr/bin:${PREFIX}/sbin:${PREFI
|
|||
MAKE_ENV+= POSTINSTALL="NO"
|
||||
|
||||
EXAMPLESDIR= ${PREFIX}/share/examples/LPRng
|
||||
DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
|
||||
INSTALL_FILE= ${WRKDIR}/INSTALL
|
||||
DEINSTALL_EXTRA_TMPL+= ${.CURDIR}/DEINSTALL
|
||||
INSTALL_EXTRA_TMPL+= ${.CURDIR}/INSTALL
|
||||
RCD_SCRIPTS= LPRng
|
||||
|
||||
FILES_SUBST+= CAT=${CAT:Q}
|
||||
|
@ -72,8 +72,6 @@ post-configure:
|
|||
pre-install:
|
||||
${SED} -e "s,@PREFIX@,${PREFIX},g" \
|
||||
< ${FILESDIR}/LPRng.sh > ${WRKDIR}/LPRng.sh
|
||||
${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
|
||||
${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE}
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA_DIR} ${EXAMPLESDIR}
|
||||
|
@ -81,6 +79,5 @@ post-install:
|
|||
${INSTALL_DATA} ${WRKSRC}/$${file} \
|
||||
${EXAMPLESDIR}/$${file}.example; \
|
||||
done
|
||||
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
|
||||
|
||||
.include "../../mk/bsd.pkg.mk"
|
||||
|
|
Loading…
Reference in a new issue