You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.5 KiB

  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. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=LVM2
  10. PKG_VERSION:=2.02.113
  11. PKG_RELEASE:=1
  12. PKG_LICENSE:=GPL-2.0 LGPL-2.1
  13. PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
  14. PKG_SOURCE_URL:=ftp://sources.redhat.com/pub/lvm2
  15. PKG_MD5SUM:=f71aa8e64030f3d2a3fdabcc36e45094
  16. PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION)
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/libdevmapper
  20. SECTION:=libs
  21. CATEGORY:=Libraries
  22. TITLE:=The Linux Kernel Device Mapper userspace library
  23. URL:=http://sourceware.org/dm/
  24. DEPENDS:=+kmod-dm +libpthread
  25. endef
  26. define Package/libdevmapper/description
  27. The device-mapper is a component of the 2.6 linux kernel that supports logical
  28. volume management. It is required by LVM2 and EVMS.
  29. endef
  30. define Package/lvm2
  31. SECTION:=utils
  32. CATEGORY:=Utilities
  33. SUBMENU:=disc
  34. TITLE:=The Linux Logical Volume Manager
  35. URL:=http://sourceware.org/lvm2/
  36. DEPENDS:=+libdevmapper +libblkid +libreadline +libncurses
  37. endef
  38. define Package/lvm2/description
  39. LVM2 refers to a new userspace toolset that provide logical volume management
  40. facilities on linux. It is reasonably backwards-compatible with the original
  41. LVM toolset.
  42. endef
  43. CONFIGURE_ARGS += --disable-o_direct
  44. define Build/Compile
  45. $(MAKE) -C $(PKG_BUILD_DIR) \
  46. CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
  47. DESTDIR="$(PKG_INSTALL_DIR)" \
  48. install
  49. endef
  50. define Build/InstallDev
  51. $(INSTALL_DIR) $(1)/usr/include
  52. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libdevmapper.h $(1)/usr/include
  53. $(INSTALL_DIR) $(1)/usr/lib
  54. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so* $(1)/usr/lib
  55. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  56. $(CP) $(PKG_BUILD_DIR)/libdm/libdevmapper.pc $(1)/usr/lib/pkgconfig
  57. endef
  58. define Package/libdevmapper/install
  59. $(INSTALL_DIR) $(1)/usr/lib
  60. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so.* $(1)/usr/lib
  61. endef
  62. define Package/lvm2/install
  63. $(INSTALL_DIR) $(1)/sbin
  64. $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/lvm $(1)/sbin
  65. $(INSTALL_DIR) $(1)/etc/lvm
  66. $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/example.conf $(1)/etc/lvm/lvm.conf
  67. $(INSTALL_DIR) $(1)/etc/init.d
  68. $(INSTALL_BIN) ./files/lvm2.init $(1)/etc/init.d/lvm2
  69. endef
  70. define Package/lvm2/conffiles
  71. /etc/lvm/lvm.conf
  72. endef
  73. $(eval $(call BuildPackage,libdevmapper))
  74. $(eval $(call BuildPackage,lvm2))