Browse Source

Add a new libdpkg-dev package with the headers and the static library

The API should be considered volatile. Although this will help somewhat
people that are currently using the static library anyway, but have to
resort to building dpkg from source and using the headers and the static
library from the source tree.
Guillem Jover 14 years ago
parent
commit
9cdcabb0a7

+ 3 - 0
Makefile.am

@@ -53,6 +53,9 @@ EXTRA_DIST = \
 	debian/dselect.install \
 	debian/dselect.preinst \
 	debian/dselect.lintian-overrides \
+	debian/libdpkg-dev.docs \
+	debian/libdpkg-dev.install \
+	debian/libdpkg-dev.lintian-overrides \
 	debian/source.lintian-overrides \
 	debian/source/format \
 	debian/source/options \

+ 1 - 0
configure.ac

@@ -139,6 +139,7 @@ AC_CONFIG_FILES([ Makefile
 		  lib/Makefile
 		  lib/compat/Makefile
 		  lib/dpkg/Makefile
+		  lib/dpkg/libdpkg.pc
 		  lib/dpkg/test/Makefile
 		  doc/Doxyfile
 		  man/Makefile

+ 1 - 0
debian/.gitignore

@@ -1,3 +1,4 @@
+libdpkg-dev
 dpkg
 dpkg-dev
 dselect

+ 2 - 0
debian/changelog

@@ -128,6 +128,8 @@ dpkg (1.15.6) UNRELEASED; urgency=low
     and zlib for dpkg-deb and and libselinux for dpkg on GNU/Linux.
   * Mark the libdpkg.a API as volatile and require any possible users to set
     LIBDPKG_VOLATILE_API to acknowledge that fact.
+  * Add a new libdpkg-dev package with the headers and the static library,
+    although its API should be considered volatile.
 
   [ Modestas Vainius ]
   * Implement symbol patterns (Closes: #563752). From now on, it is possible to

+ 12 - 0
debian/control

@@ -14,6 +14,18 @@ Build-Depends: debhelper (>= 6.0.7), pkg-config, po4a (>= 0.33.1),
  libselinux1-dev (>= 1.28-4) [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64],
  libtimedate-perl, libio-string-perl
 
+Package: libdpkg-dev
+Section: libdevel
+Priority: optional
+Architecture: any
+Depends: ${misc:Depends}
+Description: package maintenance system for Debian - development files
+ This package contains the header files and static library necessary to
+ develop software using libdpkg, the same library used internally by dpkg.
+ .
+ Note though, that the API is to be considered volatile, and might change
+ at any time, use at your own risk.
+
 Package: dpkg
 Architecture: any
 Essential: yes

+ 5 - 0
debian/libdpkg-dev.docs

@@ -0,0 +1,5 @@
+AUTHORS
+THANKS
+debian/usertags
+doc/README.api
+doc/README.feature-removal-schedule

+ 3 - 0
debian/libdpkg-dev.install

@@ -0,0 +1,3 @@
+usr/include/dpkg/*.h
+usr/lib/pkgconfig/libdpkg.pc
+usr/lib/libdpkg.a

+ 2 - 0
debian/libdpkg-dev.lintian-overrides

@@ -0,0 +1,2 @@
+libdpkg-dev: redundant-origin-field
+libdpkg-dev: redundant-bugs-field

+ 1 - 0
lib/dpkg/.gitignore

@@ -1 +1,2 @@
 trigdeferred.c
+libdpkg.pc

+ 47 - 22
lib/dpkg/Makefile.am

@@ -12,47 +12,72 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/lib
 
 
-noinst_LIBRARIES = libdpkg.a
+EXTRA_DIST = \
+	libdpkg.pc.in
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libdpkg.pc
+
+lib_LIBRARIES = libdpkg.a
 
 libdpkg_a_SOURCES = \
-	dpkg.h \
-	dpkg-db.h \
 	dlist.h \
-	ar.c ar.h \
-	buffer.c buffer.h \
+	ar.c \
+	buffer.c \
 	cleanup.c \
-	command.c command.h \
-	compress.c compress.h \
+	command.c \
+	compress.c \
 	database.c \
 	dbmodify.c \
 	dump.c \
 	ehandle.c \
-	file.c file.h \
+	file.c \
 	fields.c \
 	i18n.h \
 	lock.c \
 	log.c \
-	macros.h \
 	md5.c md5.h \
 	mlib.c \
-	myopt.c myopt.h \
+	myopt.c \
 	nfmalloc.c \
 	parse.c \
 	parsehelp.c \
-	parsedump.h \
-	path.c path.h \
-	pkg.c pkg.h \
-	pkg-array.c pkg-array.h \
-	pkg-format.c pkg-format.h \
-	pkg-list.c pkg-list.h \
-	pkg-queue.c pkg-queue.h \
-	progress.c progress.h \
-	string.c string.h \
-	subproc.c subproc.h \
-	tarfn.c tarfn.h \
+	path.c \
+	pkg.c \
+	pkg-array.c \
+	pkg-format.c \
+	pkg-list.c \
+	pkg-queue.c \
+	progress.c \
+	string.c \
+	subproc.c \
+	tarfn.c \
 	test.h \
 	triglib.c \
 	trigdeferred.l \
 	utils.c \
-	varbuf.c varbuf.h \
+	varbuf.c \
 	vercmp.c
+
+pkginclude_HEADERS = \
+	ar.h \
+	buffer.h \
+	command.h \
+	compress.h \
+	dpkg.h \
+	dpkg-db.h \
+	file.h \
+	macros.h \
+	myopt.h \
+	parsedump.h \
+	path.h \
+	pkg.h \
+	pkg-array.h \
+	pkg-format.h \
+	pkg-list.h \
+	pkg-queue.h \
+	progress.h \
+	string.h \
+	subproc.h \
+	tarfn.h \
+	varbuf.h

+ 12 - 0
lib/dpkg/libdpkg.pc.in

@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+pkglibdir=@pkglibdir@
+
+Name: libdpkg
+Description: Debian package management system library
+Version: @VERSION@
+Libs: -L${libdir} -ldpkg
+Libs.private: @ZLIB_LIBS@ @BZ2_LIBS@
+Cflags: -I${includedir}