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.

80 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.19.1
  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:=04d82af5cf479d139299a8f13ec0921f9578ca444e81ec0202f01a20d2bcefb8
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
  15. PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
  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. include $(INCLUDE_DIR)/package.mk
  22. define Package/btrfs-progs
  23. SECTION:=utils
  24. CATEGORY:=Utilities
  25. SUBMENU:=Filesystem
  26. DEPENDS:=+libattr +libuuid +zlib +libblkid +liblzo +libpthread
  27. TITLE:=Btrfs filesystems utilities
  28. URL:=https://btrfs.wiki.kernel.org/
  29. endef
  30. define Package/btrfs-progs/description
  31. Btrfs is a new copy on write filesystem for Linux aimed at implementing
  32. advanced features while focusing on fault tolerance, repair and easy
  33. administration. Initially developed by Oracle, Btrfs is licensed under the
  34. GPL and open for contribution from anyone.
  35. endef
  36. progs = btrfs btrfs-find-root btrfs-image btrfs-map-logical \
  37. btrfs-select-super btrfstune fsck.btrfs mkfs.btrfs
  38. CONFIGURE_ARGS += \
  39. --disable-backtrace \
  40. --disable-convert \
  41. --disable-documentation \
  42. --disable-python \
  43. --disable-zstd
  44. TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
  45. TARGET_LDFLAGS += -Wl,--gc-sections -flto
  46. EXTRA_CFLAGS=$(TARGET_CPPFLAGS)
  47. define Build/InstallDev
  48. $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
  49. $(CP) \
  50. $(PKG_INSTALL_DIR)/usr/include/* \
  51. $(1)/usr/include/
  52. $(CP) \
  53. $(PKG_INSTALL_DIR)/usr/lib/libbtrfs.{a,so*} \
  54. $(1)/usr/lib/
  55. endef
  56. define Package/btrfs-progs/install
  57. $(INSTALL_DIR) $(1)/usr/lib
  58. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libbtrfs.so* $(1)/usr/lib
  59. $(INSTALL_DIR) $(1)/usr/bin
  60. $(INSTALL_BIN) $(addprefix $(PKG_INSTALL_DIR)/usr/bin/, $(progs)) $(1)/usr/bin/
  61. $(LN) btrfs $(1)/usr/bin/btrfsck
  62. $(INSTALL_DIR) $(1)/etc/init.d
  63. $(INSTALL_BIN) ./files/btrfs-scan.init $(1)/etc/init.d/btrfs-scan
  64. endef
  65. $(eval $(call BuildPackage,btrfs-progs))