diff --git a/Makefile b/Makefile index e43853a..5de2f8d 100644 --- a/Makefile +++ b/Makefile @@ -8,22 +8,19 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -DEPENDS = gdbm,groff,libpipeline,zlib +DEPENDS = gdbm,glibc,libpipeline,zlib ARCH = x86_64 URL = http://man-db.nongnu.org/ +BRIEF = Unix documentation system DESC = man-db is an implementation of the standard Unix documentation system \ accessed using the man command. -SNAPVER = sr0 +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) - -MAKE = make -MAKEINST = make install -SNAPHACKS = +VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')-$(SNAPVER) include /usr/share/snap/Makefile.snaplinux @@ -43,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 -Np0 -i $$patch; \ + done @cd $(SRCDIR); \ ./configure \ --prefix=/usr \ @@ -59,8 +57,7 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure --target=x86_64-snap-linux-gnu $(SRCDIR)/src/.libs/man: $(SRCDIR)/config.log - @cd $(SRCDIR); \ - $(MAKE) + @cd $(SRCDIR) && make $(ROOT): $(SRCDIR)/src/.libs/man @if [ -d $(ROOT) ]; then \ @@ -69,10 +66,7 @@ $(ROOT): $(SRCDIR)/src/.libs/man mkdir -v $(ROOT); \ fi - @cd $(SRCDIR); \ - $(MAKEINST) DESTDIR=$(ROOT) - - @$(SNAPHACKS) + @cd $(SRCDIR) && make install DESTDIR=$(ROOT) test: $(ROOT) @cd $(SRCDIR); \