blob: 5ab70568b574636ee389b1e06c4b825cdb6c22b4 (
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
|
#! /usr/bin/make -f
PKGS = basefiles initscripts
$(PKGS): basefiles.buildstamp
.SILENT: basefiles.buildstamp
basefiles.buildstamp:
printf 'basefiles: Installing base files...\n'
mv src/* dest
printf 'basefiles: Making filesystem hierarchy...\n'
cd dest && \
mkdir -p bin boot dev/pts etc/opt home lib media mnt opt proc && \
install -d -m 0750 root && \
mkdir -p sbin srv sys && \
install -d -m 1777 tmp var/tmp && \
mkdir -p usr/bin usr/include usr/lib usr/sbin \
usr/share/man usr/share/misc usr/src && \
mkdir -p usr/local/bin usr/local/include usr/local/lib usr/local/sbin \
usr/local/share/man usr/local/share/misc usr/local/src
mkdir -p usr/local/etc usr/local/games && \
mkdir -p usr/share/doc usr/share/info usr/share/locale \
usr/share/terminfo usr/share/zoneinfo && \
mkdir -p usr/local/share/doc usr/local/share/info \
usr/local/share/locale usr/local/share/terminfo \
usr/local/share/zoneinfo && \
mkdir -p usr/share/man/man1 usr/share/man/man2 \
usr/share/man/man3 usr/share/man/man4 \
usr/share/man/man5 usr/share/man/man6 \
usr/share/man/man7 usr/share/man/man8 && \
mkdir -p usr/local/share/man/man1 usr/local/share/man/man2 \
usr/local/share/man/man3 usr/local/share/man/man4 \
usr/local/share/man/man5 usr/local/share/man/man6 \
usr/local/share/man/man7 usr/local/share/man/man8 && \
ln -s share/man usr/local/man && \
mkdir -p var/cache var/lib/misc var/local var/lock var/log var/mail \
var/opt var/run var/spool
printf 'basefiles: Making service run control links...\n'
cd dest && \
mkdir etc/rc.d && \
ln -s rc etc/init.d/rcS && \
ln -s rc etc/init.d/rcK && \
ln -s ../init.d/sysfs etc/rc.d/S01sysfs && \
ln -s ../init.d/mdev etc/rc.d/S02mdev && \
ln -s ../init.d/mountall etc/rc.d/S03mountall && \
ln -s ../init.d/networking etc/rc.d/S04networking && \
ln -s ../init.d/syslog etc/rc.d/S05syslog && \
ln -s ../init.d/telnetd etc/rc.d/S06telnetd
cd dest/etc/network && \
mkdir if-down.d if-post-down.d if-pre-up.d if-up.d
oh-installfiles $(PKGS)
oh-installdocs basefiles
oh-gencontrol $(PKGS)
oh-buildopk $(PKGS)
touch basefiles.buildstamp
|