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.

78 lines
2.1 KiB

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