Merge lp:~michihenning/unity-api/pkg-config into lp:unity-api

Proposed by Michi Henning
Status: Merged
Approved by: Didier Roche-Tolomelli
Approved revision: 53
Merged at revision: 60
Proposed branch: lp:~michihenning/unity-api/pkg-config
Merge into: lp:unity-api
Diff against target: 81 lines (+15/-3)
5 files modified
CMakeLists.txt (+2/-0)
debian/control (+3/-0)
debian/rules (+3/-0)
include/unity/shell/notifications/CMakeLists.txt (+1/-1)
src/libunity-api.pc.in (+6/-2)
To merge this branch: bzr merge lp:~michihenning/unity-api/pkg-config
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Michał Sawicz Approve
Jussi Pakkanen (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+165812@code.launchpad.net

Commit message

Added missing architecture directory to pkg-config file.

Description of the change

Added missing architecture directory to pkg-config file.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

I'm not a packaging expert but the way Didrocks did this for libcolumbus was this:

In CMakeLists:

set(LIBDIR "lib" CACHE PATH "Destination install dir for the library")
set(libdir ${prefix}/${LIBDIR})

In foo.pc:

libdir=@libdir@
Libs: -L${libdir} -l@COL_LIB_BASENAME@

The idea being that by default it goes to lib but packagers can override it during configuration if they want to.

Revision history for this message
Michi Henning (michihenning) wrote :

Thanks for that, I'll try this!

Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

The override in debian/rules is this:

override_dh_auto_configure:
        dh_auto_configure -- -DLIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)

49. By Michi Henning

Updated the package config files as suggested by Jussi.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
50. By Michi Henning

Jenkins got upset about the libunity-api0.install instructions. Hopefully, this will fix it.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

This mostly looks good to me.

However, I have a test failing in my pbuilder:
17/20 Test #19: testTestUtil ..............................***Exception: Other 0.31 sec
Cannot mix incompatible Qt library (version 0x50001) with this library (version 0x50002)

18/20 Test #20: testNotifications .........................***Exception: Other 0.19 sec
Cannot mix incompatible Qt library (version 0x50001) with this library (version 0x50002)

Other than that, not sure where your commit 50 is coming from, but the .so file for me is:
debian/tmp/usr/lib/x86_64-linux-gnu/libunity-api.so.0, so the previous pattern looks fine to me (at least, it pass in my pbuilder ;)).

Just something that I didn't update on libcolumbus as well:
you need to add:
"Multi-Arch: same"
in debian/control, below Architecture on libunity-api0 and libunity-api-dev binary packages
and:
"Multi-Arch: foreign"
for the libunity-api-doc binary package

