diff --git a/Makefile b/Makefile index 540ad7d..8e00af2 100644 --- a/Makefile +++ b/Makefile @@ -8,23 +8,20 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -DEPENDS = curl +DEPENDS = glibc,libcurl,libexpat,openssl,zlib ARCH = x86_64 URL = http://git-scm.com/ +BRIEF = The Git version control system DESC = Git is a free and open source distributed version control system \ designed to handle everything from small to very large projects with \ speed and efficiency. -SNAPVER = sr0 +SNAPVER = 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') SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//') PATCHDIR := $(PWD)/SRC/patches -VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')$(SNAPVER) - -MAKE = make -MAKEINST = make install -SNAPHACKS = +VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')-$(SNAPVER) include /usr/share/snap/Makefile.snaplinux @@ -44,9 +41,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 \ @@ -55,8 +53,7 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure --target=x86_64-snap-linux-gnu $(SRCDIR)/git: $(SRCDIR)/config.log - @cd $(SRCDIR); \ - $(MAKE) + @cd $(SRCDIR) && make $(ROOT): $(SRCDIR)/git @if [ -d $(ROOT) ]; then \ @@ -65,10 +62,7 @@ $(ROOT): $(SRCDIR)/git mkdir -v $(ROOT); \ fi - @cd $(SRCDIR); \ - $(MAKEINST) DESTDIR=$(ROOT) - - @$(SNAPHACKS) + @cd $(SRCDIR) && make install DESTDIR=$(ROOT) test: $(ROOT) @cd $(SRCDIR); \