From 34b40e45800900a0decc7b715935f7a86f97cb8c Mon Sep 17 00:00:00 2001 From: Jay Larson Date: Sat, 22 Aug 2020 21:40:41 -0500 Subject: [PATCH] Moved to slp format --- Makefile | 33 ++++++++++++++++++++++++--------- {SNAP => SL}/README | 0 2 files changed, 24 insertions(+), 9 deletions(-) rename {SNAP => SL}/README (100%) diff --git a/Makefile b/Makefile index 9c2e544..876dd2f 100644 --- a/Makefile +++ b/Makefile @@ -8,23 +8,27 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -ARCH = x86_64 -DEPENDS = bzip2,glibc,libnettle,libxml2,xz,zlib +export SRCPKG = libarchive +export DEPENDS = bzip2,glibc,libnettle,libxml2,xz,zlib +export ARCH = x86_64 +export URL = http://www.libarchive.org/ BUILDDEPS = gcc -SRCPKG = -URL = http://www.libarchive.org/ REPO = main BRIEF = Multi-format archive and compression library DESC = Multi-format archive and compression library -SNAPVER = 1 +SLVER = 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) +export VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'| \ + sed 's/^-//')-$(SLVER) -include /usr/share/snap/Makefile.snaplinux +include /usr/share/sl/Makefile.snaplinux + +DEV := $(PWD)/libarchive-dev +DEVROOT := $(DEV)/ROOT $(SRCDIR)/configure: $(ARCHIVE) @if [ '$(TYPE)' == 'application/x-bzip2' ]; then \ @@ -64,7 +68,17 @@ $(ROOT): $(SRCDIR)/.libs/libarchive.so.$(VERSION) mkdir -v $(ROOT); \ fi - @cd $(SRCDIR) && make install DESTDIR=$(ROOT) + @cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \ + install -v -d $(DEV)/SL && \ + install -v -d $(DEVROOT) && \ + for file in `find $(ROOT)| \ + egrep 'pkgconfig\/|\.a$$|\.h$$|\.la$$|\.pc$$'`; do \ + path=`dirname $$file|sed "s[$(ROOT)[$(DEVROOT)["`; \ + mkdir -p $$path; \ + mv $$file $$path; \ + done + find $(ROOT) -type d -empty -delete && \ + cd $(DEV) && make -f ../Makefile.libarchive-dev && mv *.slp ../ test: $(ROOT) @cd $(SRCDIR); \ @@ -72,7 +86,8 @@ test: $(ROOT) clean: @rm -rvf $(ROOT) \ - $(SNAPINFO) \ + $(DEV) \ + $(SLINFO) \ $(MANIFEST) \ $(FILES) \ $(SRCDIR) diff --git a/SNAP/README b/SL/README similarity index 100% rename from SNAP/README rename to SL/README