summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2013-01-30 07:18:35 -0800
committerJunfeng Dong <junfeng.dong@intel.com>2013-04-11 14:32:06 +0800
commitd190877fddbf4121780d43d6873a9a319462d0f9 (patch)
treeaa57cedbb8b56489db0e988bedd23753c939507c
parent00baac1a159a3a81b6b03611451c7f7f2dda4483 (diff)
downloadserial-d190877fddbf4121780d43d6873a9a319462d0f9.tar.gz
serial-d190877fddbf4121780d43d6873a9a319462d0f9.tar.bz2
serial-d190877fddbf4121780d43d6873a9a319462d0f9.zip
- Adapt makefile for lib64 - Cleanup up spec file a little bit - Make deprecated glib calls depend on version being used Change-Id: Ic31fefe778900f14d2974bfb94655fc473488111
-rw-r--r--CMakeLists.txt4
-rw-r--r--capi-network-serial.pc.in2
-rw-r--r--packaging/capi-network-serial.spec9
-rw-r--r--src/serial.c5
4 files changed, 9 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 77e9f04..84e97fe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,7 +42,7 @@ SET_TARGET_PROPERTIES(${fw_name}
CLEAN_DIRECT_OUTPUT 1
)
-INSTALL(TARGETS ${fw_name} DESTINATION lib)
+INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR})
INSTALL(
DIRECTORY ${INC_DIR}/ DESTINATION include/network
FILES_MATCHING
@@ -59,5 +59,5 @@ CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc
@ONLY
)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION lib/pkgconfig)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
diff --git a/capi-network-serial.pc.in b/capi-network-serial.pc.in
index 127da21..ed4d1f3 100644
--- a/capi-network-serial.pc.in
+++ b/capi-network-serial.pc.in
@@ -2,7 +2,7 @@
prefix=@PREFIX@
exec_prefix=/usr
-libdir=/usr/lib
+libdir=@LIB_INSTALL_DIR@
includedir=/usr/include/network
Name: @PC_NAME@
diff --git a/packaging/capi-network-serial.spec b/packaging/capi-network-serial.spec
index 6fa4dd5..f054fea 100644
--- a/packaging/capi-network-serial.spec
+++ b/packaging/capi-network-serial.spec
@@ -2,11 +2,9 @@ Name: capi-network-serial
Summary: Network Serial Framework
Version: 0.0.7
Release: 0
-Group: TO_BE/FILLED_IN
+Group: API
License: Apache License, Version 2.0
Source0: %{name}-%{version}.tar.gz
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(dlog)
@@ -21,7 +19,7 @@ Network Serial Framework
%package devel
Summary: Network Serial Framework (DEV)
-Group: TO_BE/FILLED
+Group: API
Requires: %{name} = %{version}-%{release}
%description devel
@@ -32,12 +30,11 @@ Network Serial Framework (DEV).
%build
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
make %{?jobs:-j%jobs}
%install
-rm -rf %{buildroot}
%make_install
diff --git a/src/serial.c b/src/serial.c
index b30d4e3..238757f 100644
--- a/src/serial.c
+++ b/src/serial.c
@@ -264,8 +264,9 @@ int serial_create(serial_h *serial)
pHandle = (serial_s *)g_try_malloc0(sizeof(serial_s));
if (pHandle == NULL)
return SERIAL_ERROR_OUT_OF_MEMORY;
-
- g_type_init();
+#if !GLIB_CHECK_VERSION (2, 35, 3)
+ g_type_init ();
+#endif
pHandle->client_bus = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error);
if (error) {