mirror of
https://github.com/mer-hybris/ofono-ril-binder-plugin
synced 2025-11-03 22:25:38 +08:00
[rilbinder] Fixed 64-bit build. JB#49681
This commit is contained in:
24
Makefile
24
Makefile
@@ -119,10 +119,7 @@ LIB_FULL_CFLAGS = $(LIB_BASE_FLAGS) $(BASE_CFLAGS) \
|
||||
LIB_FULL_LDFLAGS = $(LIB_BASE_FLAGS) $(LDFLAGS) -shared \
|
||||
-Wl,-soname,$(LIB_SONAME) $(shell pkg-config --libs $(LIB_PKGS)) -lpthread
|
||||
|
||||
ifndef KEEP_SYMBOLS
|
||||
KEEP_SYMBOLS = 0
|
||||
endif
|
||||
|
||||
KEEP_SYMBOLS ?= 0
|
||||
ifneq ($(KEEP_SYMBOLS),0)
|
||||
RELEASE_FLAGS += -g
|
||||
endif
|
||||
@@ -246,8 +243,16 @@ ifeq ($(KEEP_SYMBOLS),0)
|
||||
strip $@
|
||||
endif
|
||||
|
||||
#
|
||||
# LIBDIR usually gets substituted with arch specific dir.
|
||||
# It could be relative or absolute.
|
||||
#
|
||||
|
||||
LIBDIR ?= usr/lib
|
||||
ABS_LIBDIR := $(shell echo /$(LIBDIR) | sed -r 's|/+|/|g')
|
||||
|
||||
$(PKGCONFIG): $(LIB_NAME).pc.in Makefile
|
||||
sed -e 's/\[version\]/'$(PCVERSION)/g $< > $@
|
||||
sed -e 's|@version@|$(PCVERSION)|g' -e 's|@libdir@|$(ABS_LIBDIR)|g' $< > $@
|
||||
|
||||
#
|
||||
# Install
|
||||
@@ -255,17 +260,16 @@ $(PKGCONFIG): $(LIB_NAME).pc.in Makefile
|
||||
|
||||
INSTALL = install
|
||||
INSTALL_DIRS = $(INSTALL) -d
|
||||
INSTALL_LIBS = $(INSTALL) -m 755
|
||||
INSTALL_FILES = $(INSTALL) -m 644
|
||||
|
||||
INSTALL_LIB_DIR = $(DESTDIR)/usr/lib
|
||||
INSTALL_PLUGIN_DIR = $(DESTDIR)/usr/lib/ofono/plugins
|
||||
INSTALL_INCLUDE_DIR = $(DESTDIR)/usr/include/$(NAME)
|
||||
INSTALL_PKGCONFIG_DIR = $(DESTDIR)/usr/lib/pkgconfig
|
||||
INSTALL_LIB_DIR = $(DESTDIR)$(ABS_LIBDIR)
|
||||
INSTALL_PKGCONFIG_DIR = $(DESTDIR)$(ABS_LIBDIR)/pkgconfig
|
||||
|
||||
install: $(INSTALL_LIB_DIR) $(INSTALL_PLUGIN_DIR)
|
||||
$(INSTALL_LIBS) $(RELEASE_PLUGIN) $(INSTALL_PLUGIN_DIR)
|
||||
$(INSTALL_LIBS) $(RELEASE_LIB) $(INSTALL_LIB_DIR)
|
||||
$(INSTALL_FILES) $(RELEASE_PLUGIN) $(INSTALL_PLUGIN_DIR)
|
||||
$(INSTALL_FILES) $(RELEASE_LIB) $(INSTALL_LIB_DIR)
|
||||
ln -sf $(LIB_SO) $(INSTALL_LIB_DIR)/$(LIB_SYMLINK2)
|
||||
ln -sf $(LIB_SYMLINK2) $(INSTALL_LIB_DIR)/$(LIB_SYMLINK1)
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
name=grilio-binder
|
||||
libdir=/usr/lib
|
||||
libdir=@libdir@
|
||||
includedir=/usr/include
|
||||
|
||||
Name: libgrilio-binder
|
||||
Description: Binder based transport for libgrilio
|
||||
Version: [version]
|
||||
Version: @version@
|
||||
Requires.private: glib-2.0 libgrilio libglibutil libgbinder-radio libgbinder
|
||||
Libs: -L${libdir} -l${name}
|
||||
Cflags: -I${includedir} -I${includedir}/${name}
|
||||
|
||||
@@ -18,7 +18,7 @@ Requires: libgrilio >= %{libgrilio_version}
|
||||
BuildRequires: ofono-devel >= %{ofono_version}
|
||||
BuildRequires: pkgconfig(libgrilio) >= %{libgrilio_version}
|
||||
|
||||
%define plugin_dir %{_libdir}/ofono/plugins
|
||||
%define plugin_dir /usr/lib/ofono/plugins
|
||||
|
||||
%description
|
||||
This package contains ofono plugin which implements binder transport for RIL
|
||||
@@ -27,11 +27,11 @@ This package contains ofono plugin which implements binder transport for RIL
|
||||
%setup -q -n %{name}-%{version}
|
||||
|
||||
%build
|
||||
make %{_smp_mflags} KEEP_SYMBOLS=1 release pkgconfig
|
||||
make %{_smp_mflags} LIBDIR=%{_libdir} KEEP_SYMBOLS=1 release pkgconfig
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
make install-dev DESTDIR=%{buildroot}
|
||||
make LIBDIR=%{_libdir} DESTDIR=%{buildroot} install-dev
|
||||
|
||||
mkdir -p %{buildroot}/%{plugin_dir}
|
||||
%preun
|
||||
|
||||
Reference in New Issue
Block a user