Make plugin rpm package seperately 28/109928/2
authorSangyoon Jang <s89.jang@samsung.com>
Thu, 12 Jan 2017 08:03:43 +0000 (17:03 +0900)
committerjongmyeong ko <jongmyeong.ko@samsung.com>
Mon, 16 Jan 2017 05:57:51 +0000 (21:57 -0800)
To removing profile build dependency, make plugin rpm package seperately.
(Need to create JIRA-TRE issue to including rpm package)

Change-Id: I2c87ed9e105446751bb2d4e79af39700b0d6fca1
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
CMakeLists.txt
packaging/app2sd.spec

index 56cfec8..a37eeca 100644 (file)
@@ -9,14 +9,6 @@ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -g -Wall -Werror")
 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
 
 INCLUDE(FindPkgConfig)
-
-IF(TIZEN_FEATURE_APP2SD_PLUGIN)
-       ADD_DEFINITIONS("-DTIZEN_FEATURE_APP2SD_PLUGIN")
-       ADD_DEFINITIONS("-DTIZEN_FEATURE_APP2SD_DMCRYPT_ENCRYPTION")
-       ADD_SUBDIRECTORY(plugin/app2sd)
-ENDIF(TIZEN_FEATURE_APP2SD_PLUGIN)
-
-# app2ext library
 pkg_check_modules(app2ext_libpkgs REQUIRED dlog glib-2.0)
 
 FOREACH(flag ${app2ext_libpkgs_CFLAGS})
@@ -25,6 +17,7 @@ ENDFOREACH(flag)
 SET(CMAKE_C_FLAGS "${EXTRA_CFLAGS} ${APP2EXT_CFLAGS}")
 
 ADD_DEFINITIONS("-DLIBPREFIX=\"${LIB_INSTALL_DIR}\"")
+ADD_DEFINITIONS("-DTIZEN_FEATURE_APP2SD_DMCRYPT_ENCRYPTION")
 
 # Local include directories
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/inc)
@@ -46,6 +39,5 @@ INSTALL(TARGETS ${APP2EXT} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibra
 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/app2sd.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
 INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION include)
 
-IF(TIZEN_FEATURE_APP2SD_PLUGIN)
+ADD_SUBDIRECTORY(plugin/app2sd)
 ADD_SUBDIRECTORY(test)
-ENDIF(TIZEN_FEATURE_APP2SD_PLUGIN)
index f6cb960..bff536d 100644 (file)
@@ -19,18 +19,6 @@ BuildRequires:  pkgconfig(storage)
 BuildRequires:  pkgconfig(pkgmgr)
 BuildRequires:  cmake
 
-%if "%{?profile}" == "common"
-%define tizen_feature_app2sd_plugin 1
-%endif
-
-%if "%{?profile}" == "mobile"
-%define tizen_feature_app2sd_plugin 1
-%endif
-
-%if "%{?profile}" == "tv"
-%define tizen_feature_app2sd_plugin 1
-%endif
-
 %description
 Tizen application installation on external memory
 
@@ -50,18 +38,18 @@ Requires:   app2sd = %{version}-%{release}
 %description test
 Tizen application installation on external memory (test)
 
+%package plugin
+Summary:    app2sd server and plugin library
+Group:      Application Framework/Package Management
+
+%description plugin
+app2sd server and plugin library
+
 %prep
 %setup -q
 
 %build
-%if 0%{?tizen_feature_app2sd_plugin}
-_APP2SD_PLUGIN=ON
-%else
-_APP2SD_PLUGIN=OFF
-%endif
-
-%cmake . -DUNITDIR=%{_unitdir} \
-    -DTIZEN_FEATURE_APP2SD_PLUGIN:BOOL=${_APP2SD_PLUGIN}
+%cmake . -DUNITDIR=%{_unitdir}
 
 make %{?jobs:-j%jobs}
 
@@ -77,29 +65,24 @@ cp LICENSE %{buildroot}/usr/share/license/%{name}
 %postun -p /sbin/ldconfig
 
 %files
-%manifest app2sd.manifest
+%manifest %{name}.manifest
 %defattr(-,root,root,-)
 %{_libdir}/libapp2ext.so.*
-%if 0%{?tizen_feature_app2sd_plugin}
-%{_libdir}/libapp2sd.so*
-%{_bindir}/app2sd-server
-%{_unitdir}/app2sd-server.service
-%{_datadir}/dbus-1/system-services/org.tizen.app2sd.service
-%config %{_sysconfdir}/dbus-1/system.d/org.tizen.app2sd.conf
-%endif
 /usr/share/license/%{name}
 
 %files devel
 %defattr(-,root,root,-)
 %{_includedir}/*.h
 %{_libdir}/pkgconfig/app2sd.pc
-%if 0%{?tizen_feature_app2sd_plugin}
-%{_libdir}/libapp2sd.so
-%endif
 %{_libdir}/libapp2ext.so
 
-%if 0%{?tizen_feature_app2sd_plugin}
 %files test
 %defattr(-,root,root,-)
 %{_bindir}/test_app2ext
-%endif
+
+%files plugin
+%{_libdir}/libapp2sd.so*
+%{_bindir}/app2sd-server
+%{_unitdir}/app2sd-server.service
+%{_datadir}/dbus-1/system-services/org.tizen.app2sd.service
+%config %{_sysconfdir}/dbus-1/system.d/org.tizen.app2sd.conf