vp-build/templates/xbps-base-dirs/template
Juan RP bbcc9c4b13 Add a trigger for creating/updating the initramfs.
It's activated at post-install time, and only if template uses:
triggers="initramfs-tools". Use it in the kernel package.

Also print a message when a trigger is being run.

--HG--
extra : convert_revision : 3f2a0c113ed523e4b09822665cf6d94e30b7d1e4
2009-03-12 11:50:46 +01:00

58 lines
1.4 KiB
Plaintext

# Template file for 'xbps-base-dirs'
pkgname=xbps-base-dirs
version=0.4
build_style=custom-install
short_desc="xbps base system directories"
maintainer="Juan RP <xtraeme@gmail.com>"
long_desc="
This package installs the base system directories as well
as some required files for xbps."
base_chroot=yes
noarch=yes
install_priority=100
do_install()
{
for f in bin sbin boot etc home lib dev proc mnt opt sys var \
media/cdrom; do
mkdir -p $DESTDIR/$f
done
mkdir -p -m 0750 $DESTDIR/root
mkdir -p -m 1777 $DESTDIR/tmp $DESTDIR/var/tmp
for f in local local/bin local/sbin local/include local/lib \
bin include lib sbin src; do
mkdir -p $DESTDIR/usr/$f
done
for f in locale misc terminfo zoneinfo doc info; do
mkdir -p $DESTDIR/usr/share/$f
mkdir -p $DESTDIR/usr/local/share/$f
done
for f in 1 2 3 4 5 6 7 8; do
mkdir -p $DESTDIR/usr/share/man/man$f
mkdir -p $DESTDIR/usr/local/share/man/man$f
done
cd $DESTDIR/usr && ln -s ./share/man man
cd $DESTDIR/usr/local && ln -s ./share/man man
for f in lock log mail run spool opt cache lib; do
mkdir -p $DESTDIR/var/$f
done
if [ "$xbps_machine" = "x86_64" ]; then
mkdir -p $DESTDIR/usr/lib
mkdir -p $DESTDIR/lib
cd $DESTDIR && ln -s lib lib64
cd $DESTDIR/usr && ln -s lib lib64
fi
for f in $(find $XBPS_TRIGGERSDIR -type f -perm 755); do
install -D -m 755 $f $DESTDIR/var/db/xbps/triggers/$(basename $f)
done
}