core/filesystem/Pkgfile

93 lines
2.1 KiB
Plaintext
Raw Normal View History

2006-02-23 16:26:10 +01:00
# Description: Root filesystem package
2021-12-11 22:44:39 +01:00
# URL: https://crux.nu
# Maintainer: CRUX System Team, core-ports at crux dot nu
2006-02-23 16:26:10 +01:00
name=filesystem
2021-12-11 22:44:39 +01:00
version=3.7
release=3
2006-02-23 16:26:10 +01:00
source=(issue motd shells group passwd shadow securetty fstab mime.types)
build() {
# Directory structure
install -d $PKG/bin
install -d $PKG/sbin
install -d $PKG/boot
install -d $PKG/dev
install -d $PKG/dev/pts
install -d $PKG/proc
install -d $PKG/sys
install -d $PKG/etc
install -d $PKG/mnt
install -d $PKG/run
install -d $PKG/lib{,32}
ln -s lib $PKG/lib64
install -d $PKG/lib/modules
install -d $PKG/opt
install -d $PKG/opt/bin
install -d $PKG/opt/sbin
install -d $PKG/usr
install -d $PKG/usr/{bin,include,lib{,32},sbin,share,src}
ln -s lib $PKG/usr/lib64
install -d -p $PKG/usr/share/man/man{1,2,3,4,5,6,7,8}
ln -s ../var $PKG/usr/var
install -d $PKG/var
install -d $PKG/var/cache
install -d $PKG/var/lib
install -d $PKG/var/lib/pkg
install -d $PKG/var/log
install -d $PKG/var/log/old
2021-10-19 19:28:14 +02:00
ln -s ../run/ $PKG/var/run
2021-12-11 22:44:39 +01:00
# can't be in the Pkgfile anymore
2021-10-19 19:28:14 +02:00
#touch $PKG/var/run/utmp
install -d $PKG/var/spool
install -d $PKG/var/ftp
install -d $PKG/var/www
install -d $PKG/var/empty
ln -s spool/mail $PKG/var/mail
install -d $PKG/home
2006-02-23 16:26:10 +01:00
install -d -m 1777 $PKG/tmp
install -d -m 0750 $PKG/root
install -d -m 1777 $PKG/var/lock
install -d -m 1777 $PKG/var/spool/mail
install -d -m 1777 $PKG/var/tmp
install -d -m 1777 $PKG/dev/shm
2006-02-23 16:26:10 +01:00
# /dev
2022-02-27 21:02:59 +01:00
mknod $PKG/dev/console c 5 1
chmod 0600 $PKG/dev/console
2006-02-23 16:26:10 +01:00
# /etc
install -m 0644 issue $PKG/etc
install -m 0644 motd $PKG/etc
install -m 0644 shells $PKG/etc
install -m 0644 group $PKG/etc
install -m 0644 passwd $PKG/etc
install -m 0640 shadow $PKG/etc
install -m 0644 securetty $PKG/etc
install -m 0644 fstab $PKG/etc
install -m 0644 mime.types $PKG/etc
ln -s /proc/self/mounts $PKG/etc/mtab
2006-02-23 16:26:10 +01:00
# /usr/bin/crux
2021-10-19 19:28:14 +02:00
cat > $PKG/usr/bin/crux << EOF
2006-02-23 16:26:10 +01:00
#!/bin/sh
echo "CRUX version $version"
2006-02-23 16:26:10 +01:00
# End of file
EOF
chmod 755 $PKG/usr/bin/crux
2021-10-19 19:28:14 +02:00
# /etc/os-release
2021-10-19 19:28:14 +02:00
cat > $PKG/etc/os-release << EOF
NAME=CRUX
VERSION="$version"
ID=crux
PRETTY_NAME="CRUX"
HOME_URL="https://crux.nu/"
BUG_REPORT_URL="https://crux.nu/bugs/"
EOF
2006-02-23 16:26:10 +01:00
}