Fixed patching routine

This commit is contained in:
2016-10-16 18:48:16 -05:00
parent 0fe40121f2
commit f3d564436d

View File

@@ -12,18 +12,22 @@ DEPENDS =
ARCH = x86_64 ARCH = x86_64
URL = http://www.gnu.org/software/bash/ URL = http://www.gnu.org/software/bash/
DESC = Bash is the GNU Project\'s shell 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) ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n') TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//') SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//')
PATCHDIR := $(PWD)/SRC/patches 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 MAKE = make
MAKEINST = make install MAKEINST = make install
SNAPHACKS = @if [ ! -f $(ROOT)/bin/sh ]; then \ 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 include /usr/share/snap/Makefile.snaplinux
@@ -42,7 +46,8 @@ $(SRCDIR)/configure: $(ARCHIVE)
fi fi
$(SRCDIR)/config.log: $(SRCDIR)/configure $(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; \ patch --verbose -Np0 -i $$patch; \
done done
@cd $(SRCDIR); \ @cd $(SRCDIR); \