Commit dcfa3ffe authored by Slava Monich's avatar Slava Monich

[libmce-glib] Respect arch specific lib dir. JB#49681

parent c60c1349
......@@ -4,6 +4,7 @@ debian/libmce-glib
debian/libmce-glib-dev
debian/*.debhelper.log
debian/*.debhelper
debian/*.install
debian/*.substvars
debian/tmp
documentation.list
......
......@@ -133,14 +133,13 @@ debug: $(DEBUG_LIB) $(DEBUG_LINK)
release: $(RELEASE_LIB) $(RELEASE_LINK)
pkgconfig: $(PKGCONFIG)
clean:
rm -f *~ $(SRC_DIR)/*~ $(INCLUDE_DIR)/*~ rpm/*~
rm -fr $(BUILD_DIR) RPMS installroot
rm -fr debian/tmp debian/lib$(NAME) debian/lib$(NAME)-dev
rm -f documentation.list debian/files debian/*.substvars
rm -f debian/*.debhelper.log debian/*.debhelper debian/*~
rm -f debian/*.install
$(GEN_DIR):
mkdir -p $@
......@@ -181,8 +180,17 @@ $(DEBUG_LINK):
$(RELEASE_LINK):
ln -sf $(LIB) $@
# This one could be substituted with arch specific dir
LIBDIR ?= /usr/lib
ABS_LIBDIR := $(shell echo /$(LIBDIR) | sed -r 's|/+|/|g')
pkgconfig: $(PKGCONFIG)
$(PKGCONFIG): $(LIB_NAME).pc.in Makefile
sed -e 's/\[version\]/'$(PCVERSION)/g $< > $@
sed -e 's|@version@|$(PCVERSION)|g' -e 's|@libdir@|$(ABS_LIBDIR)|g' $< > $@
debian/%.install: debian/%.install.in
sed 's|@LIBDIR@|$(LIBDIR)|g' $< > $@
#
# Install
......@@ -192,11 +200,9 @@ INSTALL = install
INSTALL_DIRS = $(INSTALL) -d
INSTALL_FILES = $(INSTALL) -m 644
INSTALL_LIB_DIR = $(DESTDIR)/usr/lib
INSTALL_LIB_DIR = $(DESTDIR)$(ABS_LIBDIR)
INSTALL_INCLUDE_DIR = $(DESTDIR)/usr/include/$(LIB_NAME)
INSTALL_PKGCONFIG_DIR = $(DESTDIR)/usr/lib/pkgconfig
INSTALL_ALIAS = $(INSTALL_LIB_DIR)/$(LIB_SHORTCUT)
INSTALL_PKGCONFIG_DIR = $(DESTDIR)$(ABS_LIBDIR)/pkgconfig
install: $(INSTALL_LIB_DIR)
$(INSTALL_FILES) $(RELEASE_LIB) $(INSTALL_LIB_DIR)
......
......@@ -2,13 +2,13 @@ Source: libmce-glib
Section: libs
Priority: optional
Maintainer: Slava Monich <slava.monich@jolla.com>
Build-Depends: debhelper (>= 7), libglib2.0-dev (>= 2.0), libglibutil-dev, mce-dev
Build-Depends: debhelper (>= 8.1.3), libglib2.0-dev (>= 2.0), libglibutil-dev, mce-dev
Standards-Version: 3.8.4
Package: libmce-glib
Section: libs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Depends: libglibutil (>= 1.0.5), ${shlibs:Depends}, ${misc:Depends}
Description: Client library for mce
Package: libmce-glib-dev
......
debian/tmp/usr/lib/libmce-glib.so usr/lib
include/*.h usr/include/libmce-glib
build/libmce-glib.pc usr/lib/pkgconfig
debian/tmp/@LIBDIR@/libmce-glib.so @LIBDIR@
debian/tmp/@LIBDIR@/pkgconfig/libmce-glib.pc @LIBDIR@/pkgconfig
debian/tmp/usr/include/* usr/include
debian/tmp/usr/lib/libmce-glib.so.* usr/lib
debian/tmp/@LIBDIR@/libmce-glib.so.* @LIBDIR@
......@@ -4,8 +4,13 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
LIBDIR=usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
override_dh_auto_build:
dh_auto_build -- LIBDIR=$(LIBDIR) release pkgconfig debian/libmce-glib.install debian/libmce-glib-dev.install
override_dh_auto_install:
dh_auto_install -- install-dev
dh_auto_install -- LIBDIR=$(LIBDIR) install-dev
%:
dh $@
libdir=/usr/lib
libdir=@libdir@
includedir=/usr/include
Name: libmce-glib
Description: MCE client library
Version: [version]
Version: @version@
Requires.private: libglibutil glib-2.0 gio-2.0
Libs: -lmce-glib
Cflags: -I${includedir}/libmce-glib
......@@ -28,11 +28,11 @@ This package contains the development library for %{name}.
%setup -q
%build
make KEEP_SYMBOLS=1 release pkgconfig
make LIBDIR=%{_libdir} KEEP_SYMBOLS=1 release pkgconfig
%install
rm -rf %{buildroot}
make install-dev DESTDIR=%{buildroot}
make LIBDIR=%{_libdir} DESTDIR=%{buildroot} install-dev
%post -p /sbin/ldconfig
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment