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