From ab5b22982f1291c9482415743cc8b8cd547d49a5 Mon Sep 17 00:00:00 2001 From: David Adam Date: Wed, 1 Oct 2014 22:02:55 +0800 Subject: [PATCH] fish.pc: add pkgconfig file for fish Assists other packages in finding the path to install completions: call `pkg-config --variable=completionsdir fish` or so (like bash-completion). As discussed in #1485. --- .gitignore | 1 + Makefile.in | 5 ++++- fish.pc.in | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 fish.pc.in diff --git a/.gitignore b/.gitignore index e613d161b..59bd33a1f 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ fish fish_indent fish_tests fishd +fish.pc mimedb seq set_color diff --git a/Makefile.in b/Makefile.in index 00b5a6c17..c4decc58b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -212,7 +212,7 @@ endif # Make everything needed for installing fish # -all: $(PROGRAMS) $(user_doc) $(share_man) $(TRANSLATIONS) +all: $(PROGRAMS) $(user_doc) $(share_man) $(TRANSLATIONS) fish.pc @echo fish has now been built. @echo Use \'$(MAKE) install\' to install fish. .PHONY: all @@ -450,6 +450,7 @@ doc.h: $(HDR_FILES) -e "s,@docdir\@,$(docdir),g" \ -e "s|@configure_input\@|$@, generated from $@.in by the Makefile. DO NOT MANUALLY EDIT THIS FILE!|g" \ -e "s,@prefix\@,$(prefix),g" \ + -e "s,@fish_build_version\@,$(FISH_BUILD_VERSION),g" \ # @@ -631,6 +632,8 @@ install-force: all install-translations $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/tools/web_config/sample_prompts $(INSTALL) -m 644 etc/config.fish $(DESTDIR)$(sysconfdir)/fish/ $(INSTALL) -m 644 share/config.fish $(DESTDIR)$(datadir)/fish/ + $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/pkgconfig + $(INSTALL) -m 644 fish.pc $(DESTDIR)$(datadir)/pkgconfig for i in $(COMPLETIONS_DIR_FILES:%='%'); do \ $(INSTALL) -m 644 $$i $(DESTDIR)$(datadir)/fish/completions/; \ true; \ diff --git a/fish.pc.in b/fish.pc.in new file mode 100644 index 000000000..cae82246b --- /dev/null +++ b/fish.pc.in @@ -0,0 +1,8 @@ +prefix=@prefix@ +datadir=@datadir@ +completionsdir=${datadir}/fish/vendor_completions.d + +Name: fish +Description: fish, the friendly interactive shell +URL: http://fishshell.com/ +Version: @fish_build_version@