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.

69 lines
2.2 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.1.2
  7. PKG_RELEASE:=1
  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:=d5b927203b5ca95da16f514969e2a91a537b2f75bec9b21a584c4cd1c7aa74ed
  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. CMAKE_INSTALL:=1
  16. PKG_BUILD_PARALLEL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/cmake.mk
  19. define Package/fish
  20. SECTION:=utils
  21. CATEGORY:=Utilities
  22. SUBMENU:=Shells
  23. TITLE:=A smart and user-friendly command line shell
  24. DEPENDS:=+libncurses +libstdcpp +libatomic +librt +libpcre2-32 @!USE_UCLIBC
  25. URL:=https://fishshell.com
  26. endef
  27. define Package/fish/description
  28. Fish is a smart and user-friendly command line shell for OS X, Linux, and the
  29. rest of the family. Fish includes features like syntax highlighting,
  30. autosuggest-as-you-type, and fancy tab completions that just work, with no
  31. configuration required.
  32. endef
  33. define Package/fish/install
  34. $(INSTALL_DIR) $(1)/usr/bin
  35. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fish $(1)/usr/bin
  36. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fish_indent $(1)/usr/bin
  37. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fish_key_reader $(1)/usr/bin
  38. $(INSTALL_DIR) $(1)/usr/share/fish
  39. $(CP) $(PKG_INSTALL_DIR)/usr/share/fish/* $(1)/usr/share/fish/
  40. rm -rf $(1)/usr/share/fish/groff
  41. rm -rf $(1)/usr/share/fish/man
  42. rm -rf $(1)/usr/share/fish/tools
  43. endef
  44. define Package/fish/postinst
  45. #!/bin/sh
  46. grep fish $${IPKG_INSTROOT}/etc/shells || \
  47. echo "/usr/bin/fish" >> $${IPKG_INSTROOT}/etc/shells
  48. # Backwards compatibility
  49. if [ -e /bin/fish ] && { [ ! -L /bin/fish ] || [ "$(readlink -fn $${IPKG_INSTROOT}/bin/fish)" != "../$(CONFIGURE_PREFIX)/bin/fish" ]; }; then
  50. ln -fs "../$(CONFIGURE_PREFIX)/bin/fish" "$${IPKG_INSTROOT}/bin/fish"
  51. fi
  52. endef
  53. define Package/fish/postrm
  54. rm -rf "$${IPKG_INSTROOT}/$(CONFIGURE_PREFIX)/share/fish/$(PKG_VERSION)"
  55. endef
  56. $(eval $(call BuildPackage,fish))