summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules27
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..fce1c6c
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,27 @@
+#!/usr/bin/make -f
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+include /usr/share/dpkg/architecture.mk
+ifeq ($(origin CC),default)
+CC = $(DEB_HOST_GNU_TYPE)-gcc
+endif
+
+%:
+ dh ${@}
+
+override_dh_auto_build:
+ dh_auto_build -- CC=$(CC) CFLAGS="$(CFLAGS) $(CPPFLAGS) -Os -ansi" LDFLAGS="$(LDFLAGS)"
+
+override_dh_auto_install:
+ dh_auto_install -- prefix=/usr
+
+ # remove useless files
+ rm -f debian/tmp/usr/share/doc/dmidecode/CHANGELOG
+ rm -f debian/tmp/usr/share/doc/dmidecode/README
+
+override_dh_install:
+ dh_install --fail-missing
+
+override_dh_strip:
+ dh_strip --dbg-package=dmidecode-dbg