Merge branch 'lib64' into 'master'
Respect arch specific lib dir See merge request mer-core/libmce-glib!7
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,6 +4,7 @@ debian/libmce-glib
|
||||
debian/libmce-glib-dev
|
||||
debian/*.debhelper.log
|
||||
debian/*.debhelper
|
||||
debian/*.install
|
||||
debian/*.substvars
|
||||
debian/tmp
|
||||
documentation.list
|
||||
|
||||
37
Makefile
37
Makefile
@@ -63,10 +63,7 @@ RELEASE_BUILD_DIR = $(BUILD_DIR)/release
|
||||
# Tools and flags
|
||||
#
|
||||
|
||||
ifndef CC
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
endif
|
||||
|
||||
CC ?= $(CROSS_COMPILE)gcc
|
||||
LD = $(CC)
|
||||
DEFINES += -DGLIB_DISABLE_DEPRECATION_WARNINGS
|
||||
WARNINGS = -Wall -Wno-unused-parameter -Wno-multichar
|
||||
@@ -74,14 +71,12 @@ INCLUDES = -I$(INCLUDE_DIR) -I$(GEN_DIR)
|
||||
BASE_FLAGS = -fPIC $(CFLAGS)
|
||||
FULL_CFLAGS = $(BASE_FLAGS) $(DEFINES) $(WARNINGS) $(INCLUDES) -MMD -MP \
|
||||
$(shell pkg-config --cflags $(PKGS))
|
||||
FULL_LDFLAGS = $(BASE_FLAGS) $(LDFLAGS) -shared -Wl,-soname -Wl,$(LIB_SONAME)
|
||||
FULL_LDFLAGS = $(BASE_FLAGS) $(LDFLAGS) -shared -Wl,-soname -Wl,$(LIB_SONAME) \
|
||||
-Wl,--version-script=$(LIB_NAME).map
|
||||
DEBUG_FLAGS = -g
|
||||
RELEASE_FLAGS =
|
||||
|
||||
ifndef KEEP_SYMBOLS
|
||||
KEEP_SYMBOLS = 0
|
||||
endif
|
||||
|
||||
KEEP_SYMBOLS ?= 0
|
||||
ifneq ($(KEEP_SYMBOLS),0)
|
||||
RELEASE_FLAGS += -g
|
||||
endif
|
||||
@@ -138,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 $@
|
||||
@@ -186,24 +180,29 @@ $(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
|
||||
#
|
||||
|
||||
INSTALL_PERM = 644
|
||||
|
||||
INSTALL = install
|
||||
INSTALL_DIRS = $(INSTALL) -d
|
||||
INSTALL_FILES = $(INSTALL) -m $(INSTALL_PERM)
|
||||
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)
|
||||
|
||||
4
debian/control
vendored
4
debian/control
vendored
@@ -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
|
||||
|
||||
3
debian/libmce-glib-dev.install
vendored
3
debian/libmce-glib-dev.install
vendored
@@ -1,3 +0,0 @@
|
||||
debian/tmp/usr/lib/libmce-glib.so usr/lib
|
||||
include/*.h usr/include/libmce-glib
|
||||
build/libmce-glib.pc usr/lib/pkgconfig
|
||||
3
debian/libmce-glib-dev.install.in
vendored
Normal file
3
debian/libmce-glib-dev.install.in
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
debian/tmp/@LIBDIR@/libmce-glib.so @LIBDIR@
|
||||
debian/tmp/@LIBDIR@/pkgconfig/libmce-glib.pc @LIBDIR@/pkgconfig
|
||||
debian/tmp/usr/include/* usr/include
|
||||
1
debian/libmce-glib.install
vendored
1
debian/libmce-glib.install
vendored
@@ -1 +0,0 @@
|
||||
debian/tmp/usr/lib/libmce-glib.so.* usr/lib
|
||||
1
debian/libmce-glib.install.in
vendored
Normal file
1
debian/libmce-glib.install.in
vendored
Normal file
@@ -0,0 +1 @@
|
||||
debian/tmp/@LIBDIR@/libmce-glib.so.* @LIBDIR@
|
||||
7
debian/rules
vendored
7
debian/rules
vendored
@@ -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 $@
|
||||
|
||||
6
libmce-glib.map
Normal file
6
libmce-glib.map
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
global:
|
||||
mce_*;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
@@ -1,9 +1,9 @@
|
||||
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
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Jolla Ltd.
|
||||
* Contact: Slava Monich <slava.monich@jolla.com>
|
||||
* Copyright (C) 2016-2020 Jolla Ltd.
|
||||
* Copyright (C) 2016-2020 Slava Monich <slava.monich@jolla.com>
|
||||
*
|
||||
* You may use this file under the terms of BSD license as follows:
|
||||
*
|
||||
@@ -13,9 +13,9 @@
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of Jolla Ltd nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
* 3. Neither the names of the copyright holders nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
@@ -60,6 +60,7 @@ enum mce_proxy_signal {
|
||||
static guint mce_proxy_signals[SIGNAL_COUNT] = { 0 };
|
||||
|
||||
typedef GObjectClass MceProxyClass;
|
||||
GType mce_proxy_get_type() MCE_INTERNAL;
|
||||
G_DEFINE_TYPE(MceProxy, mce_proxy, G_TYPE_OBJECT)
|
||||
#define PARENT_CLASS mce_proxy_parent_class
|
||||
#define MCE_PROXY_TYPE (mce_proxy_get_type())
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Jolla Ltd.
|
||||
* Contact: Slava Monich <slava.monich@jolla.com>
|
||||
* Copyright (C) 2016-2020 Jolla Ltd.
|
||||
* Copyright (C) 2016-2020 Slava Monich <slava.monich@jolla.com>
|
||||
*
|
||||
* You may use this file under the terms of BSD license as follows:
|
||||
*
|
||||
@@ -13,9 +13,9 @@
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of Jolla Ltd nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
* 3. Neither the names of the copyright holders nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
@@ -37,7 +37,7 @@
|
||||
#ifndef MCE_PROXY_H
|
||||
#define MCE_PROXY_H
|
||||
|
||||
#include "mce_types.h"
|
||||
#include "mce_types_p.h"
|
||||
|
||||
typedef struct mce_proxy_priv MceProxyPriv;
|
||||
struct _ComNokiaMceSignal;
|
||||
@@ -58,26 +58,31 @@ typedef void
|
||||
|
||||
MceProxy*
|
||||
mce_proxy_new(
|
||||
void);
|
||||
void)
|
||||
MCE_INTERNAL;
|
||||
|
||||
MceProxy*
|
||||
mce_proxy_ref(
|
||||
MceProxy* proxy);
|
||||
MceProxy* proxy)
|
||||
MCE_INTERNAL;
|
||||
|
||||
void
|
||||
mce_proxy_unref(
|
||||
MceProxy* proxy);
|
||||
MceProxy* proxy)
|
||||
MCE_INTERNAL;
|
||||
|
||||
gulong
|
||||
mce_proxy_add_valid_changed_handler(
|
||||
MceProxy* proxy,
|
||||
MceProxyFunc fn,
|
||||
void* arg);
|
||||
void* arg)
|
||||
MCE_INTERNAL;
|
||||
|
||||
void
|
||||
mce_proxy_remove_handler(
|
||||
MceProxy* proxy,
|
||||
gulong id);
|
||||
gulong id)
|
||||
MCE_INTERNAL;
|
||||
|
||||
#endif /* MCE_PROXY_H */
|
||||
|
||||
|
||||
53
src/mce_types_p.h
Normal file
53
src/mce_types_p.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Jolla Ltd.
|
||||
* Copyright (C) 2020 Slava Monich <slava.monich@jolla.com>
|
||||
*
|
||||
* You may use this file under the terms of BSD license as follows:
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the names of the copyright holders nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation
|
||||
* are those of the authors and should not be interpreted as representing
|
||||
* any official policies, either expressed or implied.
|
||||
*/
|
||||
|
||||
#ifndef MCE_TYPES_PRIVATE_H
|
||||
#define MCE_TYPES_PRIVATE_H
|
||||
|
||||
#include <mce_types.h>
|
||||
|
||||
/* Macros */
|
||||
#define MCE_INTERNAL G_GNUC_INTERNAL
|
||||
|
||||
#endif /* MCE_TYPES_PRIVATE_H */
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* mode: C
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: nil
|
||||
* End:
|
||||
*/
|
||||
Reference in New Issue
Block a user