CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
gcc: fixed typo
[ports/core-arm.git] / filesystem / Pkgfile
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, devel at crux-arm dot nu
5
6 name=filesystem
7 version=3.1
8 release=2
9 source=(issue motd shells group passwd shadow securetty fstab mime.types)
10
11 build() {
12 # Directory structure
13 mkdir $PKG/bin
14 mkdir $PKG/sbin
15 mkdir $PKG/boot
16 mkdir $PKG/dev
17 mkdir $PKG/dev/{pts,shm}
18 mkdir $PKG/proc
19 mkdir $PKG/sys
20 mkdir $PKG/etc
21 mkdir $PKG/tmp
22 mkdir $PKG/mnt
23 mkdir $PKG/root
24 mkdir $PKG/run
25 mkdir $PKG/lib
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,sbin,share,src,man}
32 mkdir $PKG/usr/man/man{1,2,3,4,5,6,7,8}
33 ln -s ../var $PKG/usr/var
34 mkdir $PKG/var
35 mkdir $PKG/var/cache
36 mkdir $PKG/var/lib
37 mkdir $PKG/var/lib/pkg
38 mkdir $PKG/var/lock
39 mkdir $PKG/var/log
40 mkdir $PKG/var/log/old
41 mkdir $PKG/var/run
42 touch $PKG/var/run/utmp
43 mkdir $PKG/var/spool
44 mkdir $PKG/var/spool/mail
45 mkdir $PKG/var/tmp
46 mkdir $PKG/var/ftp
47 mkdir $PKG/var/www
48 mkdir $PKG/var/empty
49 ln -s spool/mail $PKG/var/mail
50 mkdir $PKG/home
51
52 chmod 1777 $PKG/var/spool/mail
53 chmod 1777 $PKG/tmp
54 chmod 1777 $PKG/var/lock
55 chmod 1777 $PKG/var/tmp
56 chmod 0750 $PKG/root
57
58 # /dev
59 mknod $PKG/dev/console c 5 1
60 chmod 0600 $PKG/dev/console
61
62 # /etc
63 cp issue $PKG/etc
64 cp motd $PKG/etc
65 cp shells $PKG/etc
66 cp group $PKG/etc
67 cp passwd $PKG/etc
68 cp shadow $PKG/etc
69 cp securetty $PKG/etc
70 cp fstab $PKG/etc
71 cp mime.types $PKG/etc
72 ln -s /proc/self/mounts $PKG/etc/mtab
73 chmod 640 $PKG/etc/shadow
74
75 # /usr/bin/crux
76 cat > $PKG/usr/bin/crux << EOF
77 #!/bin/sh
78
79 echo "CRUX-ARM version $version"
80
81 # End of file
82 EOF
83 chmod 755 $PKG/usr/bin/crux
84 }