]> git.proxmox.com Git - mirror_spl-debian.git/commitdiff
Replace get_next.sh with one-liner awk script in rules.
authorMo Zhou <cdluminate@gmail.com>
Tue, 18 Sep 2018 09:33:33 +0000 (09:33 +0000)
committerMo Zhou <cdluminate@gmail.com>
Tue, 18 Sep 2018 09:33:33 +0000 (09:33 +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 b9db43bac6ad22f77f8f9ea08c381e290a324a5c..0fc1a54a2d43a8f96905985646e8ad28c5dd2142 100755 (executable)
@@ -5,6 +5,7 @@ include /usr/share/dpkg/pkg-info.mk
 NAME := spl
 VERSION := $(DEB_VERSION_UPSTREAM)
 REVISION := $(shell echo $(DEB_VERSION) | cut -d- -f2)
+LINUX_NEXT := $(shell awk -F. '{print $1 "." $2+1}' debian/linux_compat)
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
@@ -23,7 +24,7 @@ pmodules = $(NAME)-modules-$(non_epoch_version)
        dh $@ --with dkms,autoreconf --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
 
        @# Embed the downstream version in the module.
        @sed \
@@ -62,7 +63,7 @@ override_dh_dkms:
 override_dh_auto_clean:
        dh_auto_clean
        @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
 
 # ------------