treewide: remove AUTORELEASE
[feed/packages.git] / utils / fish / Makefile
1 # This is free software, licensed under the GNU General Public License v2.
2 # See /LICENSE for more information.
3 #
4
5 include $(TOPDIR)/rules.mk
6
7 PKG_NAME:=fish
8 PKG_VERSION:=3.5.0
9 PKG_RELEASE:=1
10
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
12 PKG_SOURCE_URL:=https://github.com/fish-shell/fish-shell/releases/download/$(PKG_VERSION)
13 PKG_HASH:=291e4ec7c6c3fea54dc1aed057ce3d42b356fa6f70865627b2c7dfcecaefd210
14
15 PKG_MAINTAINER:=Curtis Jiang <jqqqqqqqqqq@gmail.com>, Hao Dong <halbertdong@gmail.com>
16 PKG_LICENSE:=GPL-2.0-only
17 PKG_LICENSE_FILES:=COPYING
18 PKG_CPE_ID:=cpe:/a:fishshell:fish
19
20 include $(INCLUDE_DIR)/package.mk
21 include $(INCLUDE_DIR)/cmake.mk
22
23 define Package/fish
24 SECTION:=utils
25 CATEGORY:=Utilities
26 SUBMENU:=Shells
27 TITLE:=A smart and user-friendly command line shell
28 DEPENDS:=+libncurses +libstdcpp +libatomic +libpcre2-32
29 URL:=https://fishshell.com
30 endef
31
32 define Package/fish/description
33 Fish is a smart and user-friendly command line shell for OS X, Linux, and the
34 rest of the family. Fish includes features like syntax highlighting,
35 autosuggest-as-you-type, and fancy tab completions that just work, with no
36 configuration required.
37 endef
38
39 CMAKE_OPTIONS += \
40 -DBUILD_DOCS=FALSE \
41 -DWITH_GETTEXT=FALSE
42
43 define Package/fish/install
44 $(INSTALL_DIR) $(1)/usr/bin
45 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fish $(1)/usr/bin
46 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fish_indent $(1)/usr/bin
47 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fish_key_reader $(1)/usr/bin
48 $(INSTALL_DIR) $(1)/usr/share/fish
49 $(CP) $(PKG_INSTALL_DIR)/usr/share/fish/* $(1)/usr/share/fish/
50 rm -rf $(1)/usr/share/fish/groff
51 rm -rf $(1)/usr/share/fish/man
52 rm -rf $(1)/usr/share/fish/tools
53 endef
54
55 define Package/fish/postinst
56 #!/bin/sh
57 grep fish $${IPKG_INSTROOT}/etc/shells || \
58 echo "/usr/bin/fish" >> $${IPKG_INSTROOT}/etc/shells
59
60 # Backwards compatibility
61 if [ -e /bin/fish ] && { [ ! -L /bin/fish ] || [ "$(readlink -fn $${IPKG_INSTROOT}/bin/fish)" != "../$(CONFIGURE_PREFIX)/bin/fish" ]; }; then
62 ln -fs "../$(CONFIGURE_PREFIX)/bin/fish" "$${IPKG_INSTROOT}/bin/fish"
63 fi
64 endef
65
66 define Package/fish/postrm
67 rm -rf "$${IPKG_INSTROOT}/$(CONFIGURE_PREFIX)/share/fish/$(PKG_VERSION)"
68 endef
69
70 $(eval $(call BuildPackage,fish))