CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
util-linux-ng: update to 2.19.1
[crossrootfs.git] / filesystem / Pkgfile
CommitLineData
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
7name=filesystem
980cc6e9
VM
8version=2.7
9release=1
6dca1d21
JB
10source=(issue motd shells group passwd shadow securetty fstab mime.types)
11
12build() {
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
24 mkdir $PKG/lib
25 mkdir $PKG/lib/modules
26 mkdir $PKG/opt
27 mkdir $PKG/opt/bin
28 mkdir $PKG/opt/sbin
29 mkdir $PKG/usr
30 mkdir $PKG/usr/{bin,include,lib,sbin,share,src,man}
31 mkdir $PKG/usr/man/man{1,2,3,4,5,6,7,8}
6dca1d21 32 ln -s ../var $PKG/usr/var
ae89fac0
JB
33 mkdir $PKG/var
34 mkdir $PKG/var/cache
35 mkdir $PKG/var/lib
36 mkdir $PKG/var/lib/pkg
37 mkdir $PKG/var/lock
38 mkdir $PKG/var/log
39 mkdir $PKG/var/log/old
40 mkdir $PKG/var/run
6dca1d21 41 touch $PKG/var/run/utmp
ae89fac0
JB
42 mkdir $PKG/var/spool
43 mkdir $PKG/var/spool/mail
44 mkdir $PKG/var/tmp
45 mkdir $PKG/var/ftp
46 mkdir $PKG/var/www
47 mkdir $PKG/var/empty
6dca1d21 48 ln -s spool/mail $PKG/var/mail
ae89fac0
JB
49 mkdir $PKG/home
50
6dca1d21
JB
51 chmod 1777 $PKG/var/spool/mail
52 chmod 1777 $PKG/tmp
53 chmod 1777 $PKG/var/lock
ae89fac0 54 chmod 1777 $PKG/var/tmp
6dca1d21
JB
55 chmod 0750 $PKG/root
56
57 # /dev
58 mknod $PKG/dev/console c 5 1
59 chmod 0600 $PKG/dev/console
60
61 # /etc
ae89fac0
JB
62 cp issue $PKG/etc
63 cp motd $PKG/etc
64 cp shells $PKG/etc
65 cp group $PKG/etc
66 cp passwd $PKG/etc
67 cp shadow $PKG/etc
68 cp securetty $PKG/etc
69 cp fstab $PKG/etc
70 cp mime.types $PKG/etc
6dca1d21 71 touch $PKG/etc/mtab
ae89fac0 72 chmod 640 $PKG/etc/shadow
6dca1d21 73
ae89fac0 74 # /usr/bin/crux
6dca1d21
JB
75cat > $PKG/usr/bin/crux << EOF
76#!/bin/sh
77
ae89fac0 78echo "CRUX version $version"
6dca1d21
JB
79
80# End of file
81EOF
ae89fac0 82 chmod 755 $PKG/usr/bin/crux
6dca1d21 83}