]> git.proxmox.com Git - mirror_zfs-debian.git/commitdiff
Replace get_next.sh with one-liner awk script in rules.
authorMo Zhou <cdluminate@gmail.com>
Wed, 19 Sep 2018 04:24:00 +0000 (04:24 +0000)
committerMo Zhou <cdluminate@gmail.com>
Wed, 19 Sep 2018 04:24:00 +0000 (04:24 +0000)
debian/get_next.sh [deleted file]
debian/rules

diff --git a/debian/get_next.sh b/debian/get_next.sh
deleted file mode 100755 (executable)
index 890fd45..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-SUPPORT=$(cat debian/linux_compat)
-MAJOR=$(echo $SUPPORT|cut -d'.' -f1)
-MINOR=$(echo $SUPPORT|cut -d'.' -f2)
-NEXT=$((MINOR+1))
-
-echo "${MAJOR}.${NEXT}"
index e2c5a25f2534b303e9728c520c9786bb52b46da3..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:
-       sed "s/@LINUX_COMPAT@/linux-libc-dev \(<< $(shell debian/get_next.sh)\)/" 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
@@ -143,7 +144,7 @@ override_dh_auto_clean:
        dh_auto_clean
        debconf-updatepo
        @if test -e META.orig; then mv META.orig META; fi
-       sed "s/@LINUX_COMPAT@/linux-libc-dev \(<< $(shell debian/get_next.sh)\)/" 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