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.

82 lines
2.2 KiB

  1. #
  2. # Copyright (C) 2009-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=btrfs-progs
  9. PKG_VERSION:=4.17
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/kdave/btrfs-progs/
  13. PKG_HASH:=82ca0ecf76350a1e3c6543fe220c0910e240511e663d51fc79c32bd0052c117c
  14. PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
  16. PKG_LICENSE:=GPL-2.0
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_BUILD_DEPENDS:=acl
  21. PKG_FIXUP:=autoreconf
  22. include $(INCLUDE_DIR)/package.mk
  23. define Package/btrfs-progs
  24. SECTION:=utils
  25. CATEGORY:=Utilities
  26. SUBMENU:=Filesystem
  27. DEPENDS:=+libattr +libuuid +zlib +libblkid +liblzo +libpthread
  28. TITLE:=Btrfs filesystems utilities
  29. URL:=http://btrfs.wiki.kernel.org/
  30. endef
  31. define Package/btrfs-progs/description
  32. Btrfs is a new copy on write filesystem for Linux aimed at implementing
  33. advanced features while focusing on fault tolerance, repair and easy
  34. administration. Initially developed by Oracle, Btrfs is licensed under the
  35. GPL and open for contribution from anyone.
  36. endef
  37. progs = btrfs btrfs-find-root btrfs-image btrfs-map-logical \
  38. btrfs-select-super btrfstune fsck.btrfs mkfs.btrfs
  39. CONFIGURE_ARGS += \
  40. --disable-backtrace \
  41. --disable-convert \
  42. --disable-documentation \
  43. --disable-python \
  44. --disable-zstd
  45. TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
  46. TARGET_LDFLAGS += -Wl,--gc-sections -flto
  47. EXTRA_CFLAGS=$(TARGET_CPPFLAGS)
  48. define Build/InstallDev
  49. $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
  50. $(CP) \
  51. $(PKG_INSTALL_DIR)/usr/include/* \
  52. $(1)/usr/include/
  53. $(CP) \
  54. $(PKG_INSTALL_DIR)/usr/lib/libbtrfs.{a,so*} \
  55. $(1)/usr/lib/
  56. endef
  57. define Package/btrfs-progs/install
  58. $(INSTALL_DIR) $(1)/usr/lib
  59. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libbtrfs.so* $(1)/usr/lib
  60. $(INSTALL_DIR) $(1)/usr/bin
  61. $(INSTALL_BIN) $(addprefix $(PKG_INSTALL_DIR)/usr/bin/, $(progs)) $(1)/usr/bin/
  62. $(LN) btrfs $(1)/usr/bin/btrfsck
  63. $(INSTALL_DIR) $(1)/etc/init.d
  64. $(INSTALL_BIN) ./files/btrfs-scan.init $(1)/etc/init.d/btrfs-scan
  65. endef
  66. $(eval $(call BuildPackage,btrfs-progs))