From 834344a1afd3a8aa5e9518ea2da10bf7fdd31c99 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 17 Jan 2012 17:26:18 +0100 Subject: [PATCH] Install a pkgconfig file for libxbps. --- .gitignore | 1 + Makefile | 2 +- NEWS | 8 ++++++++ configure | 2 ++ data/Makefile | 23 +++++++++++++++++++++++ data/libxbps.pc.in | 10 ++++++++++ 6 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 data/Makefile create mode 100644 data/libxbps.pc.in diff --git a/.gitignore b/.gitignore index 117a93d7..2371e4aa 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ bin/xbps-dgraph/xbps-dgraph *.a *.xml *.png +*.pc api/ doc/xbps_api_doxyfile ftperr.h diff --git a/Makefile b/Makefile index 3ad9b4cb..533e5820 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ -include config.mk -SUBDIRS = include lib bin etc +SUBDIRS = include lib bin etc data ifdef BUILD_API_DOCS SUBDIRS += doc diff --git a/NEWS b/NEWS index 6d7ac69a..a470b4cd 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,13 @@ xbps-0.12.0 (???): + * Added a pkg-config file to simplify writing code with libxbps. + + * libxbps: improved support for finding newest package versions available + in repository pool. + + * libxbps: added support for finding exact package name/version matches + in repository pool. + * Fixed registering repositories with trailing '/' chars in configuration file: xbps.conf. diff --git a/configure b/configure index a9febb61..b1e9f4ab 100755 --- a/configure +++ b/configure @@ -78,6 +78,7 @@ done : ${MANDIR:=${PREFIX}/share/man} : ${INCLUDEDIR:=${PREFIX}/include} : ${ETCDIR:=${PREFIX}/etc} +: ${PKGCONFIGDIR:=${LIBDIR}/pkgconfig} : ${TOPDIR:=..} _which() @@ -136,6 +137,7 @@ echo "INCLUDEDIR ?= $INCLUDEDIR" >>$CONFIG_MK echo "LIBDIR ?= $LIBDIR" >>$CONFIG_MK echo "MANDIR ?= $MANDIR" >>$CONFIG_MK echo "SHAREDIR ?= $SHAREDIR" >>$CONFIG_MK +echo "PKGCONFIGDIR ?= $PKGCONFIGDIR" >>$CONFIG_MK ETCDIR="${ETCDIR}/xbps" echo "ETCDIR ?= $ETCDIR" >>$CONFIG_MK diff --git a/data/Makefile b/data/Makefile new file mode 100644 index 00000000..9a05697f --- /dev/null +++ b/data/Makefile @@ -0,0 +1,23 @@ +-include ../config.mk + +VERSION = 0.12 +PCFILE = libxbps.pc + +.PHONY: all +all: + sed -e "s|@@VERSION@@|${VERSION}|g;s|@@PREFIX@@|${PREFIX}|g" \ + ${PCFILE}.in > ${PCFILE} + +.PHONY: install +install: + install -d $(DESTDIR)$(PKGCONFIGDIR) + install -m644 $(PCFILE) $(DESTDIR)$(PKGCONFIGDIR) + +.PHONY: uninstall +uninstall: + -rm -f $(DESTDIR)$(PKGCONFIGDIR)/$(PCFILE) + + +.PHONY: clean +clean: + -rm -f $(PCFILE) diff --git a/data/libxbps.pc.in b/data/libxbps.pc.in new file mode 100644 index 00000000..4048bc6e --- /dev/null +++ b/data/libxbps.pc.in @@ -0,0 +1,10 @@ +prefix=@@PREFIX@@ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XBPS API Library +Description: The X Binary Package System library +Version: @@VERSION@@ +Libs: -lprop -lxbps +Cflags: -I${includedir} -L${libdir}