upgrade lvm2 package
[openwrt/svn-archive/archive.git] / utils / lvm2 / Makefile
1 #
2 # Copyright (C) 2009, 2010 Stefan Monnier
3 # Copyright (C) 2011 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.84
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
16 PKG_SOURCE_URL:=ftp://sources.redhat.com/pub/lvm2
17 PKG_MD5SUM:=8b4e0897ee48f02c0dff11940e44e23b
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION)
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/libdevmapper
23 SECTION:=libs
24 CATEGORY:=Libraries
25 TITLE:=The Linux Kernel Device Mapper userspace library
26 URL:=http://sourceware.org/dm/
27 DEPENDS:=+kmod-dm
28 MAINTAINER:=Luka Perkov <openwrt@lukaperkov.net>
29 endef
30
31 define Package/libdevmapper/description
32 The device-mapper is a component of the 2.6 linux kernel that supports logical
33 volume management. It is required by LVM2 and EVMS.
34 endef
35
36 define Package/lvm2
37 SECTION:=utils
38 CATEGORY:=Utilities
39 SUBMENU:=disc
40 TITLE:=The Linux Logical Volume Manager
41 URL:=http://sourceware.org/lvm2/
42 DEPENDS:=+libdevmapper +libreadline +libncurses
43 MAINTAINER:=Luka Perkov <openwrt@lukaperkov.net>
44 endef
45
46 define Package/lvm2/description
47 LVM2 refers to a new userspace toolset that provide logical volume management
48 facilities on linux. It is reasonably backwards-compatible with the original
49 LVM toolset.
50 endef
51
52 CONFIGURE_ARGS += --disable-o_direct
53
54 define Build/Compile
55 $(MAKE) -C $(PKG_BUILD_DIR) \
56 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
57 DESTDIR="$(PKG_INSTALL_DIR)" \
58 install
59 endef
60
61 define Build/InstallDev
62 $(INSTALL_DIR) $(1)/usr/include
63 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libdevmapper.h $(1)/usr/include
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so* $(1)/usr/lib
66 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
67 $(CP) $(PKG_BUILD_DIR)/libdm/libdevmapper.pc $(1)/usr/lib/pkgconfig
68 endef
69
70 define Package/libdevmapper/install
71 $(INSTALL_DIR) $(1)/usr/lib
72 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so.* $(1)/usr/lib
73 endef
74
75 define Package/lvm2/install
76 $(INSTALL_DIR) $(1)/sbin
77 $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/lvm $(1)/sbin
78 $(INSTALL_DIR) $(1)/etc/lvm
79 $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/example.conf $(1)/etc/lvm/lvm.conf
80 $(INSTALL_DIR) $(1)/etc/init.d
81 $(INSTALL_BIN) ./files/lvm2.init $(1)/etc/init.d/lvm2
82 endef
83
84 define Package/lvm2/conffiles
85 /etc/lvm/lvm.conf
86 endef
87
88 $(eval $(call BuildPackage,libdevmapper))
89 $(eval $(call BuildPackage,lvm2))