Commit 472a2ea9 authored by Slava Monich's avatar Slava Monich

Merge branch 'lib64' into 'master'

Respect arch specific lib dir

See merge request !11
parents b2c0e975 8447abb9
......@@ -4,6 +4,7 @@ debian/libgsupplicant
debian/libgsupplicant-dev
debian/*.debhelper.log
debian/*.debhelper
debian/*.install
debian/*.substvars
debian/tmp
documentation.list
......
......@@ -100,10 +100,7 @@ FULL_LDFLAGS = $(BASE_FLAGS) $(LDFLAGS) -shared -Wl,-soname=$(LIB_SONAME) \
DEBUG_FLAGS = -g
RELEASE_FLAGS =
ifndef KEEP_SYMBOLS
KEEP_SYMBOLS = 0
endif
KEEP_SYMBOLS ?= 0
ifneq ($(KEEP_SYMBOLS),0)
RELEASE_FLAGS += -g
endif
......@@ -140,6 +137,7 @@ endif
endif
$(GEN_FILES): | $(GEN_DIR)
$(PKGCONFIG): | $(BUILD_DIR)
$(DEBUG_OBJS): | $(DEBUG_BUILD_DIR)
$(RELEASE_OBJS): | $(RELEASE_BUILD_DIR)
......@@ -185,6 +183,7 @@ clean:
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
make -C test cleaner
make -C tools/wpa-tool clean
......@@ -242,8 +241,19 @@ $(DEBUG_BUILD_DIR)/$(LIB_SYMLINK2): $(DEBUG_LIB)
$(RELEASE_BUILD_DIR)/$(LIB_SYMLINK2): $(RELEASE_LIB)
ln -sf $(LIB) $@
$(PKGCONFIG): $(LIB_NAME).pc.in
sed -e 's/\[version\]/'$(PCVERSION)/g $< > $@
#
# LIBDIR usually gets substituted with arch specific dir.
# It's relative in deb build and can be whatever in rpm build.
#
LIBDIR ?= usr/lib
ABS_LIBDIR := $(shell echo /$(LIBDIR) | sed -r 's|/+|/|g')
$(PKGCONFIG): $(LIB_NAME).pc.in Makefile
sed -e 's|@version@|$(PCVERSION)|g' -e 's|@libdir@|$(ABS_LIBDIR)|g' $< > $@
debian/%.install: debian/%.install.in
sed 's|@LIBDIR@|$(LIBDIR)|g' $< > $@
#
# Install
......@@ -253,9 +263,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/$(NAME)
INSTALL_PKGCONFIG_DIR = $(DESTDIR)/usr/lib/pkgconfig
INSTALL_PKGCONFIG_DIR = $(DESTDIR)$(ABS_LIBDIR)/pkgconfig
install: $(INSTALL_LIB_DIR)
$(INSTALL_FILES) $(RELEASE_LIB) $(INSTALL_LIB_DIR)
......
......@@ -2,7 +2,7 @@ Source: libgsupplicant
Section: libs
Priority: optional
Maintainer: Slava Monich <slava.monich@jolla.com>
Build-Depends: debhelper (>= 7), libglib2.0-dev (>= 2.0), libglibutil-dev (>= 1.0.21)
Build-Depends: debhelper (>= 8.1.3), libglib2.0-dev (>= 2.0), libglibutil-dev (>= 1.0.21)
Standards-Version: 3.8.4
Package: libgsupplicant
......
debian/tmp/usr/lib/libgsupplicant.so usr/lib
include/*.h usr/include/gsupplicant
build/libgsupplicant.pc usr/lib/pkgconfig
debian/tmp/@LIBDIR@/libgsupplicant.so @LIBDIR@
debian/tmp/@LIBDIR@/pkgconfig/libgsupplicant.pc @LIBDIR@/pkgconfig
debian/tmp/usr/include/* usr/include
debian/tmp/usr/lib/libgsupplicant.so.* usr/lib
debian/tmp/@LIBDIR@/libgsupplicant.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/libgsupplicant.install debian/libgsupplicant-dev.install
override_dh_auto_install:
dh_auto_install -- install-dev
dh_auto_install -- LIBDIR=$(LIBDIR) install-dev
%:
dh $@
name=gsupplicant
libdir=/usr/lib
libdir=@libdir@
includedir=/usr/include
Name: libgsupplicant
Description: Client library for wpa_supplicant
Version: [version]
Requires: glib-2.0 gio-2.0 libglibutil
Version: @version@
Requires.private: glib-2.0 gio-2.0 libglibutil
Libs: -L${libdir} -l${name}
Cflags: -I${includedir} -I${includedir}/${name}
......@@ -4,7 +4,7 @@ Release: 0
Summary: Client library for wpa_supplicant
Group: Development/Libraries
License: BSD
URL: https://git.merproject.org/mer-core/libgsupplicant
URL: https://git.sailfishos.org/mer-core/libgsupplicant
Source: %{name}-%{version}.tar.bz2
%define libglibutil_version 1.0.21
......@@ -31,11 +31,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
%check
make -C test test
......
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