From 33edcb122b6897eb71366add6aa17d6757a392a7 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 8 Mar 2009 01:31:24 +0100 Subject: [PATCH] Provide FILESDIR to template files and use it in some pkgs. This always points to ${XBPS_TEMPLATESDIR}/${pkgname}/files. --HG-- extra : convert_revision : ef23025694cb95d508d511ab52bf67c66ead9d61 --- shutils/tmpl_funcs.sh | 4 +++- templates/initscripts/template | 7 +++---- templates/minilogd/template | 3 +-- templates/sysklogd/template | 3 +-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/shutils/tmpl_funcs.sh b/shutils/tmpl_funcs.sh index 0aa737f7916..a97dd9fce34 100644 --- a/shutils/tmpl_funcs.sh +++ b/shutils/tmpl_funcs.sh @@ -71,7 +71,7 @@ reset_tmpl_vars() install_priority noarch subpackages sourcepkg \ abi_depends api_depends \ XBPS_EXTRACT_DONE XBPS_CONFIGURE_DONE \ - XBPS_BUILD_DONE XBPS_INSTALL_DONE" + XBPS_BUILD_DONE XBPS_INSTALL_DONE FILESDIR" for v in ${TMPL_VARS}; do eval unset "$v" @@ -190,6 +190,8 @@ prepare_tmpl() XBPS_BUILD_DONE="$wrksrc/.xbps_build_done" XBPS_INSTALL_DONE="$wrksrc/.xbps_install_done" + FILESDIR=${XBPS_TEMPLATESDIR}/${pkgname}/files + if [ -z "$in_chroot" ]; then export PATH="$XBPS_MASTERDIR/bin:$XBPS_MASTERDIR/sbin" export PATH="$PATH:$XBPS_MASTERDIR/usr/bin:$XBPS_MASTERDIR/usr/sbin" diff --git a/templates/initscripts/template b/templates/initscripts/template index d3649c297c2..7a731fb0898 100644 --- a/templates/initscripts/template +++ b/templates/initscripts/template @@ -32,15 +32,14 @@ Add_dependency full dhcpcd do_install() { local destdir=$XBPS_DESTDIR/$pkgname-$version - local filesdir=$XBPS_TEMPLATESDIR/$pkgname/files install -d ${destdir}/etc/rc.d install -d ${destdir}/etc/rc.conf.d install -d ${destdir}/etc/defaults for f in inittab rc.*; do - install -m755 ${filesdir}/${f} ${destdir}/etc + install -m755 ${FILESDIR}/${f} ${destdir}/etc done - install -m644 ${filesdir}/defaults/rc.conf ${destdir}/etc/defaults - install -m755 ${filesdir}/rc.d/* ${destdir}/etc/rc.d + install -m644 ${FILESDIR}/defaults/rc.conf ${destdir}/etc/defaults + install -m755 ${FILESDIR}/rc.d/* ${destdir}/etc/rc.d } diff --git a/templates/minilogd/template b/templates/minilogd/template index cc4f61cdf02..a649608e606 100644 --- a/templates/minilogd/template +++ b/templates/minilogd/template @@ -15,11 +15,10 @@ Add_dependency run glibc do_install() { local destdir=$XBPS_DESTDIR/$pkgname-$version - local filesdir=$XBPS_TEMPLATESDIR/$pkgname/files install -d ${destdir}/sbin - cd ${filesdir} + cd ${FILESDIR} gcc ${CFLAGS} minilogd.c -o minilogd chmod 755 minilogd mv minilogd ${destdir}/sbin diff --git a/templates/sysklogd/template b/templates/sysklogd/template index 1f74e30ead0..d1974e3a171 100644 --- a/templates/sysklogd/template +++ b/templates/sysklogd/template @@ -27,7 +27,6 @@ Add_dependency full glibc post_install() { local destdir=$XBPS_DESTDIR/$pkgname-$version - local filesdir=$XBPS_TEMPLATESDIR/$pkgname/files # Create a default syslog.conf. install -d ${destdir}/etc/rc.d @@ -42,5 +41,5 @@ post_install() ) > $destdir/etc/syslog.conf # Install the rc.d scripts. - install -m755 ${filesdir}/* ${destdir}/etc/rc.d + install -m755 ${FILESDIR}/* ${destdir}/etc/rc.d }