base-directories: switch to /usr.

This commit is contained in:
Juan RP 2012-07-09 20:28:26 +02:00
parent 3f9271ec45
commit e159c2beca
2 changed files with 30 additions and 19 deletions

View File

@ -3,8 +3,8 @@ make_system_dirs()
#
# Install FHS system directories.
#
for d in bin sbin boot etc etc/modprobe.d etc/skel \
home lib dev proc usr mnt opt sys var media run; do
for d in boot etc etc/modprobe.d etc/skel \
home dev proc usr mnt opt sys var run/lock; do
[ ! -d ${d} ] && install -d ${d}
done
@ -28,16 +28,31 @@ make_system_dirs()
install -d usr/local/share/man/man${d}
done
[ ! -h usr/man ] && ln -sf /usr/share/man usr/man
[ ! -h usr/local/man ] && ln -sf /usr/share/man usr/local/man
# Create /bin, /sbin and /lib symlinks to /usr.
for d in bin sbin lib; do
if [ -d "$d" ]; then
echo "/${d} must not be a directory, exiting!"
exit 1
fi
ln -sf usr/${d} .
done
for d in log run opt cache lib; do
for d in log opt cache lib; do
[ ! -d var/${d} ] && install -d var/${d}
done
# Create /var/run and /var/lock symlinks.
for d in run lock; do
if [ -d var/${d} ]; then
echo "/${d} must not be a directory, exiting!"
exit 1
fi
cd var && ln -sf ../${d} . && cd ..
done
if [ "$(uname -m)" = "x86_64" ]; then
[ ! -h lib64 ] && ln -sf /lib lib64
[ ! -h usr/lib64 ] && ln -sf /usr/lib usr/lib64
ln -sf lib lib64
cd usr && ln -sf lib lib64
fi
install -dm1777 tmp

View File

@ -1,8 +1,10 @@
# Template file for 'base-directories'
pkgname=base-directories
version=0.15
version=0.16
revision=1
short_desc="Void GNU/Linux base system directories"
noarch=yes
bootstrap=yes
short_desc="Void Linux base system directories"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://code.google.com/p/xbps"
license="Public domain"
@ -10,18 +12,12 @@ 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."
noarch=yes
bootstrap=yes
do_install()
{
. ${XBPS_SRCPKGDIR}/${pkgname}/INSTALL
install -d ${DESTDIR}
cd ${DESTDIR} && make_system_dirs
do_install() {
vmkdir var/db/xbps/$pkgname
touch ${DESTDIR}/var/db/xbps/$pkgname/.owned
}
post_stow()
{
post_stow() {
. ${XBPS_SRCPKGDIR}/${pkgname}/INSTALL
cd ${XBPS_MASTERDIR} && make_system_dirs
}