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) 2015 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:=hfsprogs
  9. PKG_VERSION:=332.25
  10. PKG_RELEASE:=3
  11. PKG_LICENSE:=GPL-3.0-or-later
  12. PKG_LICENSE_FILES:=COPYING
  13. PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
  14. PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
  15. PKG_SOURCE_URL:=http://archive.ubuntu.com/ubuntu/pool/universe/h/$(PKG_NAME)
  16. PKG_BUILD_DIR:=$(BUILD_DIR)/diskdev_cmds-$(PKG_VERSION)
  17. PKG_HASH:=74c9aeca899ed7f4bf155c65fc45bf0f250c0f6d57360ea953b1d536d9aa45e6
  18. PKG_LICENSE:=APSL 2.0
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/nls.mk
  21. define Package/hfsprogs/Default
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. SUBMENU:=Filesystem
  25. DEPENDS:=+libopenssl +USE_GLIBC:libbsd
  26. endef
  27. define Package/hfsfsck
  28. $(call Package/hfsprogs/Default)
  29. TITLE:=fsck (fsck.hfs) utility from hfsprogs
  30. endef
  31. define Package/mkhfs
  32. $(call Package/hfsprogs/Default)
  33. TITLE:=mkfs (mkfs.hfs) utility from hfsprogs
  34. endef
  35. define Package/hfsfsck/description
  36. Utilities to create and check HFS/HFS+ filesystems.
  37. (fsck.hfs and fsck.hfsplus for checking integrity of HFS/HFS+ volumes)
  38. endef
  39. define Package/mkhfs/description
  40. Utilities to create and check HFS/HFS+ filesystems.
  41. (mkfs.hfs and mkfs.hfsplus for creating HFS/HFS+ volumes)
  42. endef
  43. define Build/Configure
  44. endef
  45. define Build/Compile
  46. $(MAKE) -C $(PKG_BUILD_DIR) \
  47. -f Makefile.lnx \
  48. $(TARGET_CONFIGURE_OPTS) \
  49. CFLAGS+="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -I$(PKG_BUILD_DIR)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1" \
  50. LDFLAGS+="$(TARGET_LDFLAGS) $(if $(CONFIG_USE_GLIBC),-lbsd)" \
  51. all
  52. endef
  53. define Package/hfsfsck/install
  54. $(INSTALL_DIR) $(1)/lib/functions/fsck
  55. $(INSTALL_DATA) ./files/hfsfsck.sh $(1)/lib/functions/fsck/
  56. $(INSTALL_DIR) $(1)/usr/sbin
  57. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fsck_hfs.tproj/fsck_hfs $(1)/usr/sbin/fsck.hfsplus
  58. (cd $(1)/usr/sbin; ln -sf fsck.hfsplus fsck.hfs;)
  59. endef
  60. define Package/mkhfs/install
  61. $(INSTALL_DIR) $(1)/usr/sbin
  62. $(INSTALL_BIN) $(PKG_BUILD_DIR)/newfs_hfs.tproj/newfs_hfs $(1)/usr/sbin/mkfs.hfsplus
  63. (cd $(1)/usr/sbin; ln -sf mkfs.hfsplus mkfs.hfs;)
  64. endef
  65. $(eval $(call BuildPackage,hfsfsck))
  66. $(eval $(call BuildPackage,mkhfs))