source: packages/utils/lvm2/Makefile @ 26793

Last change on this file since 26793 was 26793, checked in by jow, 5 years ago

[packages] lvm2: readd $(FPIC) (#9335)

File size: 2.5 KB
Line 
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
9include $(TOPDIR)/rules.mk
10
11PKG_NAME:=LVM2
12PKG_VERSION:=2.02.84
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
16PKG_SOURCE_URL:=ftp://sources.redhat.com/pub/lvm2
17PKG_MD5SUM:=8b4e0897ee48f02c0dff11940e44e23b
18PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION)
19
20include $(INCLUDE_DIR)/package.mk
21
22define 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>
29endef
30
31define 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.
34endef
35
36define 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>
44endef
45
46define 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.
50endef
51
52CONFIGURE_ARGS += --disable-o_direct
53
54define Build/Compile
55        $(MAKE) -C $(PKG_BUILD_DIR) \
56                CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
57                DESTDIR="$(PKG_INSTALL_DIR)" \
58                install
59endef
60
61define 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
68endef
69
70define Package/libdevmapper/install
71        $(INSTALL_DIR) $(1)/usr/lib
72        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so.* $(1)/usr/lib
73endef
74
75define 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
82endef
83
84define Package/lvm2/conffiles
85/etc/lvm/lvm.conf
86endef
87
88$(eval $(call BuildPackage,libdevmapper))
89$(eval $(call BuildPackage,lvm2))
Note: See TracBrowser for help on using the repository browser.