vp-build/templates/xbps-base-dirs/template
Juan RP 870addbffc Add a "noarch" var. Used by packages that aren't arch specific.
--HG--
extra : convert_revision : 263bd27542e1f2e65f119eb307d37d7b7ade3236
2009-02-15 23:57:15 +01:00

54 lines
1.2 KiB
Plaintext

# Template file for 'xbps-base-dirs'
pkgname=xbps-base-dirs
version=0.2
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
noarch=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/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
}