]> git.proxmox.com Git - mirror_zfs-debian.git/blobdiff - debian/rules
Replace get_next.sh with one-liner awk script in rules.
[mirror_zfs-debian.git] / debian / rules
index f445b58c568023182cc3985f1084799f7d781738..691e054fdde37383d9d521a8cfbe0c463d7b3eff 100755 (executable)
@@ -4,6 +4,7 @@ include /usr/share/dpkg/default.mk
 
 LSB_DISTRIBUTOR := $(shell lsb_release -is)
 NAME := $(shell awk '$$1 == "Name:" { print $$2; }' META)
+LINUX_NEXT := $(shell awk -F. '{print $$1 "." $$2+1}' debian/linux_compat)
 
 DKMSFILES := module include config zfs.release.in autogen.sh META AUTHORS \
                DISCLAIMER COPYRIGHT OPENSOLARIS.LICENSE README.markdown
@@ -34,7 +35,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
        dh $@ --with autoreconf,dkms,python3,systemd --parallel
 
 override_dh_auto_configure:
-       @cp debian/control.in debian/control
+       sed "s/@LINUX_COMPAT@/linux-libc-dev \(<< $(LINUX_NEXT)\)/" debian/control.in > debian/control
 ifeq ($(BUILD_UDEB), true)
        cat debian/control.udeb.in >> debian/control
 endif
@@ -48,6 +49,7 @@ endif
          --sbindir=/sbin \
          --libdir=/lib \
          --with-udevdir=/lib/udev \
+         --enable-systemd \
          --with-systemdunitdir=/lib/systemd/system \
          --with-systemdpresetdir=/lib/systemd/system-preset \
          --with-config=user
@@ -80,7 +82,8 @@ override_dh_auto_install:
 
        @# Install the DKMS source.
        @# We only want the files needed to build the modules
-       mkdir -p '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)'
+       mkdir -p '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/scripts'
+       cp '$(CURDIR)/scripts/enum-extract.pl' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/scripts'
        $(foreach file,$(DKMSFILES),mv '$(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/$(file)' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)' || exit 1;)
        @# Hellish awk line:
        @#  * Deletes from configure.ac the parts not needed for building the kernel module
@@ -141,7 +144,7 @@ override_dh_auto_clean:
        dh_auto_clean
        debconf-updatepo
        @if test -e META.orig; then mv META.orig META; fi
-       cp debian/control.in debian/control
+       sed "s/@LINUX_COMPAT@/linux-libc-dev \(<< $(LINUX_NEXT)\)/" debian/control.in > debian/control
 ifeq ($(BUILD_UDEB), true)
        cat debian/control.udeb.in >> debian/control
 endif