diff options
author | Youngjae Shin <yj99.shin@samsung.com> | 2016-01-11 17:09:00 +0900 |
---|---|---|
committer | Youngjae Shin <yj99.shin@samsung.com> | 2016-01-13 17:29:37 +0900 |
commit | 5b940ae0ae8049fdb40d20c976f23abf83c25873 (patch) | |
tree | 1ee2b81f214acf24987a6b2816faae1502b2aa08 | |
parent | dca4a4d8b2fca30b4f379a35e879c685cf9f4f20 (diff) | |
download | iotcon-5b940ae0ae8049fdb40d20c976f23abf83c25873.tar.gz iotcon-5b940ae0ae8049fdb40d20c976f23abf83c25873.tar.bz2 iotcon-5b940ae0ae8049fdb40d20c976f23abf83c25873.zip |
revise packaging
Change-Id: I41d7ee4ff9b939c0ba29864061ec5157cf5fceaa
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | packaging/iotcon.spec | 10 |
2 files changed, 12 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6da4da0..7a67b9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,12 +8,14 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") SET(CLIENT ${PROJECT_NAME}) SET(DAEMON "${PROJECT_NAME}-daemon") -SET(DBUS_INTERFACE "org.tizen.${PROJECT_NAME}.dbus") + +IF(NOT DEFINED DBUS_INTERFACE) + MESSAGE("No DBUS_INTERFACE. Check build system") + SET(DBUS_INTERFACE "org.tizen.${PROJECT_NAME}.dbus") +ENDIF(NOT DEFINED DBUS_INTERFACE) IF(TZ_VER_3) ADD_DEFINITIONS("-DTZ_VER_3") - CONFIGURE_FILE(${PROJECT_NAME}.conf.in ${PROJECT_NAME}.conf @ONLY) - INSTALL(FILES ${PROJECT_NAME}.conf DESTINATION ${SYSCONF_INSTALL_DIR}/dbus-1/system.d/) ENDIF(TZ_VER_3) ADD_SUBDIRECTORY(common) diff --git a/packaging/iotcon.spec b/packaging/iotcon.spec index dd943f9..abf7a6a 100644 --- a/packaging/iotcon.spec +++ b/packaging/iotcon.spec @@ -9,7 +9,7 @@ Source1: %{name}.service Source1001: %{name}.manifest Source1002: %{name}-old.manifest Source1003: %{name}-test-old.manifest -Source2001: %{name}.conf.in +Source1004: %{name}.conf.in BuildRequires: cmake BuildRequires: boost-devel BuildRequires: pkgconfig(glib-2.0) @@ -28,6 +28,7 @@ BuildRequires: python-xml %endif %define _unitdir /usr/lib/systemd/system +%define _dbus_interface org.tizen.iotcon.dbus %description Tizen IoT Connectivity Service & Library(Client) based on Iotivity @@ -60,7 +61,6 @@ cp %{SOURCE1003} ./%{name}-test.manifest %else cp %{SOURCE1001} ./%{name}.manifest cp %{SOURCE1001} ./%{name}-test.manifest -cp %{SOURCE2001} . %endif @@ -73,7 +73,7 @@ TZ_VER_3=1 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` %cmake . -DMAJORVER=${MAJORVER} -DFULLVER=%{version} -DBIN_INSTALL_DIR:PATH=%{_bindir} \ - -DTZ_VER_3=${TZ_VER_3} + -DTZ_VER_3=${TZ_VER_3} -DDBUS_INTERFACE=%{_dbus_interface} %install @@ -88,6 +88,10 @@ ln -s ../%{name}.service %{buildroot}%{_unitdir}/multi-user.target.wants/%{name} mkdir -p %{buildroot}/%{_datadir}/license cp LICENSE.APLv2 %{buildroot}/%{_datadir}/license/%{name} cp LICENSE.APLv2 %{buildroot}/%{_datadir}/license/%{name}-test +%else +sed -i 's/@DBUS_INTERFACE@/%{_dbus_interface}/g' %{SOURCE1004} +mkdir -p %{buildroot}/%{_sysconfdir}/dbus-1/system.d +cp -af %{SOURCE1004} %{buildroot}%{_sysconfdir}/dbus-1/system.d/%{name}.conf %endif |