From e2f183a2ae2710e60a8402863bab5ac7af7a0cc0 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Tue, 26 Jul 2016 12:11:38 +0100 Subject: [PATCH] Generate pkgconfig and ship it in libdpkg-dev The content of the libdpdk.so linker script is read at build time and the libraries included are used to generate the LIBS flags. Also the version is read from the changelog. Change-Id: I52a6dd01706713feb91004d138dbeac7e870aca5 Signed-off-by: Luca Boccassi --- debian/changelog | 4 ++++ debian/libdpdk.pc.in | 10 ++++++++++ debian/rules | 6 ++++++ 3 files changed, 20 insertions(+) create mode 100644 debian/libdpdk.pc.in diff --git a/debian/changelog b/debian/changelog index 7f803058..3e0ae32b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,11 @@ dpdk (16.07-rc5-1) UNRELEASED; urgency=medium + [ Ricardo Salveti de Araujo ] * Merge with upstream DPDK 16.07-rc5 release + [ Luca Boccassi ] + * Generate pkgconfig and ship it in libdpdk-dev + -- Ricardo Salveti de Araujo Tue, 26 Jul 2016 14:13:38 -0300 dpdk (16.07-rc4-1) UNRELEASED; urgency=medium diff --git a/debian/libdpdk.pc.in b/debian/libdpdk.pc.in new file mode 100644 index 00000000..eff4f18e --- /dev/null +++ b/debian/libdpdk.pc.in @@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: dpdk +Description: Data Plane Development Kit library +Version: @VERSION@ +Libs: -L${libdir} @DPDK_LIBS@ -ldl -lm -lpthread -lz +Cflags: -I${includedir}/dpdk -include ${includedir}/dpdk/rte_config.h diff --git a/debian/rules b/debian/rules index a726c75b..e75dd98f 100755 --- a/debian/rules +++ b/debian/rules @@ -164,6 +164,12 @@ binary-arch: mkdir -p debian/$${PKG}/$(LIBDIR); \ mv $${lib} debian/$${PKG}/$(LIBDIR); \ done + # pkg-config + mkdir -p debian/libdpdk-dev/$(LIBDIR)/pkgconfig + LIBS=$$(sed -e 's/GROUP ( \(.*\) )/\1/' -e 's/lib/-l/g' -e 's/\.so//g' \ + $(CURDIR)/debian/libdpdk-dev/$(LIBDIR)/libdpdk.so); \ + sed -e "s/@DPDK_LIBS@/$${LIBS}/" -e "s/@VERSION@/$(VERSION)/" \ + debian/libdpdk.pc.in > debian/libdpdk-dev/$(LIBDIR)/pkgconfig/libdpdk.pc # Package: dpdk-igb-uio-dkms mkdir -p debian/dpdk-igb-uio-dkms/usr/src/dpdk-igb-uio-$(VERSION) cp lib/librte_eal/linuxapp/igb_uio/* \ -- 2.16.6