diff --git a/Makefile b/Makefile index 9389a36..48164fe 100644 --- a/Makefile +++ b/Makefile @@ -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) \ diff --git a/Makefile.libdevmapper b/Makefile.libdevmapper new file mode 100644 index 0000000..9e0015d --- /dev/null +++ b/Makefile.libdevmapper @@ -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