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
|
#!/usr/bin/make -f
tmp=debian/tmp
build:
make
clean:
make clean
rm -f debian/files debian/substvars
binary-arch: build
install -d $(tmp)/usr/bin
install -d $(tmp)/boot/hello
install -m 755 hello $(tmp)/usr/bin
touch $(tmp)/usr/bin/iminusrbin
chmod 755 $(tmp)/usr/bin/iminusrbin
install -m 755 hello-static $(tmp)/usr/bin
strip $(tmp)/usr/bin/hello-static
install -m 755 hello-static $(tmp)/usr/bin/hello.static
strip --remove-section=.comment --remove-section=.note $(tmp)/usr/bin/hello.static
install -m 755 hello-static $(tmp)/usr/bin/static-hello
strip --remove-section=.comment --remove-section=.note $(tmp)/usr/bin/static-hello
install -m 755 hello-static $(tmp)/boot/hello
strip --remove-section=.comment --remove-section=.note $(tmp)/boot/hello/hello-static
install -d $(tmp)/usr/share/doc/binary
install -m 644 INSTALL $(tmp)/usr/share/doc/binary
install -d $(tmp)/usr/share/doc/binary/html
echo '<html></html>' > $(tmp)/usr/share/doc/binary/html/index.html
echo '<html></html>' > $(tmp)/usr/share/doc/binary/html/ch1.html
ln -s ../html/./ch1.html $(tmp)/usr/share/doc/binary/html/ch2.html
ln -s /usr/share/doc/binary/htm/ch1.html $(tmp)/usr/share/doc/binary/html/ch3.html
install -d $(tmp)/usr/share/menu
install -d $(tmp)/usr/lib/menu
install -d $(tmp)/usr/share/binary
install -m 644 debian/menu $(tmp)/usr/share/menu/binary
install -m 644 debian/menu $(tmp)/usr/lib/menu/binary
install -d $(tmp)/usr/share/doc-base
install -m 644 debian/doc-base $(tmp)/usr/share/doc-base/binary
install -m 644 debian/README.Debian $(tmp)/usr/share/doc/binary
install -m 644 debian/copyright $(tmp)/usr/share/doc/binary
install -m 644 debian/changelog $(tmp)/usr/share/doc/binary
#gzip -9 $(tmp)/usr/share/doc/binary/changelog
install -d $(tmp)/DEBIAN
install -m 755 debian/postinst $(tmp)/DEBIAN
# should be ok...
echo boe > $(tmp)/usr/bar
ln $(tmp)/usr/bar $(tmp)/usr/foo
# but this isn't
echo boe > $(tmp)/usr/bar2
ln $(tmp)/usr/bar2 $(tmp)/usr/share/baz
dd if=/dev/zero of=$(tmp)/usr/share/binary/largefile bs=1024 count=2000
install -d debian/binary-data/DEBIAN
install -d debian/binary-data/usr/share/doc
ln -s binary debian/binary-data/usr/share/doc/binary-data
dpkg-shlibdeps $(tmp)/usr/bin/hello
dpkg-gencontrol -pbinary -isp
dpkg-gencontrol -pbinary-data -Pdebian/binary-data -isp
# Test an md5sums check while we're here.
touch debian/binary-data/DEBIAN/md5sums
dpkg --build debian/tmp ..
dpkg --build debian/binary-data ..
binary: binary-arch
.PHONY: build binary-arch binary clean
|