diff --git a/templates/xbps-base-dirs.tmpl b/templates/xbps-base-dirs.tmpl new file mode 100644 index 00000000000..643de77fa00 --- /dev/null +++ b/templates/xbps-base-dirs.tmpl @@ -0,0 +1,50 @@ +# 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 " +long_desc=" + This package installs the base system directories." + +base_chroot=yes + +do_install() +{ + local destdir=$XBPS_DESTDIR/$pkgname-$version + + for f in bin boot etc home lib mnt opt media/cdrom sbin usr var; 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 +}