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>
This commit is contained in:
parent
614ef781eb
commit
9375f49865
4 changed files with 19 additions and 2 deletions
1
scripts/.gitignore
vendored
1
scripts/.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
|
libmakepkg.pc
|
||||||
makepkg
|
makepkg
|
||||||
makepkg-template
|
makepkg-template
|
||||||
pacman-db-upgrade
|
pacman-db-upgrade
|
||||||
|
|
|
@ -5,6 +5,9 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = \
|
||||||
|
|
||||||
SUBDIRS = po
|
SUBDIRS = po
|
||||||
|
|
||||||
|
pkgconfigdir = $(datarootdir)/pkgconfig
|
||||||
|
pkgconfig_DATA = libmakepkg.pc
|
||||||
|
|
||||||
bin_SCRIPTS = \
|
bin_SCRIPTS = \
|
||||||
$(OURSCRIPTS) \
|
$(OURSCRIPTS) \
|
||||||
makepkg-template \
|
makepkg-template \
|
||||||
|
@ -19,6 +22,7 @@ OURSCRIPTS = \
|
||||||
repo-add
|
repo-add
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
|
libmakepkg.pc.in \
|
||||||
makepkg.sh.in \
|
makepkg.sh.in \
|
||||||
makepkg-template.pl.in \
|
makepkg-template.pl.in \
|
||||||
pacman-db-upgrade.sh.in \
|
pacman-db-upgrade.sh.in \
|
||||||
|
@ -145,7 +149,7 @@ COMPLETION_DIST = \
|
||||||
$(addsuffix .in, $(COMPLETION_IN))
|
$(addsuffix .in, $(COMPLETION_IN))
|
||||||
|
|
||||||
# Files that should be removed, but which Automake does not know.
|
# 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:
|
clean-local:
|
||||||
$(AM_V_at)$(RM) -r .lib
|
$(AM_V_at)$(RM) -r .lib
|
||||||
|
@ -195,7 +199,7 @@ $(LIBMAKEPKG_IN): %: %.in Makefile
|
||||||
$(AM_V_at)chmod a-w $@
|
$(AM_V_at)chmod a-w $@
|
||||||
@$(BASH_SHELL) -O extglob -n $@
|
@$(BASH_SHELL) -O extglob -n $@
|
||||||
|
|
||||||
$(COMPLETION_IN): %: %.in Makefile
|
$(COMPLETION_IN) libmakepkg.pc: %: %.in Makefile
|
||||||
$(AM_V_at)$(RM) $@
|
$(AM_V_at)$(RM) $@
|
||||||
$(AM_V_at)$(MKDIR_P) $(dir $@)
|
$(AM_V_at)$(MKDIR_P) $(dir $@)
|
||||||
$(AM_V_GEN)$(edit) $(srcdir)/$@.in >$@
|
$(AM_V_GEN)$(edit) $(srcdir)/$@.in >$@
|
||||||
|
|
6
scripts/libmakepkg.pc.in
Normal file
6
scripts/libmakepkg.pc.in
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
libmakepkgdir=@libmakepkgdir@
|
||||||
|
|
||||||
|
Name: libmakepkg
|
||||||
|
Description: Arch Linux package build utility
|
||||||
|
URL: https://www.archlinux.org/pacman/
|
||||||
|
Version: @PACKAGE_VERSION@
|
|
@ -78,6 +78,12 @@ endforeach
|
||||||
|
|
||||||
subdir('libmakepkg')
|
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(
|
custom_target(
|
||||||
'bash_completion',
|
'bash_completion',
|
||||||
command : [ SCRIPT_EDITOR, '@INPUT@', '@OUTPUT@' ],
|
command : [ SCRIPT_EDITOR, '@INPUT@', '@OUTPUT@' ],
|
||||||
|
|
Loading…
Add table
Reference in a new issue