summaryrefslogtreecommitdiff
path: root/filesystem/Pkgfile
blob: 5e855ad0a02f3404c2017ded56c828145bd2b35b (plain)
    1 # Description: Root filesystem package
    2 # URL:         http://crux.nu
    3 # Maintainer:  CRUX System Team, core-ports at crux dot nu
    4 
    5 name=filesystem
    6 version=3.0
    7 release=1
    8 source=(issue motd shells group passwd shadow securetty fstab mime.types)
    9 
   10 build() {
   11     # Directory structure
   12     mkdir $PKG/bin
   13     mkdir $PKG/sbin
   14     mkdir $PKG/boot
   15     mkdir $PKG/dev
   16     mkdir $PKG/dev/{pts,shm}
   17     mkdir $PKG/proc
   18     mkdir $PKG/sys
   19     mkdir $PKG/etc
   20     mkdir $PKG/tmp
   21     mkdir $PKG/mnt
   22     mkdir $PKG/root
   23     mkdir $PKG/run
   24     mkdir $PKG/lib{,32}
   25     ln -s lib $PKG/lib64
   26     mkdir $PKG/lib/modules
   27     mkdir $PKG/opt
   28     mkdir $PKG/opt/bin
   29     mkdir $PKG/opt/sbin
   30     mkdir $PKG/usr
   31     mkdir $PKG/usr/{bin,include,lib{,32},sbin,share,src,man}
   32     ln -s lib $PKG/usr/lib64
   33     mkdir $PKG/usr/man/man{1,2,3,4,5,6,7,8}
   34     ln -s ../var $PKG/usr/var
   35     mkdir $PKG/var
   36     mkdir $PKG/var/cache
   37     mkdir $PKG/var/lib
   38     mkdir $PKG/var/lib/pkg
   39     mkdir $PKG/var/lock
   40     mkdir $PKG/var/log
   41     mkdir $PKG/var/log/old
   42     mkdir $PKG/var/run
   43     touch $PKG/var/run/utmp
   44     mkdir $PKG/var/spool
   45     mkdir $PKG/var/spool/mail
   46     mkdir $PKG/var/tmp
   47     mkdir $PKG/var/ftp
   48     mkdir $PKG/var/www
   49     mkdir $PKG/var/empty
   50     ln -s spool/mail $PKG/var/mail
   51     mkdir $PKG/home
   52 
   53     chmod 1777 $PKG/var/spool/mail
   54     chmod 1777 $PKG/tmp
   55     chmod 1777 $PKG/var/lock
   56     chmod 1777 $PKG/var/tmp
   57     chmod 0750 $PKG/root
   58 
   59     # /dev
   60     mknod $PKG/dev/console c 5 1
   61     chmod 0600 $PKG/dev/console
   62 
   63     # /etc
   64     cp issue $PKG/etc
   65     cp motd $PKG/etc
   66     cp shells $PKG/etc
   67     cp group $PKG/etc
   68     cp passwd $PKG/etc
   69     cp shadow $PKG/etc
   70     cp securetty $PKG/etc
   71     cp fstab $PKG/etc
   72     cp mime.types $PKG/etc
   73     ln -s /proc/self/mounts $PKG/etc/mtab
   74     chmod 640 $PKG/etc/shadow
   75 
   76     # /usr/bin/crux
   77 cat > $PKG/usr/bin/crux << EOF
   78 #!/bin/sh
   79 
   80 echo "CRUX version $version x86_64-multilib"
   81 
   82 # End of file
   83 EOF
   84     chmod 755 $PKG/usr/bin/crux
   85 }

Generated by cgit