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.

66 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.2.2
  7. PKG_RELEASE:=$(AUTORELEASE)
  8. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  9. PKG_SOURCE_URL:=https://github.com/fish-shell/fish-shell/releases/download/$(PKG_VERSION)
  10. PKG_HASH:=5944da1a8893d11b0828a4fd9136ee174549daffb3d0adfdd8917856fe6b4009
  11. PKG_MAINTAINER:=Curtis Jiang <jqqqqqqqqqq@gmail.com>, Hao Dong <halbertdong@gmail.com>
  12. PKG_LICENSE:=GPL-2.0-only
  13. PKG_LICENSE_FILES:=COPYING
  14. PKG_CPE_ID:=cpe:/a:fishshell:fish
  15. include $(INCLUDE_DIR)/package.mk
  16. include $(INCLUDE_DIR)/cmake.mk
  17. define Package/fish
  18. SECTION:=utils
  19. CATEGORY:=Utilities
  20. SUBMENU:=Shells
  21. TITLE:=A smart and user-friendly command line shell
  22. DEPENDS:=+libncurses +libstdcpp +libatomic +librt +libpcre2-32 @!USE_UCLIBC
  23. URL:=https://fishshell.com
  24. endef
  25. define Package/fish/description
  26. Fish is a smart and user-friendly command line shell for OS X, Linux, and the
  27. rest of the family. Fish includes features like syntax highlighting,
  28. autosuggest-as-you-type, and fancy tab completions that just work, with no
  29. configuration required.
  30. endef
  31. define Package/fish/install
  32. $(INSTALL_DIR) $(1)/usr/bin
  33. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fish $(1)/usr/bin
  34. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fish_indent $(1)/usr/bin
  35. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fish_key_reader $(1)/usr/bin
  36. $(INSTALL_DIR) $(1)/usr/share/fish
  37. $(CP) $(PKG_INSTALL_DIR)/usr/share/fish/* $(1)/usr/share/fish/
  38. rm -rf $(1)/usr/share/fish/groff
  39. rm -rf $(1)/usr/share/fish/man
  40. rm -rf $(1)/usr/share/fish/tools
  41. endef
  42. define Package/fish/postinst
  43. #!/bin/sh
  44. grep fish $${IPKG_INSTROOT}/etc/shells || \
  45. echo "/usr/bin/fish" >> $${IPKG_INSTROOT}/etc/shells
  46. # Backwards compatibility
  47. if [ -e /bin/fish ] && { [ ! -L /bin/fish ] || [ "$(readlink -fn $${IPKG_INSTROOT}/bin/fish)" != "../$(CONFIGURE_PREFIX)/bin/fish" ]; }; then
  48. ln -fs "../$(CONFIGURE_PREFIX)/bin/fish" "$${IPKG_INSTROOT}/bin/fish"
  49. fi
  50. endef
  51. define Package/fish/postrm
  52. rm -rf "$${IPKG_INSTROOT}/$(CONFIGURE_PREFIX)/share/fish/$(PKG_VERSION)"
  53. endef
  54. $(eval $(call BuildPackage,fish))