summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2016-07-26 12:11:38 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2016-07-26 20:12:52 +0100
commite2f183a2ae2710e60a8402863bab5ac7af7a0cc0 (patch)
tree11c560f02f81ea3cdf451d4210fd6922d03adc9d
parent8c0d2a5af176b9e9ff7e7b2aba51bd68c32f9d2e (diff)
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 <luca.boccassi@gmail.com>
-rw-r--r--debian/changelog4
-rw-r--r--debian/libdpdk.pc.in10
-rwxr-xr-xdebian/rules6
3 files changed, 20 insertions, 0 deletions
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 <rsalveti@rsalveti.net> 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/* \