diff --git a/Makefile b/Makefile index 97f63e6..d6616d0 100644 --- a/Makefile +++ b/Makefile @@ -11,15 +11,16 @@ DEPENDS = glibc ARCH = x86_64 URL = http://www.gnu.org/software/grep/ +BRIEF = Pattern searching utility DESC = Grep searches one or more input files for lines containing a match to \ a specified pattern. -SNAPVER = sr1 +SNAPVER = 2 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) +VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')-$(SNAPVER) include /usr/share/snap/Makefile.snaplinux @@ -39,9 +40,10 @@ $(SRCDIR)/configure: $(ARCHIVE) @touch $(SRCDIR)/configure $(SRCDIR)/config.log: $(SRCDIR)/configure - @if [ -f $(PATCHDIR)/*.patch ]; then \ - cd $(SRCDIR) && cat $(PATCHDIR)/*.patch|patch --verbose -Np1; \ - fi + @cd $(SRCDIR) && \ + for patch in `find $(PATCHDIR) -name \*.patch|sort`; do \ + patch --verbose -Np1 -i $$patch; \ + done @cd $(SRCDIR); \ ./configure \ --prefix=/usr \