diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2019-05-08 03:55:03 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2019-05-08 04:46:33 +0200 |
commit | 9375f49865296f04bd51e5e39ddca863b67cbd6c (patch) | |
tree | d2100c12c83236176ad931179a70495eb7f9a221 /scripts | |
parent | 614ef781ebf8ef7ae116c26d419bc9002c162599 (diff) | |
download | pacman-9375f49865296f04bd51e5e39ddca863b67cbd6c.tar.gz pacman-9375f49865296f04bd51e5e39ddca863b67cbd6c.tar.xz |
libmakepkg: install pkg-config file
Since makepkg exports a public library of functions, other projects may
wish to use these functions. Highlights include parseopts or our
messaging functions.
Install a pkg-config file in order to let downstream users detect where
they can source the libmakepkg functionality. This is useful e.g. to
gracefully handle the case where a thirdparty project is configured and
installed into a different datarootdir from pacman, but still wants to
use the installed pacman's version of libmakepkg.
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/.gitignore | 1 | ||||
-rw-r--r-- | scripts/Makefile.am | 8 | ||||
-rw-r--r-- | scripts/libmakepkg.pc.in | 6 | ||||
-rw-r--r-- | scripts/meson.build | 6 |
4 files changed, 19 insertions, 2 deletions
diff --git a/scripts/.gitignore b/scripts/.gitignore index b8bb1f83..541fd18d 100644 --- a/scripts/.gitignore +++ b/scripts/.gitignore @@ -1,3 +1,4 @@ +libmakepkg.pc makepkg makepkg-template pacman-db-upgrade diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 2c743e82..f9e7bd32 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -5,6 +5,9 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = \ SUBDIRS = po +pkgconfigdir = $(datarootdir)/pkgconfig +pkgconfig_DATA = libmakepkg.pc + bin_SCRIPTS = \ $(OURSCRIPTS) \ makepkg-template \ @@ -19,6 +22,7 @@ OURSCRIPTS = \ repo-add EXTRA_DIST = \ + libmakepkg.pc.in \ makepkg.sh.in \ makepkg-template.pl.in \ pacman-db-upgrade.sh.in \ @@ -145,7 +149,7 @@ COMPLETION_DIST = \ $(addsuffix .in, $(COMPLETION_IN)) # Files that should be removed, but which Automake does not know. -MOSTLYCLEANFILES = $(bin_SCRIPTS) $(LIBMAKEPKG_IN) $(COMPLETION_IN) +MOSTLYCLEANFILES = $(bin_SCRIPTS) $(LIBMAKEPKG_IN) $(COMPLETION_IN) libmakepkg.pc clean-local: $(AM_V_at)$(RM) -r .lib @@ -195,7 +199,7 @@ $(LIBMAKEPKG_IN): %: %.in Makefile $(AM_V_at)chmod a-w $@ @$(BASH_SHELL) -O extglob -n $@ -$(COMPLETION_IN): %: %.in Makefile +$(COMPLETION_IN) libmakepkg.pc: %: %.in Makefile $(AM_V_at)$(RM) $@ $(AM_V_at)$(MKDIR_P) $(dir $@) $(AM_V_GEN)$(edit) $(srcdir)/$@.in >$@ diff --git a/scripts/libmakepkg.pc.in b/scripts/libmakepkg.pc.in new file mode 100644 index 00000000..05e9566a --- /dev/null +++ b/scripts/libmakepkg.pc.in @@ -0,0 +1,6 @@ +libmakepkgdir=@libmakepkgdir@ + +Name: libmakepkg +Description: Arch Linux package build utility +URL: https://www.archlinux.org/pacman/ +Version: @PACKAGE_VERSION@ diff --git a/scripts/meson.build b/scripts/meson.build index db442973..7d533f35 100644 --- a/scripts/meson.build +++ b/scripts/meson.build @@ -78,6 +78,12 @@ endforeach subdir('libmakepkg') +configure_file( + configuration : { 'libmakepkgdir': LIBMAKEPKGDIR, 'PACKAGE_VERSION': PACKAGE_VERSION }, + input : 'libmakepkg.pc.in', + output : '@BASENAME@', + install_dir : join_paths(DATAROOTDIR, 'pkgconfig')) + custom_target( 'bash_completion', command : [ SCRIPT_EDITOR, '@INPUT@', '@OUTPUT@' ], |