The following changes were made:
* Moved to new version scheme * Moved make/make install out of variables * Corrected patch loop
This commit is contained in:
23
Makefile
23
Makefile
@@ -13,17 +13,13 @@ ARCH = x86_64
|
||||
URL = https://www.gnu.org/software/wget/
|
||||
DESC = GNU Wget is a free software package for retrieving files using \
|
||||
HTTP, HTTPS and FTP, the most widely-used Internet protocols
|
||||
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
|
||||
|
||||
@@ -43,9 +39,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 +52,7 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure
|
||||
--target=x86_64-snap-linux-gnu
|
||||
|
||||
$(SRCDIR)/src/wget: $(SRCDIR)/config.log
|
||||
@cd $(SRCDIR); \
|
||||
$(MAKE)
|
||||
@cd $(SRCDIR) && make
|
||||
|
||||
$(ROOT): $(SRCDIR)/src/wget
|
||||
@if [ -d $(ROOT) ]; then \
|
||||
@@ -65,10 +61,7 @@ $(ROOT): $(SRCDIR)/src/wget
|
||||
mkdir -v $(ROOT); \
|
||||
fi
|
||||
|
||||
@cd $(SRCDIR); \
|
||||
$(MAKEINST) DESTDIR=$(ROOT)
|
||||
|
||||
@$(SNAPHACKS)
|
||||
@cd $(SRCDIR) && make install DESTDIR=$(ROOT)
|
||||
|
||||
test: $(ROOT)
|
||||
@cd $(SRCDIR); \
|
||||
|
||||
Reference in New Issue
Block a user