2005-06-24 04:46:31 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# lvm2
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
# Copyright (C) 2005 by Richard Downer <rdowner@gmail.com>
|
|
|
|
# Derived from work
|
|
|
|
# Copyright (C) 2001-2005 by Erik Andersen <andersen@codepoet.org>
|
|
|
|
# Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Library General Public License as
|
|
|
|
# published by the Free Software Foundation; either version 2 of the
|
|
|
|
# License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
# Library General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Library General Public
|
|
|
|
# License along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
|
# USA
|
|
|
|
|
2007-08-13 01:38:26 +02:00
|
|
|
LVM2_BASEVER=2.02
|
2009-06-15 15:54:14 +02:00
|
|
|
LVM2_DMVER=1.02
|
2009-08-01 17:47:04 +02:00
|
|
|
LVM2_PATCH=50
|
2005-06-24 04:46:31 +02:00
|
|
|
LVM2_VERSION=$(LVM2_BASEVER).$(LVM2_PATCH)
|
|
|
|
LVM2_SOURCE:=LVM2.$(LVM2_VERSION).tgz
|
|
|
|
LVM2_SITE:=ftp://sources.redhat.com/pub/lvm2
|
2006-10-01 17:17:52 +02:00
|
|
|
LVM2_CAT:=$(ZCAT)
|
2005-06-24 04:46:31 +02:00
|
|
|
LVM2_DIR:=$(BUILD_DIR)/LVM2.$(LVM2_VERSION)
|
|
|
|
LVM2_SBIN:=lvchange lvcreate lvdisplay lvextend lvm lvmchange lvmdiskscan lvmsadc lvmsar lvreduce lvremove lvrename lvresize lvs lvscan pvchange pvcreate pvdisplay pvmove pvremove pvresize pvs pvscan vgcfgbackup vgcfgrestore vgchange vgck vgconvert vgcreate vgdisplay vgexport vgextend vgimport vgmerge vgmknodes vgreduce vgremove vgrename vgs vgscan vgsplit
|
2009-06-15 15:54:14 +02:00
|
|
|
LVM2_DMSETUP_SBIN:=dmsetup
|
|
|
|
LVM2_LIB:=libdevmapper.so.$(LVM2_DMVER)
|
2005-06-24 04:46:31 +02:00
|
|
|
LVM2_TARGET_SBINS=$(foreach lvm2sbin, $(LVM2_SBIN), $(TARGET_DIR)/sbin/$(lvm2sbin))
|
2009-06-15 15:54:14 +02:00
|
|
|
LVM2_TARGET_DMSETUP_SBINS=$(foreach lvm2sbin, $(LVM2_DMSETUP_SBIN), $(TARGET_DIR)/sbin/$(lvm2sbin))
|
|
|
|
LVM2_TARGET_LIBS=$(foreach lvm2lib, $(LVM2_LIB), $(TARGET_DIR)/lib/$(lvm2lib))
|
2005-06-24 04:46:31 +02:00
|
|
|
|
|
|
|
$(DL_DIR)/$(LVM2_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(LVM2_SITE),$(LVM2_SOURCE))
|
2005-06-24 04:46:31 +02:00
|
|
|
|
2007-01-03 14:44:01 +01:00
|
|
|
lvm2-source: $(DL_DIR)/$(LVM2_SOURCE)
|
|
|
|
|
2009-06-15 15:54:14 +02:00
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_READLINE),y)
|
|
|
|
LVM2_DEPENDENCIES+=readline
|
|
|
|
else
|
|
|
|
# v2.02.44: disable readline usage, or binaries are linked against provider
|
|
|
|
# of "tgetent" (=> ncurses) even if it's not used..
|
|
|
|
LVM2_CONF_OPT+=--disable-readline
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2005-06-24 04:46:31 +02:00
|
|
|
$(LVM2_DIR)/.unpacked: $(DL_DIR)/$(LVM2_SOURCE)
|
|
|
|
$(LVM2_CAT) $(DL_DIR)/$(LVM2_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
|
|
|
touch $(LVM2_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(LVM2_DIR)/.configured: $(LVM2_DIR)/.unpacked
|
|
|
|
(cd $(LVM2_DIR); rm -rf config.cache; \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2009-10-01 21:24:42 +02:00
|
|
|
./configure $(QUIET) \
|
2005-06-24 04:46:31 +02:00
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
$(DISABLE_NLS) \
|
|
|
|
$(DISABLE_LARGEFILE) \
|
|
|
|
--with-user=$(shell id -un) --with-group=$(shell id -gn) \
|
2009-06-15 15:54:14 +02:00
|
|
|
$(LVM2_CONF_OPT) \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2005-11-24 07:53:24 +01:00
|
|
|
touch $(LVM2_DIR)/.configured
|
2005-06-24 04:46:31 +02:00
|
|
|
|
2009-06-15 15:54:14 +02:00
|
|
|
|
|
|
|
$(LVM2_DIR)/.built: $(LVM2_DIR)/.configured
|
2009-01-01 20:30:55 +01:00
|
|
|
$(MAKE1) CC=$(TARGET_CC) RANLIB=$(TARGET_RANLIB) AR=$(TARGET_AR) -C $(LVM2_DIR) DESTDIR=$(STAGING_DIR)
|
2009-01-04 07:02:30 +01:00
|
|
|
$(MAKE1) -C $(LVM2_DIR) DESTDIR=$(STAGING_DIR) install
|
2009-08-02 01:10:14 +02:00
|
|
|
# Fixup write permissions so that the files can be overwritten
|
|
|
|
# several times in the $(TARGET_DIR)
|
|
|
|
chmod 755 $(STAGING_DIR)/sbin/lvm
|
|
|
|
chmod 755 $(STAGING_DIR)/sbin/dmsetup
|
|
|
|
chmod 644 $(STAGING_DIR)/lib/$(LVM2_LIB)
|
2009-06-15 15:54:14 +02:00
|
|
|
touch $(LVM2_DIR)/.built
|
|
|
|
|
|
|
|
|
2009-08-02 01:10:14 +02:00
|
|
|
$(LVM2_TARGET_SBINS) $(LVM2_TARGET_DMSETUP_SBINS): $(LVM2_DIR)/.built
|
|
|
|
cp -a $(STAGING_DIR)/sbin/$(notdir $@) $@
|
2009-06-15 15:54:14 +02:00
|
|
|
|
|
|
|
$(LVM2_TARGET_LIBS): $(LVM2_DIR)/.built
|
2009-08-02 01:10:14 +02:00
|
|
|
cp -a $(STAGING_DIR)/lib/$(notdir $@) $@
|
2009-06-15 15:54:14 +02:00
|
|
|
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LVM2_DMSETUP_ONLY),y)
|
2009-09-02 17:02:02 +02:00
|
|
|
lvm2: $(LVM2_TARGET_DMSETUP_SBINS) $(LVM2_TARGET_LIBS)
|
2009-06-15 15:54:14 +02:00
|
|
|
else
|
2009-09-02 17:02:02 +02:00
|
|
|
lvm2: $(LVM2_TARGET_SBINS) $(LVM2_TARGET_DMSETUP_SBINS) $(LVM2_TARGET_LIBS)
|
2009-06-15 15:54:14 +02:00
|
|
|
endif
|
|
|
|
|
2005-06-24 04:46:31 +02:00
|
|
|
|
|
|
|
lvm2-clean:
|
2009-01-04 07:02:30 +01:00
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(LVM2_DIR) uninstall
|
2005-06-24 04:46:31 +02:00
|
|
|
-$(MAKE) -C $(LVM2_DIR) clean
|
|
|
|
|
|
|
|
lvm2-dirclean:
|
|
|
|
rm -rf $(LVM2_DIR)
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LVM2),y)
|
2005-06-24 04:46:31 +02:00
|
|
|
TARGETS+=lvm2
|
|
|
|
endif
|