summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules31
1 files changed, 25 insertions, 6 deletions
diff --git a/debian/rules b/debian/rules
index 8a24d86..4ea6435 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,29 +1,44 @@
#!/usr/bin/make -f
+include /usr/share/dpkg/architecture.mk
+
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
+shared = libdwarf.so.0
+
#!/usr/bin/make -f
%:
- dh $@ --with quilt
+ dh $@ --with autoreconf
+
+override_dh_autoreconf:
+ dh_autoreconf autoreconf -- -i -f \
+ libdwarf
override_dh_auto_build:
+ # configure and build shared library
+ cd libdwarf && ./configure --enable-shared --disable-nonshared
+ cd libdwarf && make $(shared) && cp $(shared) ../ && make distclean
# configure and build library
cd libdwarf; ./configure --prefix=$(CURDIR)/debian/libdwarf-dev
cd libdwarf; make
+ # We will link to shared library:
+ ln -sf ../$(shared) libdwarf/libdwarf.so
# configure and build dwarfdump
cd dwarfdump; ./configure --prefix=$(CURDIR)/debian/dwarfdump
- cd dwarfdump; make
+ cd dwarfdump; LD_LIBRARY_PATH=../libdwarf make
# configure and build dwarfdump2
cd dwarfdump2; ./configure --prefix=$(CURDIR)/debian/dwarfdump2
- cd dwarfdump2; make
+ cd dwarfdump2; LD_LIBRARY_PATH=../libdwarf make
dh_auto_build
override_dh_auto_clean:
+ rm -f libdwarf.so.*
+ rm -f libdwarf/libdwarf.so*
# configure and build library
- cd libdwarf; ./configure --prefix=$(CURDIR)/debian/libdwarf-dev
- cd libdwarf; make distclean
+ cd libdwarf; ./configure --prefix=$(CURDIR)/debian/libdwarf-dev || true
+ cd libdwarf; make distclean || true
# configure and build dwarfdump
cd dwarfdump; ./configure --prefix=$(CURDIR)/debian/dwarfdump
cd dwarfdump; make distclean
@@ -33,7 +48,11 @@ override_dh_auto_clean:
dh_auto_clean
override_dh_auto_install:
- cp libdwarf/libdwarf.a $(CURDIR)/debian/libdwarf-dev/usr/lib/
+ mkdir -p $(CURDIR)/debian/libdwarf0/usr/lib/$(DEB_HOST_MULTIARCH)
+ mkdir -p $(CURDIR)/debian/libdwarf-dev/usr/lib/$(DEB_HOST_MULTIARCH)
+ cp $(shared) $(CURDIR)/debian/libdwarf0/usr/lib/$(DEB_HOST_MULTIARCH)/
+ ln -sf $(shared) $(CURDIR)/debian/libdwarf-dev/usr/lib/$(DEB_HOST_MULTIARCH)/libdwarf.so
+ cp libdwarf/libdwarf.a $(CURDIR)/debian/libdwarf-dev/usr/lib/$(DEB_HOST_MULTIARCH)/
cp libdwarf/dwarf.h libdwarf/libdwarf.h $(CURDIR)/debian/libdwarf-dev/usr/include/
cp libdwarf/*.pdf $(CURDIR)/debian/libdwarf-dev/usr/share/doc/libdwarf-dev
cp libdwarf/[NR]* $(CURDIR)/debian/libdwarf-dev/usr/share/doc/libdwarf-dev