From 3e0e9ce0fd97ea90487e36d007d38ff254897185 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 18 May 2010 08:01:55 +0200 Subject: [PATCH] Added base-directories-0.1 build template. This package installs all directories used by XBPS. --- srcpkgs/base-directories/template | 57 +++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 srcpkgs/base-directories/template diff --git a/srcpkgs/base-directories/template b/srcpkgs/base-directories/template new file mode 100644 index 0000000000..914ab82e48 --- /dev/null +++ b/srcpkgs/base-directories/template @@ -0,0 +1,57 @@ +# Template file for 'base-directories' +pkgname=base-directories +version=0.1 +build_style=custom-install +short_desc="XBPS FHS Base System directories" +maintainer="Juan RP " +long_desc=" + This package installs the base system directories as specifed by FHS that aren't + installed by any other package and are required on any GNU/Linux system." + +nostrip=yes +noverifyrdeps=yes +keep_empty_dirs=yes +base_chroot=yes + +do_install() +{ + # + # Install FHS system directories. + # + for d in bin sbin boot etc etc/modprobe.d etc/skel \ + home lib dev proc mnt opt sys var media; do + install -d ${DESTDIR}/${d} + done + + install -d -m750 ${DESTDIR}/root + for d in tmp var/tmp var/lock var/spool/mail; do + install -d -m1777 ${DESTDIR}/${d} + done + + for d in local local/bin local/sbin local/include local/lib \ + bin include lib sbin src; do + install -d ${DESTDIR}/usr/${d} + done + + for d in locale misc terminfo zoneinfo doc info; do + install -d ${DESTDIR}/usr/share/${d} + install -d ${DESTDIR}/usr/local/share/${d} + done + + for f in 1 2 3 4 5 6 7 8; do + install -d ${DESTDIR}/usr/share/man/man${d} + install -d ${DESTDIR}/usr/local/share/man/man${d} + done + + cd ${DESTDIR}/usr && ln -s ./share/man man + cd ${DESTDIR}/usr/local && ln -s ./share/man man + + for d in log run opt cache lib; do + install -d ${DESTDIR}/var/${d} + done + + if [ "$xbps_machine" = "x86_64" ]; then + cd ${DESTDIR} && ln -s lib lib64 + cd ${DESTDIR}/usr && ln -s lib lib64 + fi +}