blob: 820e819cda101579af4e328f974039506e6f1d6d (
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
|
#!/usr/bin/make -f
package = base-files
docdir = debian/tmp/usr/share/doc/$(package)
OSNAME = "GNU/`uname | sed -e 's/GNU\///'`"
ifeq ($(DEB_HOST_GNU_SYSTEM),linux)
OSNAME=GNU/Linux
endif
ifeq ($(DEB_HOST_GNU_SYSTEM),gnu)
OSNAME=GNU/Hurd
endif
ifeq ($(DEB_HOST_ARCH_OS),illumos)
OSNAME=Illumos
endif
VENDORFILE = dyson
VERSION = $(shell cat etc/debian_version)
build:
touch build
clean:
rm -f build
rm -f `find . -name "*~"`
rm -rf debian/tmp debian/files* core debian/substvars
binary-arch: build
rm -rf debian/tmp
install -d debian/tmp/DEBIAN $(docdir) debian/tmp/etc/dpkg/origins
cp -a origins/* debian/tmp/etc/dpkg/origins
cd debian/tmp && install -d usr/share/$(package)
cd debian/tmp && cat ../links | while read l; do \
ln -sf $$l; \
done
install -p -m 644 debian/changelog debian/README \
debian/README.FHS $(docdir)
cat debian/copyright.in | sed -e "s&#OSNAME#&$(OSNAME)&g" \
> $(docdir)/copyright
sed -e "s/#VENDORFILE#/$(VENDORFILE)/g" debian/postinst.in \
> debian/tmp/DEBIAN/postinst
chmod 755 debian/tmp/DEBIAN/postinst
cd debian && install -m 644 conffiles tmp/DEBIAN
cd debian/tmp && install -d `cat ../directory-list`
install -p -m 644 share/* debian/tmp/usr/share/base-files
install -p -m 644 licenses/* debian/tmp/usr/share/common-licenses
ln -s GFDL-1.3 debian/tmp/usr/share/common-licenses/GFDL
ln -s LGPL-3 debian/tmp/usr/share/common-licenses/LGPL
ln -s GPL-3 debian/tmp/usr/share/common-licenses/GPL
ln -s README $(docdir)/FAQ
install -p -m 644 etc/* debian/tmp/etc
rm -f debian/tmp/etc/motd
ifeq ($(DEB_HOST_GNU_SYSTEM),gnu)
rmdir debian/tmp/proc
endif
sed -e "s&#OSNAME#&$(OSNAME)&g" etc/motd \
> debian/tmp/usr/share/base-files/motd
sed -e "s&#OSNAME#&$(OSNAME)&g" share/info.dir \
> debian/tmp/usr/share/base-files/info.dir
sed -e "s&#OSNAME#&$(OSNAME)&g" etc/issue \
> debian/tmp/etc/issue
sed -e "s&#OSNAME#&$(OSNAME)&g" etc/issue.net \
> debian/tmp/etc/issue.net
gzip -9 $(docdir)/changelog
cd debian/tmp && \
md5sum `find usr -type f` > DEBIAN/md5sums
chown -R root:root debian/tmp
cd debian/tmp && chown root:staff var/local
cd debian/tmp && chmod 755 `find . -type d`
cd debian/tmp && chmod 1777 `cat ../1777-dirs`
cd debian/tmp && chmod 2775 `cat ../2775-dirs`
cd debian/tmp && chmod 700 root
dpkg-gencontrol
dpkg --build debian/tmp ..
binary-indep: build
binary: binary-indep binary-arch
.PHONY: binary binary-arch binary-indep clean
|