| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
# DH_VERBOSE := 1 |
| 4 |
|
| 5 |
# export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 6 |
# --> g++ -o test_gzip test_gzip.o -fPIE -pie -Wl,-z,relro -Wl,-z,now -L. -lgzstream -lz |
| 7 |
# /usr/bin/ld: test_gzip.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC |
| 8 |
|
| 9 |
TMPLIBS=debian/tmplibs |
| 10 |
|
| 11 |
export DEB_BUILD_MAINT_OPTIONS=hardening=+all |
| 12 |
|
| 13 |
%: |
| 14 |
dh $@ --no-parallel |
| 15 |
|
| 16 |
override_dh_clean: |
| 17 |
dh_clean |
| 18 |
rm -rf $(TMPLIBS) |
| 19 |
|
| 20 |
override_dh_auto_clean: |
| 21 |
dh_auto_clean || true # In clean stage the Makefile is not patched yet and thus might stumble upon removal of not existing files |
| 22 |
|
| 23 |
override_dh_auto_install: |
| 24 |
echo 'Ignore upstream Makefile install since it does not respect $$(PREFIX)' |
| 25 |
|
| 26 |
override_dh_install: |
| 27 |
mkdir -p $(TMPLIBS) |
| 28 |
mv libgzstream.a $(TMPLIBS) |
| 29 |
mv libgzstream.so* $(TMPLIBS) |
| 30 |
d-shlibmove --commit \ |
| 31 |
--multiarch \ |
| 32 |
--devunversioned \ |
| 33 |
--exclude-la \ |
| 34 |
--movedev *.h usr/include \ |
| 35 |
debian/tmplibs/*.so |
| 36 |
cp debian/libgzstream-dev/usr/include/gzstream.h gzstream.h |
| 37 |
|
| 38 |
get-orig-source: |
| 39 |
wget -O ../gzstream.tgz http://www.cs.unc.edu/Research/compgeom/gzstream/gzstream.tgz |
| 40 |
mk-origtargz --repack --compress xz gzstream.tgz |