Split off separate spl-dev package

This commit is contained in:
2017-05-26 14:55:14 -05:00
parent 66ba37e2a2
commit 0f5acb7a9f
2 changed files with 33 additions and 5 deletions

View File

@@ -8,17 +8,22 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
DEPENDS = glibc
ARCH = x86_64
URL = http://zfsonlinux.org/
export SRCPKG = spl
export DEPENDS = glibc
export ARCH = x86_64
export URL = http://zfsonlinux.org/
DESC = A shim layer which adds the core interfaces required for OpenZFS
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)
export VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'| \
sed 's/^-//')-$(SNAPVER)
DEV := $(PWD)/spl-dev
DEVROOT := $(DEV)/ROOT
include /usr/share/snap/Makefile.snaplinux
@@ -46,6 +51,7 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure
./configure \
--prefix=/usr \
--bindir=/bin \
--program-prefix='' \
--libdir=/lib \
--libexecdir=/usr/lib \
--disable-static \
@@ -65,12 +71,19 @@ $(ROOT): $(SRCDIR)/module/spl/spl.ko
@cd $(SRCDIR) && make install DESTDIR=$(ROOT)
@install -d -v $(DEV)/SNAP && \
install -d -v $(DEVROOT)/usr && \
mv -v $(ROOT)/usr/src $(DEVROOT)/usr/src && \
find $(ROOT) -type d -empty -delete && \
cd $(DEV) && make -f ../Makefile.spl-dev && mv *.snap ../
test: $(ROOT)
@cd $(SRCDIR); \
make check
clean:
@rm -rvf $(ROOT) \
$(DEV) \
$(SNAPINFO) \
$(MANIFEST) \
$(FILES) \