summaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:31:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:31:56 +0000
commit0f8bda193d0dc185420c6196d20fa1d63e8f090f (patch)
tree0252e34cbe37904122165c69df9793761a502985 /debian/rules
parentAdding upstream version 1.6.12. (diff)
downloadgeoip-debian.tar.xz
geoip-debian.zip
Adding debian version 1.6.12-10.debian/1.6.12-10debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules35
1 files changed, 35 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..fb30dd7
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,35 @@
+#!/usr/bin/make -f
+
+export DEB_BUILD_OPTIONS+=nocheck
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+include /usr/share/dpkg/architecture.mk
+include /usr/share/dpkg/pkg-info.mk
+
+ifeq ($(origin CXX),default)
+ CXX = $(DEB_HOST_GNU_TYPE)-g++
+endif
+
+%:
+ dh $@ --with autoreconf
+
+override_dh_auto_install:
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+ # Build the build script.
+ $(CXX) $(CPPFLAGS) -std=gnu++11 $(LDFLAGS) -g debian/src/geoip-csv-to-dat.cpp -o debian/tmp/geoip-generator -lGeoIP \
+ -I $(CURDIR)/debian/tmp/usr/include/ -L $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/
+ $(CXX) $(CPPFLAGS) -std=gnu++11 $(LDFLAGS) -g debian/src/geoip-asn-csv-to-dat.cpp -o debian/tmp/geoip-generator-asn -lGeoIP \
+ -I $(CURDIR)/debian/tmp/usr/include/ -L $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/
+ chrpath -d -k debian/tmp/usr/bin/geoip*
+
+override_dh_auto_configure:
+ dh_auto_configure -- GREP=/bin/grep MKDIR_P="/bin/mkdir -p" SED=/bin/sed SHELL=/bin/bash
+
+override_dh_installexamples:
+ dh_installexamples
+ rm -f $(CURDIR)/debian/libgeoip-dev/usr/share/doc/libgeoip-dev/examples/Makefile
+
+override_dh_install:
+ dh_install
+ strip --remove-section=.comment \
+ $(CURDIR)/debian/libgeoip-dev/usr/lib/$(DEB_HOST_MULTIARCH)/libGeoIP.a