void-packages/templates/xbps-base-dirs.tmpl
Juan RP 68941a9a31 Introduce $install_priority for use in templates.
A higher number in this var will make the binary package to
be installed before other with lower priority. By default, all
packages have a 0 priority. xbps-base-dirs uses 100, because it
needs to be one of the first installed packages.

--HG--
extra : convert_revision : 81a88b676d2ae3180914612371619f19e1765d02
2008-12-27 16:20:54 +01:00

52 lines
1.2 KiB
Cheetah

# Template file for 'xbps-base-dirs'
pkgname=xbps-base-dirs
version=0.1
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."
base_chroot=yes
install_priority=100
do_install()
{
local destdir=$XBPS_DESTDIR/$pkgname-$version
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 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/$f
mkdir -p $destdir/usr/local/$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
}