pkgs/filesystem/PKGBUILD

91 lines
2.8 KiB
Text
Raw Permalink Normal View History

2023-12-05 04:47:04 +00:00
# Maintainer: Daryl Ronningen <relms@relms.dev>
pkgname=filesystem
pkgver=2023.12.04
pkgrel=1
2023-12-08 02:05:38 +00:00
pkgdesc="Base Ikeda Linux files"
arch=("any")
url="https://archlinux.org"
license=("GPL-3.0-or-later")
backup=("etc/fstab" "etc/group" "etc/gshadow" "etc/hosts" "etc/issue" "etc/passwd" "etc/profile" "etc/resolv.conf" "etc/shadow" "etc/shells")
source=("fstab" "group" "gshadow" "hosts" "issue" "os-release" "profile" "passwd" "resolv.conf" "shadow" "shells")
sha256sums=(
"e54626e74ed8fee4173b62a545ab1c3a3a069e4217a0ee8fc398d9933e9c1696"
"244f0718ee2a9d6862ae59d6c18c1dd1568651eada91a704574fa527fbac2b3a"
"90d879374f77bac47f132164c1e7fc4892e994ff1d1ac376efa0c1c26ea37273"
"d9cd8a77d9e0aa5e90d7f4ed74c8745c17b525e720e28e4c44364150003c35f9"
"37c99de580e5de5f8f50b242a9afcee1bb1bc8a59cb5053b44811081f18d243b"
"7b547a6a4cbbb8f4b98bfb8efa439678f9b6d0f14846cb1cf06555cdd4cd860c"
"8f08231922fe185d3132f9aedded5cd688fb7c482a6f6f272402ded82fa4849a"
"5e06477834f51abf42ea4e8dc199632afc6afbfd8c44354685a271e9a48d2c0a"
"5557d8e601b17a80d1ea7de78a9869be69637cb6a02fbfe334e22fdf64e61d4c"
"6e13705ac4d6f69cdba118c6b70c722346fd3c45224133e6bbfe28aca719563c"
"ec289c03aa0d150e90e8287f001c8e6552ab9dd54f450bdb5c2d2254e477965b"
)
2023-12-05 04:47:04 +00:00
package() {
2023-12-08 02:05:38 +00:00
cd $pkgdir
2023-12-05 04:47:04 +00:00
2023-12-08 02:05:38 +00:00
# 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
# ftp (uid 14/gid 11)
install -d -m555 -g 11 srv/ftp
2023-12-05 04:47:04 +00:00
2023-12-08 02:05:38 +00:00
# setup /etc and /usr/share/factory/etc
install -d etc/{skel,profile.d} usr/share/factory/etc
for f in fstab group hosts issue passwd resolv.conf shells profile; do
install -m644 $srcdir/$f etc/
install -m644 $srcdir/$f usr/share/factory/etc/
done
ln -s ../proc/self/mounts etc/mtab
for f in gshadow; do
install -m600 $srcdir/$f etc/
install -m600 $srcdir/$f usr/share/factory/etc/
done
touch etc/ikeda-release
install -Dm644 "$srcdir"/os-release usr/lib/os-release
2023-12-05 04:47:04 +00:00
2023-12-08 02:05:38 +00:00
# setup /var
for d in cache local opt log/old lib/misc empty; do
install -d -m755 var/$d
done
install -d -m1777 var/{tmp,spool/mail}
2023-12-05 04:47:04 +00:00
2023-12-08 02:05:38 +00:00
# allow setgid games (gid 50) to write scores
install -d -m775 -g 50 var/games
ln -s spool/mail var/mail
ln -s ../run var/run
ln -s ../run/lock var/lock
2023-12-05 04:47:04 +00:00
2023-12-08 02:05:38 +00:00
# setup /usr hierarchy
for d in bin include lib share/{misc,pixmaps} src; do
install -d -m755 usr/$d
done
for d in {1..8}; do
install -d -m755 usr/share/man/man$d
done
2023-12-05 04:47:04 +00:00
2023-12-08 02:05:38 +00:00
ln -s usr/lib lib
ln -s usr/bin bin
ln -s usr/bin sbin
ln -s bin usr/sbin
2023-12-05 04:47:04 +00:00
2023-12-08 02:05:38 +00:00
[[ $CARCH = "x86_64" ]] && {
ln -s usr/lib lib64
ln -s lib usr/lib64
}
2023-12-05 04:47:04 +00:00
2023-12-08 02:05:38 +00:00
# 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
2023-12-05 04:47:04 +00:00
}