3 # Generic rules for mBuild build process
5 # defile default operations
6 NOP = @echo "No operation for target $@"
7 DEB = fakeroot dpkg-deb --build debian/tmp
8 INSERT_BUILD = /usr/share/mbuild/insert_build.sh
10 include debian/rules.pre
13 echo "no default rule available"
15 # Löschen aller kompilierten, erzeugten und nicht benötigten Dateien im Bauverzeichnis
19 # Bauen der kompilierten Programme und formatierten Dokumente aus den Quellen im Bauverzeichnis
20 build: debian/$(paket).build sync
27 # Bauen der kompilierten architekturabhängigen Programme aus den Quellen im Bauverzeichnis
30 # Bauen der architekturunabhängigen formatierten Dokumente aus den Quellen im Bauverzeichnis
33 # Installieren der Dateien in einen Verzeichnisbaum unterhalb des Verzeichnisses debian für jedes Binärpaket. Falls sie festgelegt wurden, hängen binary*-Ziele effektiv von diesem Ziel ab (optional)
36 # Erstellen aller Binärpakete (effektiv ist dies die Kombination der binary-arch- und binary-indep-Ziele)
37 binary: binary-arch binary-indep
39 # Erstellen Architektur-abhängiger (Architecture: any) Binärpakete im übergeordneten Verzeichnis
42 # Erstellen Architektur-unabhängiger (Architecture: all) Binärpakete im übergeordneten Verzeichnis
43 binary-indep: copy ../$(paket)_$(version)-$(build)$(_arch).deb
45 version: ~/build/$(TARGET)
46 $(INSERT_BUILD) ~/build/$(TARGET) $(build)
47 cp ~/build/*$(build)* ../
53 bash -c 'for dirs in $$(ls); do rsync -av $$dirs ../build; done'
55 copy: debian/$(paket).cp
56 debian/$(paket).cp debian/tmp
58 ../$(paket)_$(version)-$(build)$(_arch).deb:debian/tmp/DEBIAN/control $(add_inst_tgt)
60 mv debian/tmp.deb ../$(paket)_$(version)-$(build)$(_arch).deb
62 debian/tmp/DEBIAN/control: debian/control debian/changelog
65 debian/changelog: debian/$(paket).changelog debian/rules.pre
66 sed "s/%BUILD%/$(build)/" debian/$(paket).changelog > debian/changelog
67 # echo "${pwd} (${build}) unstable; urgency=medium" > debian/changelog
68 # echo " * generated by mbuild" >> debian/changelog
69 # echo " -- Michael Wagner <info@wagnertech.de> Sun, 11 Feb 2018 20:03:04 +0100" >> debian/changelog
72 debian/tmp/DEBIAN/preinst: debian/$(paket).preinst
73 cp debian/$(paket).preinst debian/tmp/DEBIAN/preinst
75 debian/tmp/DEBIAN/postinst: debian/$(paket).postinst
76 cp debian/$(paket).postinst debian/tmp/DEBIAN/postinst
78 debian/tmp/DEBIAN/prerm: debian/$(paket).prerm
79 cp debian/$(paket).prerm debian/tmp/DEBIAN/prerm
81 debian/tmp/DEBIAN/postrm: debian/$(paket).postrm
82 cp debian/$(paket).postrm debian/tmp/DEBIAN/postrm
84 # Load project specification
87 # if debian/control is missing, try old mbuild way
89 # if [ -e debian/$(paket).control ]; then echo "trallala"; fi