Provide FILESDIR to template files and use it in some pkgs.

This always points to ${XBPS_TEMPLATESDIR}/${pkgname}/files.

--HG--
extra : convert_revision : ef23025694cb95d508d511ab52bf67c66ead9d61
This commit is contained in:
Juan RP 2009-03-08 01:31:24 +01:00
parent 67d700ac77
commit 33edcb122b
4 changed files with 8 additions and 9 deletions

View File

@ -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"

View File

@ -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
}

View File

@ -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

View File

@ -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
}