The following changes were made:
* Moved to new version scheme * corrected patch loop * Moved make and make install out of variables
This commit is contained in:
19
Makefile
19
Makefile
@@ -13,17 +13,13 @@ ARCH = x86_64
|
|||||||
URL = https://rsync.samba.org/
|
URL = https://rsync.samba.org/
|
||||||
DESC = rsync is an open source utility that provides fast incremental file \
|
DESC = rsync is an open source utility that provides fast incremental file \
|
||||||
transfer
|
transfer
|
||||||
SNAPVER = sr0
|
SNAPVER = 1
|
||||||
|
|
||||||
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)
|
VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')-$(SNAPVER)
|
||||||
|
|
||||||
MAKE = make
|
|
||||||
MAKEINST = make install
|
|
||||||
SNAPHACKS =
|
|
||||||
|
|
||||||
include /usr/share/snap/Makefile.snaplinux
|
include /usr/share/snap/Makefile.snaplinux
|
||||||
|
|
||||||
@@ -43,7 +39,8 @@ $(SRCDIR)/configure: $(ARCHIVE)
|
|||||||
@touch $(SRCDIR)/configure
|
@touch $(SRCDIR)/configure
|
||||||
|
|
||||||
$(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 -Np1 -i $$patch; \
|
patch --verbose -Np1 -i $$patch; \
|
||||||
done
|
done
|
||||||
@cd $(SRCDIR); \
|
@cd $(SRCDIR); \
|
||||||
@@ -55,8 +52,7 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure
|
|||||||
--target=x86_64-snap-linux-gnu
|
--target=x86_64-snap-linux-gnu
|
||||||
|
|
||||||
$(SRCDIR)/rsync: $(SRCDIR)/config.log
|
$(SRCDIR)/rsync: $(SRCDIR)/config.log
|
||||||
@cd $(SRCDIR); \
|
@cd $(SRCDIR) && make
|
||||||
$(MAKE)
|
|
||||||
|
|
||||||
$(ROOT): $(SRCDIR)/rsync
|
$(ROOT): $(SRCDIR)/rsync
|
||||||
@if [ -d $(ROOT) ]; then \
|
@if [ -d $(ROOT) ]; then \
|
||||||
@@ -65,10 +61,7 @@ $(ROOT): $(SRCDIR)/rsync
|
|||||||
mkdir -v $(ROOT); \
|
mkdir -v $(ROOT); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@cd $(SRCDIR); \
|
@cd $(SRCDIR) && make install DESTDIR=$(ROOT)
|
||||||
$(MAKEINST) DESTDIR=$(ROOT)
|
|
||||||
|
|
||||||
@$(SNAPHACKS)
|
|
||||||
|
|
||||||
test: $(ROOT)
|
test: $(ROOT)
|
||||||
@cd $(SRCDIR); \
|
@cd $(SRCDIR); \
|
||||||
|
|||||||
Reference in New Issue
Block a user