From 4d7a9ba2c82f791ba2b4284a9188a70791ee01bf Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 27 Dec 2008 08:43:57 +0100 Subject: [PATCH] Added xbps-base-dirs-0.1 template. This package provides the directories required for GNU/Linux system. --HG-- extra : convert_revision : c1b8b40c0718eeb15d75d60b33d7c23357a69dbc --- templates/xbps-base-dirs.tmpl | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 templates/xbps-base-dirs.tmpl 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 +}