2006-02-23 15:26:10 +00:00
|
|
|
# Description: Root filesystem package
|
|
|
|
# URL: http://crux.nu
|
2007-01-23 17:25:18 +00:00
|
|
|
# Maintainer: CRUX System Team, core-ports at crux dot nu
|
2006-02-23 15:26:10 +00:00
|
|
|
|
|
|
|
name=filesystem
|
2014-02-15 20:01:45 +01:00
|
|
|
version=3.1
|
2014-06-26 20:46:44 +02:00
|
|
|
release=2
|
2006-02-23 15:26:10 +00:00
|
|
|
source=(issue motd shells group passwd shadow securetty fstab mime.types)
|
|
|
|
|
|
|
|
build() {
|
|
|
|
# Directory structure
|
|
|
|
mkdir $PKG/bin
|
|
|
|
mkdir $PKG/sbin
|
|
|
|
mkdir $PKG/boot
|
|
|
|
mkdir $PKG/dev
|
2012-09-29 18:57:12 +02:00
|
|
|
mkdir $PKG/dev/{pts,shm}
|
2006-02-23 15:26:10 +00:00
|
|
|
mkdir $PKG/proc
|
|
|
|
mkdir $PKG/sys
|
|
|
|
mkdir $PKG/etc
|
|
|
|
mkdir $PKG/tmp
|
|
|
|
mkdir $PKG/mnt
|
|
|
|
mkdir $PKG/root
|
2012-08-08 10:07:06 +02:00
|
|
|
mkdir $PKG/run
|
2012-11-22 12:38:39 -06:00
|
|
|
mkdir $PKG/lib{,32}
|
|
|
|
ln -s lib $PKG/lib64
|
2006-02-23 15:26:10 +00:00
|
|
|
mkdir $PKG/lib/modules
|
|
|
|
mkdir $PKG/opt
|
|
|
|
mkdir $PKG/opt/bin
|
2007-12-13 21:50:36 +01:00
|
|
|
mkdir $PKG/opt/sbin
|
2006-02-23 15:26:10 +00:00
|
|
|
mkdir $PKG/usr
|
2012-11-22 12:38:39 -06:00
|
|
|
mkdir $PKG/usr/{bin,include,lib{,32},sbin,share,src,man}
|
|
|
|
ln -s lib $PKG/usr/lib64
|
2006-02-23 15:26:10 +00:00
|
|
|
mkdir $PKG/usr/man/man{1,2,3,4,5,6,7,8}
|
|
|
|
ln -s ../var $PKG/usr/var
|
|
|
|
mkdir $PKG/var
|
|
|
|
mkdir $PKG/var/cache
|
|
|
|
mkdir $PKG/var/lib
|
|
|
|
mkdir $PKG/var/lib/pkg
|
|
|
|
mkdir $PKG/var/lock
|
|
|
|
mkdir $PKG/var/log
|
|
|
|
mkdir $PKG/var/log/old
|
|
|
|
mkdir $PKG/var/run
|
|
|
|
touch $PKG/var/run/utmp
|
|
|
|
mkdir $PKG/var/spool
|
|
|
|
mkdir $PKG/var/spool/mail
|
|
|
|
mkdir $PKG/var/tmp
|
|
|
|
mkdir $PKG/var/ftp
|
|
|
|
mkdir $PKG/var/www
|
|
|
|
mkdir $PKG/var/empty
|
|
|
|
ln -s spool/mail $PKG/var/mail
|
|
|
|
mkdir $PKG/home
|
|
|
|
|
|
|
|
chmod 1777 $PKG/var/spool/mail
|
|
|
|
chmod 1777 $PKG/tmp
|
|
|
|
chmod 1777 $PKG/var/lock
|
|
|
|
chmod 1777 $PKG/var/tmp
|
|
|
|
chmod 0750 $PKG/root
|
|
|
|
|
|
|
|
# /dev
|
|
|
|
mknod $PKG/dev/console c 5 1
|
|
|
|
chmod 0600 $PKG/dev/console
|
|
|
|
|
|
|
|
# /etc
|
|
|
|
cp issue $PKG/etc
|
|
|
|
cp motd $PKG/etc
|
|
|
|
cp shells $PKG/etc
|
|
|
|
cp group $PKG/etc
|
|
|
|
cp passwd $PKG/etc
|
|
|
|
cp shadow $PKG/etc
|
|
|
|
cp securetty $PKG/etc
|
|
|
|
cp fstab $PKG/etc
|
|
|
|
cp mime.types $PKG/etc
|
2012-09-21 10:49:13 -05:00
|
|
|
ln -s /proc/self/mounts $PKG/etc/mtab
|
2006-02-23 15:26:10 +00:00
|
|
|
chmod 640 $PKG/etc/shadow
|
|
|
|
|
|
|
|
# /usr/bin/crux
|
|
|
|
cat > $PKG/usr/bin/crux << EOF
|
|
|
|
#!/bin/sh
|
|
|
|
|
2013-01-12 22:47:17 +01:00
|
|
|
echo "CRUX version $version"
|
2006-02-23 15:26:10 +00:00
|
|
|
|
|
|
|
# End of file
|
|
|
|
EOF
|
|
|
|
chmod 755 $PKG/usr/bin/crux
|
|
|
|
}
|