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 }