From 0f5acb7a9fd9eb7d86068a590a29e86f3ced1f9b Mon Sep 17 00:00:00 2001 From: Jay Larson Date: Fri, 26 May 2017 14:55:14 -0500 Subject: [PATCH] Split off separate spl-dev package --- Makefile | 23 ++++++++++++++++++----- Makefile.spl-dev | 15 +++++++++++++++ 2 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 Makefile.spl-dev diff --git a/Makefile b/Makefile index 2ddeff2..f7d6d34 100644 --- a/Makefile +++ b/Makefile @@ -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) \ diff --git a/Makefile.spl-dev b/Makefile.spl-dev new file mode 100644 index 0000000..326dc72 --- /dev/null +++ b/Makefile.spl-dev @@ -0,0 +1,15 @@ +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation here: +# (http://www.gnu.org/licenses/gpl-2.0.html) +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +DEPENDS = spl +BRIEF = Development files for spl +DESC = Development files for spl + +include /usr/share/snap/Makefile.snaplinux