| 1 | # Description: Root filesystem package |
| 2 | # URL: http://crux.nu |
| 3 | # Maintainer: CRUX System Team, core-ports at crux dot nu |
| 4 | # Arch Maintainer: CRUX ARM System Team |
| 5 | # Depends on: |
| 6 | |
| 7 | name=filesystem |
| 8 | version=2.5 |
| 9 | release=5 |
| 10 | source=(issue motd shells group passwd shadow securetty fstab mime.types) |
| 11 | |
| 12 | build() { |
| 13 | # Directory structure |
| 14 | install -d $PKG/{bin,sbin,boot,dev,proc,sys,etc,tmp,mnt,root,lib/modules,home} |
| 15 | install -d $PKG/{opt/bin,opt/sbin,usr/{bin,include,lib,sbin,share,src,man}} |
| 16 | install -d $PKG/usr/man/man{1,2,3,4,5,6,7,8} |
| 17 | ln -s ../var $PKG/usr/var |
| 18 | install -d $PKG/var/{cache,lib/pkg,lock,log/old,run,spool/mail,ftp,www,empty} |
| 19 | touch $PKG/var/run/utmp |
| 20 | ln -s ../tmp $PKG/var/tmp |
| 21 | ln -s spool/mail $PKG/var/mail |
| 22 | |
| 23 | chmod 1777 $PKG/var/spool/mail |
| 24 | chmod 1777 $PKG/tmp |
| 25 | chmod 1777 $PKG/var/lock |
| 26 | chmod 0750 $PKG/root |
| 27 | |
| 28 | # /dev |
| 29 | mknod $PKG/dev/console c 5 1 |
| 30 | chmod 0600 $PKG/dev/console |
| 31 | |
| 32 | # /etc |
| 33 | install -m 0644 issue $PKG/etc |
| 34 | install -m 0644 motd $PKG/etc |
| 35 | install -m 0644 shells $PKG/etc |
| 36 | install -m 0644 group $PKG/etc |
| 37 | install -m 0644 passwd $PKG/etc |
| 38 | install -m 0640 shadow $PKG/etc |
| 39 | install -m 0644 securetty $PKG/etc |
| 40 | install -m 0644 fstab $PKG/etc |
| 41 | install -m 0644 mime.types $PKG/etc |
| 42 | touch $PKG/etc/mtab |
| 43 | chmod 0640 $PKG/etc/shadow |
| 44 | |
| 45 | # /usr/bin/crux |
| 46 | cat > $PKG/usr/bin/crux << EOF |
| 47 | #!/bin/sh |
| 48 | |
| 49 | echo "CRUX-ARM version $version" |
| 50 | |
| 51 | # End of file |
| 52 | EOF |
| 53 | chmod 0755 $PKG/usr/bin/crux |
| 54 | } |