Commit | Line | Data |
---|---|---|
6dca1d21 JB |
1 | # Description: Root filesystem package |
2 | # URL: http://crux.nu | |
3 | # Maintainer: CRUX System Team, core-ports at crux dot nu | |
b751b192 | 4 | # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu |
6dca1d21 JB |
5 | # Depends on: |
6 | ||
7 | name=filesystem | |
faa1a2d5 VM |
8 | version=3.1 |
9 | release=2 | |
6dca1d21 JB |
10 | source=(issue motd shells group passwd shadow securetty fstab mime.types) |
11 | ||
12 | build() { | |
13 | # Directory structure | |
ae89fac0 JB |
14 | mkdir $PKG/bin |
15 | mkdir $PKG/sbin | |
16 | mkdir $PKG/boot | |
17 | mkdir $PKG/dev | |
18 | mkdir $PKG/proc | |
19 | mkdir $PKG/sys | |
20 | mkdir $PKG/etc | |
21 | mkdir $PKG/tmp | |
22 | mkdir $PKG/mnt | |
23 | mkdir $PKG/root | |
d4638662 | 24 | mkdir $PKG/run |
ae89fac0 JB |
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} | |
6dca1d21 | 33 | ln -s ../var $PKG/usr/var |
ae89fac0 JB |
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 | |
6dca1d21 | 42 | touch $PKG/var/run/utmp |
ae89fac0 JB |
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 | |
6dca1d21 | 49 | ln -s spool/mail $PKG/var/mail |
ae89fac0 JB |
50 | mkdir $PKG/home |
51 | ||
6dca1d21 JB |
52 | chmod 1777 $PKG/var/spool/mail |
53 | chmod 1777 $PKG/tmp | |
54 | chmod 1777 $PKG/var/lock | |
ae89fac0 | 55 | chmod 1777 $PKG/var/tmp |
6dca1d21 JB |
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 | |
ae89fac0 JB |
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 | |
d4638662 | 72 | ln -s /proc/self/mounts $PKG/etc/mtab |
ae89fac0 | 73 | chmod 640 $PKG/etc/shadow |
6dca1d21 | 74 | |
ae89fac0 | 75 | # /usr/bin/crux |
6dca1d21 JB |
76 | cat > $PKG/usr/bin/crux << EOF |
77 | #!/bin/sh | |
78 | ||
dfb0dcab | 79 | echo "CRUX-ARM version $version" |
6dca1d21 JB |
80 | |
81 | # End of file | |
82 | EOF | |
ae89fac0 | 83 | chmod 755 $PKG/usr/bin/crux |
6dca1d21 | 84 | } |