The following changes were made:
* Moved to new version scheme * Moved make/make install out of variables * Corrected patch loop * Updated dependencies
This commit is contained in:
30
Makefile
30
Makefile
@@ -8,22 +8,19 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
DEPENDS =
|
||||
DEPENDS = glibc
|
||||
ARCH = x86_64
|
||||
URL = http://www.gnu.org/software/diffutils/
|
||||
BRIEF = Display differences between files
|
||||
DESC = GNU Diffutils is a package of several programs related to finding \
|
||||
differences between files.
|
||||
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)
|
||||
|
||||
MAKE = make
|
||||
MAKEINST = make mkdir_p='/bin/mkdir -p' install
|
||||
SNAPHACKS =
|
||||
VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')-$(SNAPVER)
|
||||
|
||||
include /usr/share/snap/Makefile.snaplinux
|
||||
|
||||
@@ -40,11 +37,13 @@ $(SRCDIR)/configure: $(ARCHIVE)
|
||||
echo 'Unable to determine archive type'; \
|
||||
exit 1; \
|
||||
fi
|
||||
@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 \
|
||||
@@ -53,8 +52,7 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure
|
||||
--target=x86_64-snap-linux-gnu
|
||||
|
||||
$(SRCDIR)/src/diff: $(SRCDIR)/config.log
|
||||
@cd $(SRCDIR); \
|
||||
$(MAKE)
|
||||
@cd $(SRCDIR) && make
|
||||
|
||||
$(ROOT): $(SRCDIR)/src/diff
|
||||
@if [ -d $(ROOT) ]; then \
|
||||
@@ -63,14 +61,10 @@ $(ROOT): $(SRCDIR)/src/diff
|
||||
mkdir -v $(ROOT); \
|
||||
fi
|
||||
|
||||
@cd $(SRCDIR); \
|
||||
$(MAKEINST) DESTDIR=$(ROOT)
|
||||
|
||||
@$(SNAPHACKS)
|
||||
@cd $(SRCDIR) && make mkdir_p='/bin/mkdir -p' install DESTDIR=$(ROOT)
|
||||
|
||||
test: $(ROOT)
|
||||
@cd $(SRCDIR); \
|
||||
make check
|
||||
@cd $(SRCDIR) && make check
|
||||
|
||||
clean:
|
||||
@rm -rvf $(ROOT) \
|
||||
|
||||
Reference in New Issue
Block a user