(more reference at http://wiki.debian.org/Multiarch/Implementation)

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

Shouldn't you use ${LIBDIR} for the .pc installation path? And for the notifications .pc, too?

review: Needs Information
51. By Michi Henning

Added Multi-Arch to debian/rules as requested by didrocks.
Removed redundant libdir variable from CMakeLists.txt.
Adjusted libunity-api.pc.in to use LIBDIR.

52. By Michi Henning

Trying to get the install working with jenkins...

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michi Henning (michihenning) wrote :

> Shouldn't you use ${LIBDIR} for the .pc installation path? And for the
> notifications .pc, too?

Fixed. Jenkins is happy with it too.

The notifications .pc didn't need changing because it only needs the include dir, and that was correct already.

Revision history for this message
Michał Sawicz (saviq) wrote :

Yeah, but

/include/unity/shell/notifications/CMakeLists.txt:21 installs directly into ${LIB_INSTALL_PREFIX}/pkgconfig - should be ${LIBDIR}/pkgconfig

review: Needs Fixing
Revision history for this message
Michi Henning (michihenning) wrote :

> Yeah, but
>
> /include/unity/shell/notifications/CMakeLists.txt:21 installs directly into
> ${LIB_INSTALL_PREFIX}/pkgconfig - should be ${LIBDIR}/pkgconfig

Ah, I missed that, thanks! Will fix.

53. By Michi Henning

Changed include/unity/shell/notifications/CMakeLists.txt to use ${LIBDIR} to install the .pc file in the correct location.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

If this is fine by didrocks and saviq, it's fine by me.

review: Approve
Revision history for this message
Michał Sawicz (saviq) wrote :

Yup, looks fine for me.

review: Approve
Revision history for this message
Michi Henning (michihenning) wrote :

didrocks, can you please top-approve if you are cool with this now?

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Built, check the content, and multiarched, perfect! Thanks Michi :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2013-06-12 21:32:35 +0000
3+++ CMakeLists.txt 2013-06-14 00:32:27 +0000
4@@ -126,6 +126,8 @@
5 # Library install prefix
6 set(LIB_INSTALL_PREFIX lib/${CMAKE_LIBRARY_ARCHITECTURE})
7
8+set(LIBDIR ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_PREFIX} CACHE PATH "Destination install dir for the library")
9+
10 # Tests
11 include(CTest)
12 enable_testing()
13
14=== modified file 'debian/control'
15--- debian/control 2013-05-14 08:15:11 +0000
16+++ debian/control 2013-06-14 00:32:27 +0000
17@@ -24,6 +24,7 @@
18
19 Package: libunity-api0
20 Architecture: any
21+Multi-Arch: same
22 Pre-Depends: ${misc:Pre-Depends},
23 Depends: ${misc:Depends},
24 ${shlibs:Depends},
25@@ -33,6 +34,7 @@
26 Package: libunity-api-dev
27 Section: libdevel
28 Architecture: any
29+Multi-Arch: same
30 Depends: ${misc:Depends},
31 libboost1.49-dev (>= 1.49),
32 libunity-api0 (= ${binary:Version}),
33@@ -42,6 +44,7 @@
34 Package: libunity-api-doc
35 Section: doc
36 Architecture: all
37+Multi-Arch: foreign
38 Depends: ${misc:Depends},
39 Description: Documentation for Unity API
40 Library to integrate with the Unity shell (documentation)
41
42=== modified file 'debian/rules'
43--- debian/rules 2013-05-13 12:22:20 +0000
44+++ debian/rules 2013-06-14 00:32:27 +0000
45@@ -10,3 +10,6 @@
46
47 override_dh_install:
48 dh_install --fail-missing
49+
50+override_dh_auto_configure:
51+ dh_auto_configure -- -DLIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
52
53=== modified file 'include/unity/shell/notifications/CMakeLists.txt'
54--- include/unity/shell/notifications/CMakeLists.txt 2013-05-13 16:11:09 +0000
55+++ include/unity/shell/notifications/CMakeLists.txt 2013-06-14 00:32:27 +0000
56@@ -18,5 +18,5 @@
57 )
58
59 install(FILES ${CMAKE_BINARY_DIR}/data/${PKGCONFIG_FILE}
60- DESTINATION ${LIB_INSTALL_PREFIX}/pkgconfig
61+ DESTINATION ${LIBDIR}/pkgconfig
62 )
63
64=== modified file 'src/libunity-api.pc.in'
65--- src/libunity-api.pc.in 2013-05-13 11:39:49 +0000
66+++ src/libunity-api.pc.in 2013-06-14 00:32:27 +0000
67@@ -16,8 +16,12 @@
68 # Authored by: Michi Henning <michi.henning@canonical.com>
69 #
70
71+prefix=@CMAKE_INSTALL_PREFIX@
72+includedir=${prefix}/include
73+libdir=@LIBDIR@
74+
75 Name: lib@UNITY_API_LIB@
76 Description: Unity API library
77 Version: @UNITY_API_MAJOR@.@UNITY_API_MINOR@
78-Libs: -L@CMAKE_INSTALL_PREFIX@/lib -lunity-api
79-Cflags: -I@CMAKE_INSTALL_PREFIX@/include
80+Libs: -L${libdir} -l@UNITY_API_LIB@
81+Cflags: -I${includedir}

Subscribers

People subscribed via source and target branches

to all changes: