Split libdevmapper off into separate package

This commit is contained in:
2018-07-30 14:16:50 -05:00
parent dd675e06c3
commit 0f9cf2f423
2 changed files with 34 additions and 5 deletions

View File

@@ -8,14 +8,14 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
DEPENDS = bash,glibc,lvm2,ncurses,readline,util-linux
ARCH = x86_64
URL = https://www.sourceware.org/lvm2/
export ARCH = x86_64
export DEPENDS = bash,glibc,lvm2,ncurses,readline,util-linux
export URL = https://www.sourceware.org/lvm2/
REPO = main
BRIEF = Logical Volume Management utilities
DESC = LVM2 refers to the userspace toolset that provide logical volume \
management facilities on linux
SNAPVER = 0
SNAPVER = 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')
@@ -25,6 +25,11 @@ VERSION := $(shell echo $(SRCDIR)|egrep -o '\.[0-9].*'|sed 's/^\.//')-$(SNAPVER)
include /usr/share/snap/Makefile.snaplinux
LIB := $(PWD)/libdevmapper
LIBROOT := $(LIB)/ROOT
LIBVER := $(shell tar xf $(ARCHIVE) $(SRCDIR)/VERSION_DM -O| \
awk '{print $$1}'|tr -d '\n')-$(SNAPVER)
$(SRCDIR)/configure: $(ARCHIVE)
@if [ '$(TYPE)' == 'application/x-bzip2' ]; then \
tar -jxf $(ARCHIVE); \
@@ -62,7 +67,12 @@ $(ROOT): $(SRCDIR)/binfile
mkdir -v $(ROOT); \
fi
@cd $(SRCDIR) && make install DESTDIR=$(ROOT)
@cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \
rm -rf $(ROOT)/etc && \
install -v -d $(LIB)/SNAP $(LIBROOT)/usr/lib && \
mv -v $(ROOT)/usr/lib/libdevmapper* $(LIBROOT)/usr/lib && \
cd $(LIB) && make -f ../Makefile.libdevmapper VERSION=$(LIBVER) && \
mv -v *.snap ../
test: $(ROOT)
@cd $(SRCDIR); \
@@ -70,6 +80,7 @@ test: $(ROOT)
clean:
@rm -rvf $(ROOT) \
$(LIB) \
$(SNAPINFO) \
$(MANIFEST) \
$(FILES) \

18
Makefile.libdevmapper Normal file
View File

@@ -0,0 +1,18 @@
# 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 =
REPO = main
BRIEF = The device mapper userspace library
DESC = The Device-mapper is a component of the linux kernel \
(since version 2.6) that supports logical volume management. \
It is required by LVM2 and EVMS
include /usr/share/snap/Makefile.snaplinux