prometheus-node-exporter-lua: add dawn exporter
[feed/packages.git] / utils / lvm2 / Makefile
1 #
2 # Copyright (C) 2009-2010 Stefan Monnier
3 # Copyright (C) 2011-2018 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.03.08
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
16 PKG_SOURCE_URL:=https://sourceware.org/pub/lvm2
17 PKG_HASH:=6e0261dc9f6ab0ef1fc4a63d105a73e06eb536a273a9d6c2ccc414548c8e1ec8
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION)
19
20 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
21 PKG_LICENSE:=GPL-2.0 LGPL-2.1
22 PKG_LICENSE_FILES:=COPYING COPYING.lib
23 PKG_CPE_ID:=cpe:/a:heinz_mauelshagen:lvm2
24
25 PKG_BUILD_PARALLEL:=1
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/libdevmapper
30 SECTION:=libs
31 CATEGORY:=Libraries
32 TITLE:=The Linux Kernel Device Mapper userspace library
33 URL:=https://sourceware.org/dm/
34 DEPENDS:=+kmod-dm +libpthread +libuuid +librt +libblkid
35 endef
36
37 define Package/libdevmapper/description
38 The device-mapper is a component of the 2.6 linux kernel that supports logical
39 volume management. It is required by LVM2 and EVMS.
40 endef
41
42 define Package/lvm2
43 SECTION:=utils
44 CATEGORY:=Utilities
45 SUBMENU:=Disc
46 TITLE:=The Linux Logical Volume Manager
47 URL:=https://sourceware.org/lvm2/
48 DEPENDS:=+libdevmapper +libreadline +libncurses +libaio
49 endef
50
51 define Package/lvm2/description
52 LVM2 refers to a new userspace toolset that provide logical volume management
53 facilities on linux. It is reasonably backwards-compatible with the original
54 LVM toolset.
55 endef
56
57 CONFIGURE_ARGS += \
58 --disable-o_direct \
59 --with-default-pid-dir=/var/run \
60 --with-default-dm-run-dir=/var/run \
61 --with-default-run-dir=/var/run/lvm \
62 --with-default-locking-dir=/var/lock/lvm
63
64 define Build/Compile
65 $(MAKE) -C $(PKG_BUILD_DIR) \
66 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
67 DESTDIR="$(PKG_INSTALL_DIR)" \
68 install
69 endef
70
71 define Build/InstallDev
72 $(INSTALL_DIR) $(1)/usr/include
73 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libdevmapper.h $(1)/usr/include
74 $(INSTALL_DIR) $(1)/usr/lib
75 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so* $(1)/usr/lib
76 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
77 $(CP) $(PKG_BUILD_DIR)/libdm/libdevmapper.pc $(1)/usr/lib/pkgconfig
78 endef
79
80 define Package/libdevmapper/install
81 $(INSTALL_DIR) $(1)/usr/lib
82 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so.* $(1)/usr/lib
83 endef
84
85 define Package/lvm2/install
86 $(INSTALL_DIR) $(1)/sbin
87 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/lvm $(1)/sbin
88 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dmsetup $(1)/sbin
89 $(INSTALL_DIR) $(1)/etc/lvm
90 $(SED) '/^[[:space:]]*\(#\|$$$$\)/d; /cache_dir/s@.*@ cache_dir = "/tmp/lvm/cache"@' $(PKG_INSTALL_DIR)/etc/lvm/lvm.conf
91 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/lvm/lvm.conf $(1)/etc/lvm/
92 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/lvm/lvmlocal.conf $(1)/etc/lvm/
93 $(INSTALL_DIR) $(1)/etc/lvm/profile
94 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/lvm/profile/* $(1)/etc/lvm/profile/
95 $(INSTALL_DIR) $(1)/lib/preinit
96 $(INSTALL_DATA) ./files/lvm2.preinit $(1)/lib/preinit/80_lvm2
97 $(INSTALL_DIR) $(1)/etc/init.d
98 $(INSTALL_BIN) ./files/lvm2.init $(1)/etc/init.d/lvm2
99 $(FIND) $(PKG_INSTALL_DIR)/usr/sbin/ -type l -exec $(CP) -a {} $(1)/sbin/ \;
100 endef
101
102 define Package/lvm2/conffiles
103 /etc/lvm/lvm.conf
104 endef
105
106 $(eval $(call BuildPackage,libdevmapper))
107 $(eval $(call BuildPackage,lvm2))