Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7648bd266f |
24
Makefile
24
Makefile
@@ -8,24 +8,22 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
DEPENDS = zlib
|
DEPENDS = glibc,zlib
|
||||||
ARCH = x86_64
|
ARCH = x86_64
|
||||||
URL = http://www.darwinsys.com/file/
|
URL = http://www.darwinsys.com/file/
|
||||||
|
REPO = main
|
||||||
|
BRIEF = determine file type
|
||||||
DESC = The file command is \"a file type guesser\", that is, a command-line \
|
DESC = The file command is \"a file type guesser\", that is, a command-line \
|
||||||
tool that tells you in words what kind of data a file contains.
|
tool that tells you in words what kind of data a file contains.
|
||||||
SNAPVER = sr1
|
SLVER = 2
|
||||||
|
|
||||||
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/^-//')-$(SLVER)
|
||||||
|
|
||||||
MAKE = make
|
include /usr/share/sl/Makefile.snaplinux
|
||||||
MAKEINST = make install
|
|
||||||
SNAPHACKS =
|
|
||||||
|
|
||||||
include /usr/share/snap/Makefile.snaplinux
|
|
||||||
|
|
||||||
$(SRCDIR)/configure: $(ARCHIVE)
|
$(SRCDIR)/configure: $(ARCHIVE)
|
||||||
@if [ '$(TYPE)' == 'application/x-bzip2' ]; then \
|
@if [ '$(TYPE)' == 'application/x-bzip2' ]; then \
|
||||||
@@ -53,8 +51,7 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure
|
|||||||
--target=x86_64-snap-linux-gnu
|
--target=x86_64-snap-linux-gnu
|
||||||
|
|
||||||
$(SRCDIR)/src/file: $(SRCDIR)/config.log
|
$(SRCDIR)/src/file: $(SRCDIR)/config.log
|
||||||
@cd $(SRCDIR); \
|
@cd $(SRCDIR) && make
|
||||||
$(MAKE)
|
|
||||||
|
|
||||||
$(ROOT): $(SRCDIR)/src/file
|
$(ROOT): $(SRCDIR)/src/file
|
||||||
@if [ -d $(ROOT) ]; then \
|
@if [ -d $(ROOT) ]; then \
|
||||||
@@ -63,10 +60,7 @@ $(ROOT): $(SRCDIR)/src/file
|
|||||||
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); \
|
||||||
@@ -74,7 +68,7 @@ test: $(ROOT)
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -rvf $(ROOT) \
|
@rm -rvf $(ROOT) \
|
||||||
$(SNAPINFO) \
|
$(SLINFO) \
|
||||||
$(MANIFEST) \
|
$(MANIFEST) \
|
||||||
$(FILES) \
|
$(FILES) \
|
||||||
$(SRCDIR)
|
$(SRCDIR)
|
||||||
|
|||||||
Reference in New Issue
Block a user