build,travis: fix gpg verification warning
[feed/packages.git] / utils / lvm2 / Makefile
1 #
2 # Copyright (C) 2009-2010 Stefan Monnier
3 # Copyright (C) 2011-2014 OpenWrt.org
4 #
5 # This is free software, licensed under the GNU General Public License v3+.
6 # See /LICENSE for more information.
7 #
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=LVM2
12 PKG_VERSION:=2.02.168
13 PKG_RELEASE:=1
14 PKG_LICENSE:=GPL-2.0 LGPL-2.1
15
16 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
17 PKG_SOURCE_URL:=ftp://sources.redhat.com/pub/lvm2/releases \
18 http://ftp.gwdg.de/pub/linux/sources.redhat.com/lvm2/
19 PKG_HASH:=23a3d1cddd41b3ef51812ebf83e9fa491f502fe74130d4263be327a91914660d
20 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION)
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libdevmapper
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=The Linux Kernel Device Mapper userspace library
29 URL:=http://sourceware.org/dm/
30 DEPENDS:=+kmod-dm +libpthread +libuuid +librt
31 endef
32
33 define Package/libdevmapper/description
34 The device-mapper is a component of the 2.6 linux kernel that supports logical
35 volume management. It is required by LVM2 and EVMS.
36 endef
37
38 define Package/lvm2
39 SECTION:=utils
40 CATEGORY:=Utilities
41 SUBMENU:=Disc
42 TITLE:=The Linux Logical Volume Manager
43 URL:=http://sourceware.org/lvm2/
44 DEPENDS:=+libdevmapper +libblkid +libreadline +libncurses
45 endef
46
47 define Package/lvm2/description
48 LVM2 refers to a new userspace toolset that provide logical volume management
49 facilities on linux. It is reasonably backwards-compatible with the original
50 LVM toolset.
51 endef
52
53 CONFIGURE_ARGS += --disable-o_direct
54
55 define Build/Compile
56 $(MAKE) -C $(PKG_BUILD_DIR) \
57 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
58 DESTDIR="$(PKG_INSTALL_DIR)" \
59 install
60 endef
61
62 define Build/InstallDev
63 $(INSTALL_DIR) $(1)/usr/include
64 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libdevmapper.h $(1)/usr/include
65 $(INSTALL_DIR) $(1)/usr/lib
66 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so* $(1)/usr/lib
67 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
68 $(CP) $(PKG_BUILD_DIR)/libdm/libdevmapper.pc $(1)/usr/lib/pkgconfig
69 endef
70
71 define Package/libdevmapper/install
72 $(INSTALL_DIR) $(1)/usr/lib
73 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so.* $(1)/usr/lib
74 endef
75
76 define Package/lvm2/install
77 $(INSTALL_DIR) $(1)/sbin
78 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/lvm $(1)/sbin
79 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dmsetup $(1)/sbin
80 $(INSTALL_DIR) $(1)/etc/lvm
81 $(SED) '/^[[:space:]]*\(#\|$$$$\)/d; /cache_dir/s@.*@ cache_dir = "/tmp/lvm/cache"@' $(PKG_INSTALL_DIR)/etc/lvm/lvm.conf
82 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/lvm/lvm.conf $(1)/etc/lvm/
83 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/lvm/lvmlocal.conf $(1)/etc/lvm/
84 $(INSTALL_DIR) $(1)/etc/lvm/profile
85 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/lvm/profile/* $(1)/etc/lvm/profile/
86 $(INSTALL_DIR) $(1)/etc/init.d
87 $(INSTALL_BIN) ./files/lvm2.init $(1)/etc/init.d/lvm2
88 $(FIND) $(PKG_INSTALL_DIR)/usr/sbin/ -type l -exec $(CP) -a {} $(1)/sbin/ \;
89 endef
90
91 define Package/lvm2/conffiles
92 /etc/lvm/lvm.conf
93 endef
94
95 $(eval $(call BuildPackage,libdevmapper))
96 $(eval $(call BuildPackage,lvm2))