The following changes were made to Makefile:
* added BRIEF * moved to new version scheme * moved make and make install out of variables
This commit is contained in:
24
Makefile
24
Makefile
@@ -11,21 +11,15 @@
|
|||||||
DEPENDS =
|
DEPENDS =
|
||||||
ARCH = x86_64
|
ARCH = x86_64
|
||||||
URL = http://www.gnu.org/software/cpio/
|
URL = http://www.gnu.org/software/cpio/
|
||||||
|
BRIEF = cpio archive utility
|
||||||
DESC = GNU cpio copies files into or out of a cpio or tar archive.
|
DESC = GNU cpio copies files into or out of a cpio or tar archive.
|
||||||
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 && makeinfo --html -o doc/html doc/cpio.texi && \
|
|
||||||
makeinfo --html --no-split -o doc/cpio.html doc/cpio.texi && \
|
|
||||||
makeinfo --plaintext -o doc/cpio.txt doc/cpio.texi
|
|
||||||
MAKEINST = make install
|
|
||||||
SNAPHACKS = rm -fv $(ROOT)/usr/share/info/dir && \
|
|
||||||
rm -fv $(ROOT)/usr/share/man/man1/mt.1
|
|
||||||
|
|
||||||
include /usr/share/snap/Makefile.snaplinux
|
include /usr/share/snap/Makefile.snaplinux
|
||||||
|
|
||||||
@@ -57,8 +51,9 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure
|
|||||||
--target=x86_64-snap-linux-gnu
|
--target=x86_64-snap-linux-gnu
|
||||||
|
|
||||||
$(SRCDIR)/src/cpio: $(SRCDIR)/config.log
|
$(SRCDIR)/src/cpio: $(SRCDIR)/config.log
|
||||||
@cd $(SRCDIR); \
|
@cd $(SRCDIR) && make && makeinfo --html -o doc/html doc/cpio.texi && \
|
||||||
$(MAKE)
|
makeinfo --html --no-split -o doc/cpio.html doc/cpio.texi && \
|
||||||
|
makeinfo --plaintext -o doc/cpio.txt doc/cpio.texi
|
||||||
|
|
||||||
$(ROOT): $(SRCDIR)/src/cpio
|
$(ROOT): $(SRCDIR)/src/cpio
|
||||||
@if [ -d $(ROOT) ]; then \
|
@if [ -d $(ROOT) ]; then \
|
||||||
@@ -67,10 +62,9 @@ $(ROOT): $(SRCDIR)/src/cpio
|
|||||||
mkdir -v $(ROOT); \
|
mkdir -v $(ROOT); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@cd $(SRCDIR); \
|
@cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \
|
||||||
$(MAKEINST) DESTDIR=$(ROOT)
|
rm -fv $(ROOT)/usr/share/info/dir && \
|
||||||
|
rm -fv $(ROOT)/usr/share/man/man1/mt.1
|
||||||
@$(SNAPHACKS)
|
|
||||||
|
|
||||||
test: $(ROOT)
|
test: $(ROOT)
|
||||||
@cd $(SRCDIR); \
|
@cd $(SRCDIR); \
|
||||||
|
|||||||
Reference in New Issue
Block a user