void-packages/templates/xbps-base-dirs/template

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
}