| 1 |
#!/usr/bin/make -f
|
| 2 |
#
|
| 3 |
# debian/rules file for botox. GPL2
|
| 4 |
# Original from Erik Andersen <andersee@debian.org>
|
| 5 |
#
|
| 6 |
|
| 7 |
PACKAGE = botox
|
| 8 |
|
| 9 |
COPTX = -g
|
| 10 |
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
| 11 |
COPTX += -O0
|
| 12 |
else
|
| 13 |
COPTX += -O2
|
| 14 |
endif
|
| 15 |
|
| 16 |
#include /usr/share/dpatch/dpatch.make
|
| 17 |
|
| 18 |
i=$(shell pwd)/debian/tmp/usr
|
| 19 |
b=$(shell pwd)/debian/build
|
| 20 |
iso=mkisofs
|
| 21 |
cdd=cdda2wav
|
| 22 |
cdr=wodim
|
| 23 |
ziso_VERSION = $(shell cat zisofs_tools/version)
|
| 24 |
source_VERSION= $(shell dpkg-parsechangelog | sed -ne '/^Version:/s/^V.*://p')
|
| 25 |
|
| 26 |
#ifeq ($(dvd),yes)
|
| 27 |
#dvdclean=unapplydvd
|
| 28 |
#dvdbuild=applydvd-stamp
|
| 29 |
#endif
|
| 30 |
|
| 31 |
#applydvd-stamp:
|
| 32 |
# @if test -e debian/patched/06_dautipps.dpatch ; then \
|
| 33 |
# debian/patches/06_dautipps.dpatch -unpatch && \
|
| 34 |
# rm -f debian/patched/06_dautipps.dpatch; \
|
| 35 |
# fi
|
| 36 |
# @if test -e debian/patched/07_noadvertising.dpatch ; then \
|
| 37 |
# debian/patches/07_noadvertising.dpatch -unpatch && \
|
| 38 |
# rm -f debian/patched/07_noadvertising.dpatch; \
|
| 39 |
# fi
|
| 40 |
# @if test -e debian/patched/17_argv0_beautify.dpatch ; then \
|
| 41 |
# debian/patches/17_argv0_beautify.dpatch -unpatch && \
|
| 42 |
# rm -f debian/patched/17_argv0_beautify.dpatch; \
|
| 43 |
# fi
|
| 44 |
# @chmod +x debian/patches/07_dvdsup.dpatch && \
|
| 45 |
# debian/patches/07_dvdsup.dpatch -patch && \
|
| 46 |
# touch applydvd-stamp
|
| 47 |
#
|
| 48 |
#unapplydvd:
|
| 49 |
# @if test -e applydvd-stamp ; then \
|
| 50 |
# chmod +x debian/patches/07_dvdsup.dpatch ; \
|
| 51 |
# debian/patches/07_dvdsup.dpatch -unpatch ; \
|
| 52 |
# rm -f applydvd-stamp ; \
|
| 53 |
# fi
|
| 54 |
|
| 55 |
#build: patch $(dvdbuild) build-debstamp
|
| 56 |
build: build-debstamp
|
| 57 |
build-debstamp:
|
| 58 |
# @if test -f ../botox_$(source_VERSION).tar.gz ; then \
|
| 59 |
# echo "You should not create native packages! Remove ../botox_$(source_VERSION).tar.gz and copy upstream source to .orig.tar.gz" ; \
|
| 60 |
# exit 1 ; \
|
| 61 |
# fi
|
| 62 |
@echo "--- Compiling"
|
| 63 |
dh_testdir
|
| 64 |
$(MAKE) all
|
| 65 |
# cp /usr/share/misc/config.sub /usr/share/misc/config.guess conf
|
| 66 |
# echo "#define ZISOFS_TOOLS_VERSION \"$(ziso_VERSION)\"" > zisofs_tools/version.h
|
| 67 |
touch build-debstamp
|
| 68 |
|
| 69 |
clean: unpatch $(dvdclean)
|
| 70 |
@echo "--- Cleaning"
|
| 71 |
dh_testdir
|
| 72 |
dh_testroot
|
| 73 |
-rm -rf debian/patched
|
| 74 |
-rm -rf wodim-1.8.1_de-doc_0.1
|
| 75 |
-./.clean
|
| 76 |
rm -f build-debstamp install-debstamp conf/config.sub conf/config.guess
|
| 77 |
dh_clean -k
|
| 78 |
# clean up the stuff dh_clean leaves behind
|
| 79 |
-rm -rf debian/build debian/files
|
| 80 |
-rm -f `find . -type d | grep OBJ`
|
| 81 |
-rm -f `find . -type d | grep CVS`
|
| 82 |
-rm -f `find . -name "*~"`
|
| 83 |
-rm -rf `find . -name "\.deps"`
|
| 84 |
-rm -rf `find . -name "\.libs"`
|
| 85 |
-rm -rf `find . -name "*\.rej"`
|
| 86 |
-rm -rf zisofs_tools
|
| 87 |
-rm -f wodim.mmap
|
| 88 |
|
| 89 |
install: build install-debstamp
|
| 90 |
install-debstamp:
|
| 91 |
@echo "--- Installing"
|
| 92 |
dh_testdir
|
| 93 |
dh_testroot
|
| 94 |
dh_clean
|
| 95 |
rm -rf $(b)
|
| 96 |
# Fixate the target dir in the cahced settings
|
| 97 |
cmake -DCMAKE_INSTALL_PREFIX:PATH=$(i) build
|
| 98 |
make install
|
| 99 |
|
| 100 |
install -m 755 cdda2wav/cdda2ogg $(i)/bin/
|
| 101 |
install -m 755 cdda2wav/cdda2mp3 $(i)/bin/
|
| 102 |
install -m 755 cdda2wav/readmult $(i)/bin/
|
| 103 |
install -m 755 cdda2wav/pitchplay $(i)/bin/
|
| 104 |
touch install-debstamp
|
| 105 |
|
| 106 |
install-save: install
|
| 107 |
rm -rf $(i).saved
|
| 108 |
cp -a $(i) $(i).saved
|
| 109 |
|
| 110 |
install-saved:
|
| 111 |
rm -rf $(i)
|
| 112 |
cp -a $(i).saved $(i)
|
| 113 |
rm -rf $(b)
|
| 114 |
touch install-debstamp
|
| 115 |
|
| 116 |
binary-indep: build install botox-doc
|
| 117 |
|
| 118 |
binary-arch: build install \
|
| 119 |
wodim \
|
| 120 |
mkisofs \
|
| 121 |
cdda2wav
|
| 122 |
|
| 123 |
#
|
| 124 |
# wodim
|
| 125 |
#
|
| 126 |
|
| 127 |
wodim: install
|
| 128 |
@echo "--- Building: $@"
|
| 129 |
dh_installdirs -p$@ -P$(b)/$@
|
| 130 |
cp -a cdrecord/wodim.dfl $(b)/$@/etc/default/wodim
|
| 131 |
cp -a rscsi/rscsi.dfl $(b)/$@/etc/default/rscsi
|
| 132 |
# cp debian/reportbug.presubj $(b)/$@/usr/share/bug/wodim/presubj
|
| 133 |
#ifeq ($(dvd),yes)
|
| 134 |
# install -m755 debian/dvd.reportbug $(b)/$@/usr/share/bug/wodim/script
|
| 135 |
#endif
|
| 136 |
dh_link -p$@ -P$(b)/$@
|
| 137 |
dh_installdocs -p$@ -P$(b)/$@
|
| 138 |
dh_installchangelogs -p$@ -P$(b)/$@ Changelog
|
| 139 |
dh_install -p$@ -P$(b)/$@
|
| 140 |
dh_strip -p$@ -P$(b)/$@
|
| 141 |
dh_installexamples -p$@ -P$(b)/$@ rscsi/rscsi.dfl cdrecord/wodim.dfl
|
| 142 |
dh_compress -p$@ -P$(b)/$@
|
| 143 |
dh_fixperms -p$@ -P$(b)/$@
|
| 144 |
dh_installdeb -p$@ -P$(b)/$@
|
| 145 |
dh_shlibdeps -p$@ -P$(b)/$@
|
| 146 |
dh_installdebconf -p$@ -P$(b)/$@
|
| 147 |
dh_gencontrol -p$@ -P$(b)/$@
|
| 148 |
dh_makeshlibs -p$@ -P$(b)/$@ -V
|
| 149 |
dh_md5sums -p$@ -P$(b)/$@
|
| 150 |
dh_builddeb -p$@ -P$(b)/$@
|
| 151 |
|
| 152 |
|
| 153 |
#
|
| 154 |
# mkisofs
|
| 155 |
#
|
| 156 |
|
| 157 |
mkisofs: install
|
| 158 |
@echo "--- Building: $@"
|
| 159 |
dh_installdirs -p$@ -P$(b)/$@
|
| 160 |
dh_installdocs -p$@ -P$(b)/$@
|
| 161 |
dh_installchangelogs -p$@ -P$(b)/$@ $(iso)/ChangeLog zisofs_tools/CHANGES
|
| 162 |
dh_install -p$@ -P$(b)/$@
|
| 163 |
# dh_installman -p$@ -P$(b)/$@ 3rd-party/dirsplit-0.3.3/dirsplit.1
|
| 164 |
# cp debian/reportbug.presubj $(b)/$@/usr/share/bug/mkisofs/presubj
|
| 165 |
# rm -f $(b)/$@/usr/bin/mkhybrid $(b)/$@/usr/share/man/man8/mkhybrid*
|
| 166 |
dh_link -p$@ -P$(b)/$@
|
| 167 |
dh_strip -p$@ -P$(b)/$@
|
| 168 |
dh_compress -p$@ -P$(b)/$@
|
| 169 |
dh_fixperms -p$@ -P$(b)/$@
|
| 170 |
dh_installdeb -p$@ -P$(b)/$@
|
| 171 |
dh_shlibdeps -p$@ -P$(b)/$@
|
| 172 |
dh_gencontrol -p$@ -P$(b)/$@
|
| 173 |
dh_makeshlibs -p$@ -P$(b)/$@ -V
|
| 174 |
dh_md5sums -p$@ -P$(b)/$@
|
| 175 |
dh_builddeb -p$@ -P$(b)/$@
|
| 176 |
|
| 177 |
|
| 178 |
#
|
| 179 |
# cdda2wav
|
| 180 |
#
|
| 181 |
|
| 182 |
cdda2wav: install
|
| 183 |
@echo "--- Building: $@"
|
| 184 |
dh_installdirs -p$@ -P$(b)/$@
|
| 185 |
dh_installdocs -p$@ -P$(b)/$@
|
| 186 |
dh_installchangelogs -p$@ -P$(b)/$@
|
| 187 |
dh_install -p$@ -P$(b)/$@
|
| 188 |
# cp debian/reportbug.presubj $(b)/$@/usr/share/bug/cdda2wav/presubj
|
| 189 |
dh_strip -p$@ -P$(b)/$@
|
| 190 |
chmod 755 $(b)/$@/usr/bin/cdda2*
|
| 191 |
dh_link -p$@ -P$(b)/$@
|
| 192 |
chmod 755 $(b)/$@/usr/bin/readmult
|
| 193 |
chmod 755 $(b)/$@/usr/bin/pitchplay
|
| 194 |
dh_installman -p$@ -P$(b)/$@
|
| 195 |
# cludge, integrate into the official BS later
|
| 196 |
# dh_installman -p$@ -P$(b)/$@ doc/readmult.man doc/pitchplay.man doc/list_audio_tracks.man
|
| 197 |
dh_compress -p$@ -P$(b)/$@
|
| 198 |
dh_fixperms -p$@ -P$(b)/$@
|
| 199 |
dh_installdeb -p$@ -P$(b)/$@
|
| 200 |
dh_shlibdeps -p$@ -P$(b)/$@
|
| 201 |
dh_gencontrol -p$@ -P$(b)/$@
|
| 202 |
dh_makeshlibs -p$@ -P$(b)/$@ -V
|
| 203 |
dh_md5sums -p$@ -P$(b)/$@
|
| 204 |
dh_builddeb -p$@ -P$(b)/$@
|
| 205 |
|
| 206 |
|
| 207 |
#
|
| 208 |
# botox-doc
|
| 209 |
#
|
| 210 |
|
| 211 |
botox-doc: install
|
| 212 |
@echo "--- Building: $@"
|
| 213 |
dh_installdirs -p$@ -P$(b)/$@
|
| 214 |
dh_installdocs -p$@ -P$(b)/$@
|
| 215 |
dh_installchangelogs -p$@ -P$(b)/$@
|
| 216 |
dh_install -p$@ -P$(b)/$@
|
| 217 |
dh_link -p$@ -P$(b)/$@
|
| 218 |
dh_strip -p$@ -P$(b)/$@
|
| 219 |
dh_compress -p$@ -P$(b)/$@
|
| 220 |
dh_fixperms -p$@ -P$(b)/$@
|
| 221 |
dh_installdeb -p$@ -P$(b)/$@
|
| 222 |
dh_shlibdeps -p$@ -P$(b)/$@
|
| 223 |
dh_gencontrol -p$@ -P$(b)/$@
|
| 224 |
dh_md5sums -p$@ -P$(b)/$@
|
| 225 |
dh_builddeb -p$@ -P$(b)/$@
|
| 226 |
|
| 227 |
binary: binary-indep binary-arch
|
| 228 |
.PHONY: binary clean binary-indep binary-arch build install install-save install-saved patch unpatch unapplydvd
|