summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules32
1 files changed, 32 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 00000000..12338971
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,32 @@
+#!/usr/bin/make -f
+
+include /usr/share/dpkg/architecture.mk
+ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+ CC := $(DEB_HOST_GNU_TYPE)-gcc
+else
+ CC := gcc
+endif
+
+SHELL := sh -e
+
+CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
+CFLAGS := $(patsubst -O2,-Os,$(CFLAGS))
+
+%:
+ dh ${@} --parallel
+
+override_dh_auto_configure:
+ dh_auto_configure -- --bindir=/bin
+
+override_dh_auto_install:
+ dh_auto_install --destdir=debian/btrfs-progs
+
+ # Adding initramfs-tools integration
+ install -D -m 0755 debian/local/btrfs.hook debian/btrfs-progs/usr/share/initramfs-tools/hooks/btrfs
+ install -D -m 0755 debian/local/btrfs.local-premount debian/btrfs-progs/usr/share/initramfs-tools/scripts/local-premount/btrfs
+
+# Needs autopkgtest
+override_dh_auto_test:
+
+override_dh_strip:
+ dh_strip --dbg-package=btrfs-progs-dbg