summaryrefslogtreecommitdiffstats
path: root/filesystem/Pkgfile
blob: bdeb03db62bea4cfab7af7d394384beb63de2081 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
description="Root filesystem package."
packager="CRUX System Team <core-ports AT crux DOT nu>"
maintainer="Lukc <lukc AT upyum DOT com>"
url="http://crux.nu"
depends=()

# FIXME: Change versions, some pathes, etc.

archs=(no-arch)

name=filesystem
version=2.7
release=1
source=(issue motd shells group passwd shadow securetty fstab mime.types)
build () 
{ 
	mkdir $PKG/bin;
	mkdir $PKG/sbin;
	mkdir $PKG/boot;
	mkdir $PKG/dev;
	mkdir $PKG/proc;
	mkdir $PKG/sys;
	mkdir $PKG/etc;
	mkdir $PKG/tmp;
	mkdir $PKG/mnt;
	mkdir $PKG/root;
	mkdir $PKG/lib;
	mkdir $PKG/lib/modules;
	mkdir $PKG/opt;
	mkdir $PKG/opt/bin;
	mkdir $PKG/opt/sbin;
	mkdir $PKG/usr;
	mkdir $PKG/usr/{bin,include,lib,sbin,share,src};
	mkdir $PKG/usr/share/man;
	mkdir $PKG/usr/share/man/man{1,2,3,4,5,6,7,8};
	ln -s ../var $PKG/usr/var;
	mkdir $PKG/var;
	mkdir $PKG/var/cache;
	mkdir $PKG/var/lib;
	mkdir $PKG/var/lib/pkg;
	mkdir $PKG/var/lock;
	mkdir $PKG/var/log;
	mkdir $PKG/var/log/old;
	mkdir $PKG/var/run;
	touch $PKG/var/run/utmp;
	mkdir $PKG/var/spool;
	mkdir $PKG/var/spool/mail;
	mkdir $PKG/var/tmp;
	mkdir $PKG/var/ftp;
	mkdir $PKG/var/www;
	mkdir $PKG/var/empty;
	ln -s spool/mail $PKG/var/mail;
	mkdir $PKG/home;
	chmod 1777 $PKG/var/spool/mail;
	chmod 1777 $PKG/tmp;
	chmod 1777 $PKG/var/lock;
	chmod 1777 $PKG/var/tmp;
	chmod 0750 $PKG/root;
	mknod $PKG/dev/console c 5 1;
	chmod 0600 $PKG/dev/console;
	cp issue $PKG/etc;
	cp motd $PKG/etc;
	cp shells $PKG/etc;
	cp group $PKG/etc;
	cp passwd $PKG/etc;
	cp shadow $PKG/etc;
	cp securetty $PKG/etc;
	cp fstab $PKG/etc;
	cp mime.types $PKG/etc;
	touch $PKG/etc/mtab;
	chmod 640 $PKG/etc/shadow;
	cat > $PKG/usr/bin/crux  <<EOF
#!/bin/sh

echo "CRUX version $version"

# End of file
EOF

	chmod 755 $PKG/usr/bin/crux
}