Multi-arch support.

This commit is contained in:
Russell Sim 2013-07-16 12:32:46 +10:00
parent 2ab62c32f0
commit c2cf9f3807
4 changed files with 31 additions and 9 deletions

4
debian/control vendored
View File

@ -13,6 +13,7 @@ Homepage: http://libgit2.github.com/
Package: libgit2-dev
Architecture: any
Section: libdevel
Multi-Arch: same
Depends: libgit2-0 (= ${binary:Version}), libz-dev, libssl-dev,
${shlibs:Depends}, ${misc:Depends}
Description: low-level Git library (development files)
@ -24,6 +25,8 @@ Description: low-level Git library (development files)
Package: libgit2-0
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: low-level Git library
libgit2 is a portable, pure C implementation of the Git
@ -33,6 +36,7 @@ Description: low-level Git library
Package: libgit2-dbg
Section: debug
Architecture: any
Multi-Arch: same
Depends: libgit2-0 (= ${binary:Version}),
${misc:Depends}
Description: libgit2 library and debugging symbols

View File

@ -1 +1 @@
/usr/lib/lib*so.*
/usr/lib/*/lib*so.*

View File

@ -1,4 +1,4 @@
/usr/include
/usr/lib/lib*.a
/usr/lib/lib*.so
/usr/lib/pkgconfig
/usr/lib/*/lib*.a
/usr/lib/*/lib*.so
/usr/lib/*/pkgconfig

28
debian/rules vendored
View File

@ -1,16 +1,31 @@
#!/usr/bin/make -f
# -*- makefile -*-
# This rules file has 2 streams, the build-debian-devel stream builds
# the static library and the bulid-debian-release builds the dynamic
# library.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
override_dh_auto_configure:
dh_auto_configure --builddirectory=build-debian-release -- -DTHREADSAFE:BOOL=ON -DBUILD_CLAR:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
dh_auto_configure --builddirectory=build-debian-devel -- -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DTHREADSAFE:BOOL=ON -DBUILD_CLAR:BOOL=OFF
dh_auto_configure --builddirectory=build-debian-release -- \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DTHREADSAFE:BOOL=ON \
-DBUILD_CLAR:BOOL=ON \
-DLIB_INSTALL_DIR:STRING=/usr/lib/$(DEB_HOST_MULTIARCH)
dh_auto_configure --builddirectory=build-debian-devel -- \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DTHREADSAFE:BOOL=ON \
-DBUILD_CLAR:BOOL=OFF \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DLIB_INSTALL_DIR:STRING=/usr/lib/$(DEB_HOST_MULTIARCH)
override_dh_makeshlibs:
dh_makeshlibs -V 'libgit2-0 (>= 0.18.0)'
dh_makeshlibs -V 'libgit2-0 (>= 0.19.0)'
override_dh_auto_build :
dh_auto_build --builddirectory=build-debian-release
@ -20,9 +35,12 @@ override_dh_auto_install :
dh_auto_install --builddirectory=build-debian-release
dh_auto_install --builddirectory=build-debian-devel
override_dh_strip:
dh_strip --dbg-package=libgit2-dbg
override_dh_installexamples:
dh_installexamples --exclude .gitignore
%:
dh $@ --buildsystem cmake --dbg-package=libgit2-dbg --builddirectory=build-debian-release
dh $@ --buildsystem cmake --builddirectory=build-debian-devel
dh $@ --parallel --buildsystem cmake --dbg-package=libgit2-dbg --builddirectory=build-debian-release
dh $@ --parallel --buildsystem cmake --builddirectory=build-debian-devel