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.

96 lines
3.0 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.168
  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/releases \
  15. http://ftp.gwdg.de/pub/linux/sources.redhat.com/lvm2/
  16. PKG_HASH:=23a3d1cddd41b3ef51812ebf83e9fa491f502fe74130d4263be327a91914660d
  17. PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
  18. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION)
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/libdevmapper
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. TITLE:=The Linux Kernel Device Mapper userspace library
  24. URL:=http://sourceware.org/dm/
  25. DEPENDS:=+kmod-dm +libpthread +libuuid +librt
  26. endef
  27. define Package/libdevmapper/description
  28. The device-mapper is a component of the 2.6 linux kernel that supports logical
  29. volume management. It is required by LVM2 and EVMS.
  30. endef
  31. define Package/lvm2
  32. SECTION:=utils
  33. CATEGORY:=Utilities
  34. SUBMENU:=Disc
  35. TITLE:=The Linux Logical Volume Manager
  36. URL:=http://sourceware.org/lvm2/
  37. DEPENDS:=+libdevmapper +libblkid +libreadline +libncurses
  38. endef
  39. define Package/lvm2/description
  40. LVM2 refers to a new userspace toolset that provide logical volume management
  41. facilities on linux. It is reasonably backwards-compatible with the original
  42. LVM toolset.
  43. endef
  44. CONFIGURE_ARGS += --disable-o_direct
  45. define Build/Compile
  46. $(MAKE) -C $(PKG_BUILD_DIR) \
  47. CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
  48. DESTDIR="$(PKG_INSTALL_DIR)" \
  49. install
  50. endef
  51. define Build/InstallDev
  52. $(INSTALL_DIR) $(1)/usr/include
  53. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libdevmapper.h $(1)/usr/include
  54. $(INSTALL_DIR) $(1)/usr/lib
  55. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so* $(1)/usr/lib
  56. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  57. $(CP) $(PKG_BUILD_DIR)/libdm/libdevmapper.pc $(1)/usr/lib/pkgconfig
  58. endef
  59. define Package/libdevmapper/install
  60. $(INSTALL_DIR) $(1)/usr/lib
  61. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so.* $(1)/usr/lib
  62. endef
  63. define Package/lvm2/install
  64. $(INSTALL_DIR) $(1)/sbin
  65. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/lvm $(1)/sbin
  66. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dmsetup $(1)/sbin
  67. $(INSTALL_DIR) $(1)/etc/lvm
  68. $(SED) '/^[[:space:]]*\(#\|$$$$\)/d; /cache_dir/s@.*@ cache_dir = "/tmp/lvm/cache"@' $(PKG_INSTALL_DIR)/etc/lvm/lvm.conf
  69. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/lvm/lvm.conf $(1)/etc/lvm/
  70. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/lvm/lvmlocal.conf $(1)/etc/lvm/
  71. $(INSTALL_DIR) $(1)/etc/lvm/profile
  72. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/lvm/profile/* $(1)/etc/lvm/profile/
  73. $(INSTALL_DIR) $(1)/etc/init.d
  74. $(INSTALL_BIN) ./files/lvm2.init $(1)/etc/init.d/lvm2
  75. $(FIND) $(PKG_INSTALL_DIR)/usr/sbin/ -type l -exec $(CP) -a {} $(1)/sbin/ \;
  76. endef
  77. define Package/lvm2/conffiles
  78. /etc/lvm/lvm.conf
  79. endef
  80. $(eval $(call BuildPackage,libdevmapper))
  81. $(eval $(call BuildPackage,lvm2))