mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 22:37:14 +08:00
113 lines
3.5 KiB
Bash
113 lines
3.5 KiB
Bash
# maintainer almack[at]chakralinux[dog]org>
|
|
|
|
pkgname=filesystem
|
|
pkgver=2016.11
|
|
pkgrel=1
|
|
pkgdesc='Base filesystem'
|
|
arch=('x86_64')
|
|
license=('GPL')
|
|
url='http://www.chakralinux.org'
|
|
groups=('base')
|
|
install='filesystem.install'
|
|
depends=('iana-etc')
|
|
makedepends=('asciidoc')
|
|
conflicts=('filesystem-extra')
|
|
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' 'etc/hostname'
|
|
'etc/machine-info' 'etc/vconsole.conf')
|
|
source=('group' 'issue' 'nsswitch.conf' 'securetty' 'host.conf' 'ld.so.conf'
|
|
'passwd' 'shadow' 'fstab' 'crypttab' 'hosts' 'hostname' 'motd' 'resolv.conf' 'shells'
|
|
'gshadow' 'profile' 'modprobe.d.usb-load-ehci-first' 'machine-info' 'os-release'
|
|
'vconsole.conf' 'locale.sh')
|
|
md5sums=('5589e354505fa6d2b479314a0b266b14'
|
|
'ff89d20fecda61f9a2bd2361fe4d7cfc'
|
|
'13753e4e0964f3652b0cc60a28528bdf'
|
|
'4c4540eeb748bf1f71d631b8c1dcf0b3'
|
|
'f28150d4c0b22a017be51b9f7f9977ed'
|
|
'6e488ffecc8ba142c0cf7e2d7aeb832e'
|
|
'0c9ab77b54dc6e6ebb21ef78d29b8066'
|
|
'4f932d5a911b89f3aeeb3cb5473aca71'
|
|
'693c97f2c9a519bb97a17008e92c2b74'
|
|
'fbe6335d7abacfb85aa54e84b6a3b892'
|
|
'7bc65f234dfb6abf24e7c3b03e86f4ff'
|
|
'b7244a8455581eeb441edeec03495054'
|
|
'd41d8cd98f00b204e9800998ecf8427e'
|
|
'6f48288b6fcaf0065fcb7b0e525413e0'
|
|
'22518e922891f9359f971f4f5b4e793c'
|
|
'8605dab8a4084cb2a619822e24a62107'
|
|
'b217ea13514b74702f3aa909bafb61d5'
|
|
'a8a962370cd0128465d514e6a1f74130'
|
|
'8aba0b33527e812211b9e5f9b87887ae'
|
|
'58fc7b3547db3c151cb7a11a0873275c'
|
|
'201bbb8b4734d2f46afe1e24d7cc6173'
|
|
'71ed98c52e11ada1f936ac8cb14eecd9')
|
|
|
|
|
|
package() {
|
|
cd ${pkgdir}
|
|
|
|
#
|
|
# setup root filesystem
|
|
#
|
|
for d in boot dev etc home mnt usr var opt srv/http run; do
|
|
install -d -m755 ${d}
|
|
done
|
|
install -d -m555 proc
|
|
install -d -m555 sys
|
|
install -d -m0750 root
|
|
install -d -m1777 tmp
|
|
# vsftpd won't run with write perms on /srv/ftp
|
|
install -d -m555 -g ftp srv/ftp
|
|
|
|
# setup /etc
|
|
install -d etc/{ld.so.conf.d,skel,profile.d}
|
|
for f in fstab group host.conf hostname hosts issue ld.so.conf motd nsswitch.conf passwd resolv.conf securetty shells profile machine-info os-release vconsole.conf; do
|
|
install -m644 ${srcdir}/${f} etc/
|
|
done
|
|
ln -s /proc/self/mounts etc/mtab
|
|
for f in gshadow shadow crypttab; do
|
|
install -m600 ${srcdir}/${f} etc/
|
|
done
|
|
touch etc/chakra-release
|
|
install -D -m644 ${srcdir}/modprobe.d.usb-load-ehci-first usr/lib/modprobe.d/usb-load-ehci-first.conf
|
|
install -m755 ${srcdir}/locale.sh etc/profile.d/locale.sh
|
|
install -Dm644 "$srcdir"/os-release "$pkgdir"/usr/lib/os-release
|
|
|
|
# setup /var
|
|
for d in cache/man local opt log/old lib/misc empty; do
|
|
install -d -m755 var/${d}
|
|
done
|
|
install -d -m1777 var/{tmp,spool/mail}
|
|
# allow setgid games to write scores
|
|
install -d -m775 -g games var/games
|
|
ln -s spool/mail var/mail
|
|
ln -s ../run var/run
|
|
ln -s ../run/lock var/lock
|
|
|
|
#
|
|
# setup /usr hierarchy
|
|
#
|
|
for d in bin include lib sbin share/misc src; do
|
|
install -d -m755 usr/${d}
|
|
done
|
|
for d in $(seq 8); do
|
|
install -d -m755 usr/share/man/man${d}
|
|
done
|
|
|
|
#
|
|
# add bin symlinks
|
|
#
|
|
ln -s usr/bin ${pkgdir}/bin
|
|
ln -s usr/sbin ${pkgdir}/sbin
|
|
|
|
#
|
|
# setup /usr/local hierarchy
|
|
#
|
|
for d in bin etc games include lib man sbin share src; do
|
|
install -d -m755 usr/local/${d}
|
|
done
|
|
ln -s ../man usr/local/share/man
|
|
}
|
|
|