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.

68 lines
2.1 KiB

  1. # This is free software, licensed under the GNU General Public License v2.
  2. # See /LICENSE for more information.
  3. #
  4. include $(TOPDIR)/rules.mk
  5. PKG_NAME:=fish
  6. PKG_VERSION:=3.0.2
  7. PKG_RELEASE:=4
  8. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  9. PKG_SOURCE_URL:=https://github.com/fish-shell/fish-shell/releases/download/$(PKG_VERSION)
  10. PKG_HASH:=14728ccc6b8e053d01526ebbd0822ca4eb0235e6487e832ec1d0d22f1395430e
  11. PKG_MAINTAINER:=Curtis Jiang <jqqqqqqqqqq@gmail.com>, Hao Dong <halbertdong@gmail.com>
  12. PKG_LICENSE:=GPL-2.0
  13. PKG_CPE_ID:=cpe:/a:fishshell:fish
  14. PKG_FIXUP:=autoreconf
  15. PKG_INSTALL:=1
  16. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/fish
  19. SECTION:=utils
  20. CATEGORY:=Utilities
  21. SUBMENU:=Shells
  22. TITLE:=A smart and user-friendly command line shell
  23. DEPENDS:=+libncurses +libstdcpp +librt +libpcre2-32 @!USE_UCLIBC
  24. URL:=https://fishshell.com
  25. endef
  26. define Package/fish/description
  27. Fish is a smart and user-friendly command line shell for OS X, Linux, and the
  28. rest of the family. Fish includes features like syntax highlighting,
  29. autosuggest-as-you-type, and fancy tab completions that just work, with no
  30. configuration required.
  31. endef
  32. CONFIGURE_VARS += ac_cv_file__proc_self_stat=yes
  33. TARGET_CXXFLAGS += -std=c++0x
  34. define Package/fish/install
  35. $(INSTALL_DIR) $(1)/usr/bin
  36. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fish $(1)/usr/bin
  37. $(INSTALL_DIR) $(1)/usr/share/fish
  38. $(CP) $(PKG_INSTALL_DIR)/usr/share/fish/* $(1)/usr/share/fish/
  39. rm -rf $(1)/usr/share/fish/groff
  40. rm -rf $(1)/usr/share/fish/man
  41. rm -rf $(1)/usr/share/fish/tools
  42. endef
  43. define Package/fish/postinst
  44. #!/bin/sh
  45. grep fish $${IPKG_INSTROOT}/etc/shells || \
  46. echo "/usr/bin/fish" >> $${IPKG_INSTROOT}/etc/shells
  47. # Backwards compatibility
  48. if [[ -e /bin/fish ]] && ([[ ! -L /bin/fish ]] || [[ "$(readlink -fn $${IPKG_INSTROOT}/bin/fish)" != "../$(CONFIGURE_PREFIX)/bin/fish" ]]); then
  49. ln -fs "../$(CONFIGURE_PREFIX)/bin/fish" "$${IPKG_INSTROOT}/bin/fish"
  50. fi
  51. endef
  52. define Package/fish/postrm
  53. rm -rf "$${IPKG_INSTROOT}/$(CONFIGURE_PREFIX)/share/fish/$(PKG_VERSION)"
  54. endef
  55. $(eval $(call BuildPackage,fish))