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