From f3d564436d04affc6922c10d70b4321b1669d64d Mon Sep 17 00:00:00 2001 From: Jay Larson Date: Sun, 16 Oct 2016 18:48:16 -0500 Subject: [PATCH] Fixed patching routine --- Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index a487ce9..13b0e29 100644 --- a/Makefile +++ b/Makefile @@ -12,18 +12,22 @@ DEPENDS = ARCH = x86_64 URL = http://www.gnu.org/software/bash/ DESC = Bash is the GNU Project\'s shell -SNAPVER = sr0 +SNAPVER = sr1 ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1) TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n') SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//') PATCHDIR := $(PWD)/SRC/patches -VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')$(SNAPVER) +PATCHLVL := $(shell cat $(PATCHDIR)/*.patch|grep '\#define PATCHLEVEL'|\ + tail -1|awk '{print $$NF}') +VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//'|\ + sed 's/[0-9]*$$/$(PATCHLVL)/')$(SNAPVER) MAKE = make MAKEINST = make install SNAPHACKS = @if [ ! -f $(ROOT)/bin/sh ]; then \ - ln -sv bash $(ROOT)/bin/sh; fi + ln -sv bash $(ROOT)/bin/sh; fi && \ + rm -v $(ROOT)/usr/share/info/dir include /usr/share/snap/Makefile.snaplinux @@ -42,7 +46,8 @@ $(SRCDIR)/configure: $(ARCHIVE) fi $(SRCDIR)/config.log: $(SRCDIR)/configure - @cd $(SRCDIR) && for patch in `find $(PATCHDIR) -name \*.patch`; do \ + @cd $(SRCDIR) && \ + for patch in `find $(PATCHDIR) -name \*.patch|sort`; do \ patch --verbose -Np0 -i $$patch; \ done @cd $(SRCDIR); \