base-directories: switch to /usr.
This commit is contained in:
parent
3f9271ec45
commit
e159c2beca
2 changed files with 30 additions and 19 deletions
|
@ -3,8 +3,8 @@ make_system_dirs()
|
||||||
#
|
#
|
||||||
# Install FHS system directories.
|
# Install FHS system directories.
|
||||||
#
|
#
|
||||||
for d in bin sbin boot etc etc/modprobe.d etc/skel \
|
for d in boot etc etc/modprobe.d etc/skel \
|
||||||
home lib dev proc usr mnt opt sys var media run; do
|
home dev proc usr mnt opt sys var run/lock; do
|
||||||
[ ! -d ${d} ] && install -d ${d}
|
[ ! -d ${d} ] && install -d ${d}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -28,16 +28,31 @@ make_system_dirs()
|
||||||
install -d usr/local/share/man/man${d}
|
install -d usr/local/share/man/man${d}
|
||||||
done
|
done
|
||||||
|
|
||||||
[ ! -h usr/man ] && ln -sf /usr/share/man usr/man
|
# Create /bin, /sbin and /lib symlinks to /usr.
|
||||||
[ ! -h usr/local/man ] && ln -sf /usr/share/man usr/local/man
|
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}
|
[ ! -d var/${d} ] && install -d var/${d}
|
||||||
done
|
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
|
if [ "$(uname -m)" = "x86_64" ]; then
|
||||||
[ ! -h lib64 ] && ln -sf /lib lib64
|
ln -sf lib lib64
|
||||||
[ ! -h usr/lib64 ] && ln -sf /usr/lib usr/lib64
|
cd usr && ln -sf lib lib64
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install -dm1777 tmp
|
install -dm1777 tmp
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
# Template file for 'base-directories'
|
# Template file for 'base-directories'
|
||||||
pkgname=base-directories
|
pkgname=base-directories
|
||||||
version=0.15
|
version=0.16
|
||||||
revision=1
|
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>"
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||||
homepage="http://code.google.com/p/xbps"
|
homepage="http://code.google.com/p/xbps"
|
||||||
license="Public domain"
|
license="Public domain"
|
||||||
|
@ -10,18 +12,12 @@ long_desc="
|
||||||
This package installs the base system directories as specifed by FHS that aren't
|
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."
|
installed by any other package and are required on any GNU/Linux system."
|
||||||
|
|
||||||
noarch=yes
|
do_install() {
|
||||||
bootstrap=yes
|
vmkdir var/db/xbps/$pkgname
|
||||||
|
touch ${DESTDIR}/var/db/xbps/$pkgname/.owned
|
||||||
do_install()
|
|
||||||
{
|
|
||||||
. ${XBPS_SRCPKGDIR}/${pkgname}/INSTALL
|
|
||||||
install -d ${DESTDIR}
|
|
||||||
cd ${DESTDIR} && make_system_dirs
|
|
||||||
}
|
}
|
||||||
|
|
||||||
post_stow()
|
post_stow() {
|
||||||
{
|
|
||||||
. ${XBPS_SRCPKGDIR}/${pkgname}/INSTALL
|
. ${XBPS_SRCPKGDIR}/${pkgname}/INSTALL
|
||||||
cd ${XBPS_MASTERDIR} && make_system_dirs
|
cd ${XBPS_MASTERDIR} && make_system_dirs
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue