blob: e9170bb3ed57beed927328ff16fd66708405a011 (
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
|
#!/usr/bin/make -f
#
# debian/rules file for cdrkit. GPL2
# Original from Erik Andersen <andersee@debian.org>
#
PACKAGE = cdrkit
os := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
CFLAGS = -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
i=$(shell pwd)/debian/tmp/usr
b=$(shell pwd)/debian/build
iso=genisoimage
cdd=icedax
cdr=wodim
ziso_VERSION = $(shell cat 3rd-party/zisofs_tools/version)
source_VERSION= $(shell dpkg-parsechangelog | sed -ne '/^Version:/s/^V.*://p')
build: build-arch build-indep
build-arch: build/build-debstamp
build-indep: build/build-debstamp
build/build-debstamp:
# @if test -f ../cdrkit_$(source_VERSION).tar.gz ; then \
# echo "You should not create native packages! Remove ../cdrkit_$(source_VERSION).tar.gz and copy upstream source to .orig.tar.gz" ; \
# exit 1 ; \
# fi
@echo "--- Compiling"
dh_testdir
echo "#define ZISOFS_TOOLS_VERSION \"$(ziso_VERSION)\"" > 3rd-party/zisofs_tools/version.h
make CFLAGS='$(CFLAGS)'
cd 3rd-party/zisofs_tools && CFLAGS='$(CFLAGS)' ./configure && $(MAKE)
touch build/build-debstamp
clean:
@echo "--- Cleaning"
dh_testdir
dh_testroot
-$(MAKE) -C 3rd-party/zisofs_tools distclean
-./.clean
dh_clean
# clean up the stuff dh_clean leaves behind
-rm -rf debian/build debian/files
-rm -f `find . -name "*~"`
-rm -rf `find . -name "\.deps"`
-rm -rf `find . -name "\.libs"`
-rm -rf `find . -name "*\.rej"`
-rm -rf build
install: build build/install-debstamp
build/install-debstamp:
@echo "--- Installing"
dh_testdir
dh_testroot
dh_clean
rm -rf $(b)
make install PREFIX=$(i)
ifeq (illumos,$(os))
mv $(i)/bin/genisoimage $(i)/bin/mkisofs
ln -sf mkisofs $(i)/bin/genisoimage
mv $(i)/share/man/man1/genisoimage.1 $(i)/share/man/man1/mkisofs.1
echo ".so mkisofs.1" > $(i)/share/man/man1/genisoimage.1
endif
install -m 755 3rd-party/geteltorito/geteltorito.pl $(i)/bin/geteltorito
install -m 755 3rd-party/zisofs_tools/mkzftree $(i)/bin/
install -m 755 icedax/cdda2ogg $(i)/bin/
install -m 755 icedax/cdda2mp3 $(i)/bin/
install -m 755 icedax/readmult $(i)/bin/
install -m 755 icedax/pitchplay $(i)/bin/
touch build/install-debstamp
binary-indep: build install cdrkit-doc
binary-arch: build install wodim icedax genisoimage
ifeq (illumos,$(os))
binary-arch: mkisofs
mkisofs: install
@echo "--- Building: $@"
dh_installdirs -p$@ -P$(b)/$@
dh_link -p$@ -P$(b)/$@
dh_installdocs -p$@ -P$(b)/$@
dh_installchangelogs -p$@ -P$(b)/$@ Changelog
dh_install -p$@ -P$(b)/$@
dh_strip -p$@ -P$(b)/$@
dh_compress -p$@ -P$(b)/$@
dh_fixperms -p$@ -P$(b)/$@
dh_makeshlibs -p$@ -P$(b)/$@ -V
dh_installdeb -p$@ -P$(b)/$@
dh_shlibdeps -p$@ -P$(b)/$@
dh_installdebconf -p$@ -P$(b)/$@
dh_gencontrol -p$@ -P$(b)/$@
dh_md5sums -p$@ -P$(b)/$@
dh_builddeb -p$@ -P$(b)/$@
endif
#
# wodim
#
wodim: install
@echo "--- Building: $@"
dh_installdirs -p$@ -P$(b)/$@
cp -a wodim/wodim.dfl $(b)/$@/etc/wodim.conf
cp -a netscsid/netscsid.dfl $(b)/$@/etc/netscsid.conf
# cp debian/reportbug.presubj $(b)/$@/usr/share/bug/wodim/presubj
dh_link -p$@ -P$(b)/$@
dh_installdocs -p$@ -P$(b)/$@
dh_installchangelogs -p$@ -P$(b)/$@ Changelog
dh_install -p$@ -P$(b)/$@
dh_strip -p$@ -P$(b)/$@
dh_installexamples -p$@ -P$(b)/$@ netscsid/netscsid.dfl wodim/wodim.dfl misc/burnstuff
dh_compress -p$@ -P$(b)/$@
dh_fixperms -p$@ -P$(b)/$@
dh_makeshlibs -p$@ -P$(b)/$@ -V
dh_installdeb -p$@ -P$(b)/$@
dh_shlibdeps -p$@ -P$(b)/$@
dh_installdebconf -p$@ -P$(b)/$@
dh_gencontrol -p$@ -P$(b)/$@
dh_md5sums -p$@ -P$(b)/$@
dh_builddeb -p$@ -P$(b)/$@
#
# genisoimage
#
genisoimage: install
@echo "--- Building: $@"
dh_installdirs -p$@ -P$(b)/$@
dh_installdocs -p$@ -P$(b)/$@
dh_installchangelogs -p$@ -P$(b)/$@ $(iso)/ChangeLog zisofs_tools/CHANGES
dh_install -p$@ -P$(b)/$@
dh_installman -p$@ -P$(b)/$@ 3rd-party/zisofs_tools/mkzftree.1 3rd-party/geteltorito.1
# cp debian/reportbug.presubj $(b)/$@/usr/share/bug/mkisofs/presubj
# rm -f $(b)/$@/usr/bin/mkhybrid $(b)/$@/usr/share/man/man8/mkhybrid*
dh_link -p$@ -P$(b)/$@
dh_strip -p$@ -P$(b)/$@
dh_compress -p$@ -P$(b)/$@
dh_fixperms -p$@ -P$(b)/$@
dh_makeshlibs -p$@ -P$(b)/$@ -V
dh_installdeb -p$@ -P$(b)/$@
dh_shlibdeps -p$@ -P$(b)/$@
dh_gencontrol -p$@ -P$(b)/$@
dh_md5sums -p$@ -P$(b)/$@
dh_builddeb -p$@ -P$(b)/$@
#
# icedax
#
icedax: install
@echo "--- Building: $@"
dh_installdirs -p$@ -P$(b)/$@
dh_installdocs -p$@ -P$(b)/$@
dh_installchangelogs -p$@ -P$(b)/$@
dh_install -p$@ -P$(b)/$@
# cp debian/reportbug.presubj $(b)/$@/usr/share/bug/icedax/presubj
dh_strip -p$@ -P$(b)/$@
chmod 755 $(b)/$@/usr/bin/cdda2*
dh_link -p$@ -P$(b)/$@
chmod 755 $(b)/$@/usr/bin/readmult
chmod 755 $(b)/$@/usr/bin/pitchplay
dh_installman -p$@ -P$(b)/$@
# cludge, integrate into the official BS later
# dh_installman -p$@ -P$(b)/$@ doc/readmult.man doc/pitchplay.man doc/list_audio_tracks.man
dh_compress -p$@ -P$(b)/$@
dh_fixperms -p$@ -P$(b)/$@
dh_makeshlibs -p$@ -P$(b)/$@ -V
dh_installdeb -p$@ -P$(b)/$@
dh_shlibdeps -p$@ -P$(b)/$@
dh_gencontrol -p$@ -P$(b)/$@
dh_md5sums -p$@ -P$(b)/$@
dh_builddeb -p$@ -P$(b)/$@
#
# cdrkit-doc
#
cdrkit-doc: install
@echo "--- Building: $@"
dh_installdirs -p$@ -P$(b)/$@
dh_installdocs -p$@ -P$(b)/$@
dh_installchangelogs -p$@ -P$(b)/$@
dh_install -p$@ -P$(b)/$@
dh_link -p$@ -P$(b)/$@
@-find $(b)/$@ | grep '\.svn' | xargs rm -rf
# dh_strip -p$@ -P$(b)/$@
dh_compress -p$@ -P$(b)/$@
dh_fixperms -p$@ -P$(b)/$@
dh_installdeb -p$@ -P$(b)/$@
# dh_shlibdeps -p$@ -P$(b)/$@
dh_gencontrol -p$@ -P$(b)/$@
dh_md5sums -p$@ -P$(b)/$@
dh_builddeb -p$@ -P$(b)/$@
binary: binary-indep binary-arch
.PHONY: binary clean binary-indep binary-arch build install install-save install-saved
|