1 Commits

Author SHA1 Message Date
Jay Larson
34b40e4580 Moved to slp format 2020-08-22 21:40:41 -05:00
2 changed files with 24 additions and 9 deletions

View File

@@ -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)