core/filesystem/PKGBUILD

110 lines
3.3 KiB
Bash
Raw Normal View History

2011-04-12 11:30:41 +08:00
#
2010-05-24 18:59:18 +08:00
# Chakra Packages for Chakra, part of chakra-project.org
#
# maintainer abveritas[at]chakra-project[dog]org>
# maintainer Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
2010-05-24 18:59:18 +08:00
2010-03-13 23:25:19 +08:00
pkgname=filesystem
pkgver=2012.2
pkgrel=2
_codename=Archimedes
pkgdesc='Base filesystem'
2010-03-13 23:25:19 +08:00
arch=('any')
license=('GPL')
url='http://www.chakra-project.org'
2010-03-13 23:25:19 +08:00
groups=('base')
install='filesystem.install'
options=('force')
2011-05-06 03:58:21 +08:00
depends=('iana-etc' 'bash' 'coreutils')
backup=('etc/fstab' 'etc/crypttab' 'etc/group' 'etc/hosts' 'etc/ld.so.conf' 'etc/passwd'
'etc/shadow' 'etc/gshadow' 'etc/resolv.conf' 'etc/motd' 'etc/nsswitch.conf'
'etc/shells' 'etc/host.conf' 'etc/securetty' 'etc/profile' 'etc/issue')
source=('group' 'issue' 'nsswitch.conf' 'securetty' 'host.conf' 'ld.so.conf'
'passwd' 'shadow' 'fstab' 'crypttab' 'hosts' 'motd' 'resolv.conf' 'shells'
'gshadow' 'profile' 'modprobe.d.usb-load-ehci-first')
md5sums=('772fe869b921698cc3e6fde73c4ac85a'
'23a17e4b839ed9acb1c72ec451b888c4'
'13753e4e0964f3652b0cc60a28528bdf'
'4c4540eeb748bf1f71d631b8c1dcf0b3'
'f28150d4c0b22a017be51b9f7f9977ed'
'6e488ffecc8ba142c0cf7e2d7aeb832e'
'8a9042a2cedf6b6b47eb8973f14289cb'
'b8355d9d2782f424f4cedcf682651be0'
'18854ca68f1edc5777e6cb1cace1ffd9'
'e5d8323a4dbee7a6d0d2a19cbf4b819f'
'7bc65f234dfb6abf24e7c3b03e86f4ff'
'd41d8cd98f00b204e9800998ecf8427e'
'6f48288b6fcaf0065fcb7b0e525413e0'
'22518e922891f9359f971f4f5b4e793c'
'd2dc4e39dbdea75b107f91789e3274ab'
'f3b6ae7db8adffaaa4bffc6099dcbd50'
'a8a962370cd0128465d514e6a1f74130')
2010-03-13 23:25:19 +08:00
2011-03-08 04:40:22 +08:00
package() {
cd ${pkgdir}
2011-06-17 16:58:55 +08:00
#
# setup root filesystem
#
for d in bin boot dev etc home media mnt sbin usr var opt srv/http sys run; do
install -d -m755 ${d}
2011-06-17 16:58:55 +08:00
done
install -d -m555 proc
install -d -m0750 root
install -d -m1777 tmp
2011-06-17 16:58:55 +08:00
# vsftpd won't run with write perms on /srv/ftp
install -d -m555 -g ftp srv/ftp
2011-06-17 16:58:55 +08:00
# setup /etc
install -d etc/{ld.so.conf.d,skel,profile.d}
2011-06-17 16:58:55 +08:00
for f in fstab group host.conf hosts issue ld.so.conf motd nsswitch.conf passwd resolv.conf securetty shells profile; do
install -m644 ${srcdir}/${f} etc/
2011-06-17 16:58:55 +08:00
done
ln -s /proc/self/mounts etc/mtab
2011-06-17 16:58:55 +08:00
for f in gshadow shadow crypttab; do
install -m600 ${srcdir}/${f} etc/
2011-06-17 16:58:55 +08:00
done
touch etc/chakra-release
install -D -m644 ${srcdir}/modprobe.d.usb-load-ehci-first lib/modprobe.d/usb-load-ehci-first.conf
2011-06-17 16:58:55 +08:00
# setup /var
for d in cache/man local opt log/old lib/misc empty run; do
install -d -m755 var/${d}
2011-06-17 16:58:55 +08:00
done
install -d -m1777 var/{tmp,spool/mail,lock}
2011-06-17 16:58:55 +08:00
# allow setgid games to write scores
install -d -m775 -g games var/games
ln -s spool/mail var/mail
# not ready yet, needs possible change in pacman or other magic
# is fixed by initscripts on next boot
# ln -s ../run var/run
# ln -s ../run/lock var/lock
2011-06-17 16:58:55 +08:00
#
# setup /usr hierarchy
#
for d in bin include lib sbin share/misc src; do
install -d -m755 usr/${d}
2011-06-17 16:58:55 +08:00
done
for d in $(seq 8); do
install -d -m755 usr/share/man/man${d}
2011-06-17 16:58:55 +08:00
done
2011-06-17 16:58:55 +08:00
#
# setup /usr/local hierarchy
#
for d in bin etc games include lib man sbin share src; do
install -d -m755 usr/local/${d}
2011-06-17 16:58:55 +08:00
done
ln -s ../man usr/local/share/man
}
2011-06-17 16:58:55 +08:00
#
# setup chakra tags
#
#echo "Chakra Linux release ${pkgver} (${_codename})" > "${pkgdir}/etc/chakra-release"
#sed -i -e "s~Chakra Linux~Chakra Linux (${pkgver} - ${_codename})~g" "${pkgdir}/etc/issue"