sync with master, change mkfs path
authorjunsuk77.oh <junsuk77.oh@samsung.com>
Fri, 29 Mar 2013 09:47:00 +0000 (18:47 +0900)
committerjunsuk77.oh <junsuk77.oh@samsung.com>
Fri, 29 Mar 2013 09:47:27 +0000 (18:47 +0900)
Change-Id: I15c682a0f2ccacfce4eeeec81b52a31822e5471b
Signed-off-by: junsuk77.oh <junsuk77.oh@samsung.com>
CMakeLists.txt
app2sd.manifest.in [new file with mode: 0755]
app2sd.pc.in
packaging/app2sd.spec
plugin/app2sd/CMakeLists.txt
plugin/app2sd/src/app2sd_internals.c
src/app2ext_interface.c

index ed20cfa..c3485d5 100755 (executable)
@@ -32,9 +32,11 @@ SET(app2ext_inc_dir "${app2ext_dir}/inc")
 SET(app2ext_src_dir "${app2ext_dir}/src")
 SET(APP2EXT "app2ext")
 SET(libapp2ext_SOURCES ${app2ext_src_dir}/app2ext_interface.c)
-SET(libapp2ext_LDFLAGS " -L/usr/lib -module -avoid-version -ldl ")
+SET(libapp2ext_LDFLAGS " -L${LIB_INSTALL_DIR} -module -avoid-version -ldl ")
 SET(libapp2ext_CFLAGS  " ${CFLAGS} -fPIC -I${app2ext_inc_dir} ")
 
+ADD_DEFINITIONS("-DLIBPREFIX=\"${LIB_INSTALL_DIR}\"")
+
 ADD_LIBRARY(${APP2EXT} SHARED ${libapp2ext_SOURCES})
 SET_TARGET_PROPERTIES(${APP2EXT} PROPERTIES SOVERSION ${VERSION_MAJOR})
 SET_TARGET_PROPERTIES(${APP2EXT} PROPERTIES VERSION ${VERSION})
@@ -44,10 +46,11 @@ TARGET_LINK_LIBRARIES(${APP2EXT} ${libpkgs_LDFLAGS})
 SET(CMAKE_INSTALL_PREFIX "/usr")
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
+CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/app2sd.manifest.in ${CMAKE_BINARY_DIR}/app2sd.manifest @ONLY)
 
 CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/app2sd.pc.in ${CMAKE_BINARY_DIR}/app2sd.pc @ONLY)
 
-INSTALL(TARGETS ${APP2EXT} DESTINATION lib COMPONENT RuntimeLibraries)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/app2sd.pc DESTINATION lib/pkgconfig)
+INSTALL(TARGETS ${APP2EXT} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/app2sd.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/inc/app2ext_interface.h DESTINATION include)
 
diff --git a/app2sd.manifest.in b/app2sd.manifest.in
new file mode 100755 (executable)
index 0000000..85d9892
--- /dev/null
@@ -0,0 +1,15 @@
+<manifest>
+       <define>
+               <domain name="app2sd"/>
+       </define>
+       <request>
+               <domain name="app2sd"/>
+       </request>
+       <assign>
+               <filesystem path="@LIB_INSTALL_DIR@/libapp2ext.so.0" label="_"/>
+               <filesystem path="@LIB_INSTALL_DIR@/libapp2ext.so.0.4.2" label="_"/>
+               <filesystem path="@LIB_INSTALL_DIR@/libapp2sd.so" label="_"/>
+               <filesystem path="@LIB_INSTALL_DIR@/libapp2sd.so.0" label="_"/>
+               <filesystem path="@LIB_INSTALL_DIR@/libapp2sd.so.0.4.2" label="_"/>
+       </assign>
+</manifest>
index bc90238..d2e6ce8 100755 (executable)
@@ -1,8 +1,8 @@
 # Package information for app2sd
 prefix=/usr
 exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
-includedir=${prefix}/include
+libdir=@LIB_INSTALL_DIR@
+includedir=@INCLUDE_INSTALL_DIR@
 
 Name: app2sd
 Description: The app2sd Library
index 51eb4d4..e096e54 100755 (executable)
@@ -2,12 +2,10 @@ Name:       app2sd
 Summary:    Application installation on external memory
 Version:    0.5
 Release:    9
-Group:      TO_BE/FILLED_IN
-License:    Apache2.0
+Group:      Application Framework/Application Installer
+License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
 
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
 BuildRequires:  pkgconfig(libssl)
 BuildRequires:  pkgconfig(vconf)
 BuildRequires:  pkgconfig(dlog)
@@ -30,7 +28,7 @@ Tizen application installation on external memory (devel)
 %setup -q
 
 %build
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+%cmake .
 
 make %{?jobs:-j%jobs}
 
index ceff836..8533b08 100755 (executable)
@@ -26,7 +26,7 @@ SET(app2sd_inc_dir "${app2sd_dir}/inc")
 SET(app2sd_src_dir "${app2sd_dir}/src")
 SET(APP2SD "app2sd")
 SET(libapp2sd_SOURCES ${app2sd_src_dir}/app2sd_internals.c ${app2sd_src_dir}/app2sd_interface.c ${app2sd_src_dir}/app2sd_internals_registry.c ${app2sd_src_dir}/app2sd_internals_utils.c)
-SET(libapp2sd_LDFLAGS " -L/usr/lib -lcrypto -module -avoid-version ")
+SET(libapp2sd_LDFLAGS " -L${LIB_INSTALL_DIR} -lcrypto -module -avoid-version ")
 SET(libapp2sd_CFLAGS  " ${CFLAGS} -fPIC -I${app2sd_inc_dir} ")
 
 ADD_LIBRARY(${APP2SD} SHARED ${libapp2sd_SOURCES})
@@ -39,6 +39,6 @@ SET(CMAKE_INSTALL_PREFIX "/usr")
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
 
-INSTALL(TARGETS ${APP2SD} DESTINATION lib COMPONENT RuntimeLibraries)
+INSTALL(TARGETS ${APP2SD} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
 
 
index e3942ea..d2649a7 100755 (executable)
@@ -370,7 +370,7 @@ int _app2sd_create_file_system(const char *device_path)
        }
 
        /*Format the filesystem [create a filesystem]*/
-       const char *argv[] = { "mkfs.ext4", device_path, NULL };
+       const char *argv[] = { "/sbin/mkfs.ext4", device_path, NULL };
        fp = fopen(device_path, "r+");
        if (fp == NULL) {
                app2ext_print
index 1fd62c6..673d7ee 100755 (executable)
@@ -28,7 +28,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-#define APP2EXT_SD_PLUGIN_PATH "/usr/lib/libapp2sd.so"
+#define APP2EXT_SD_PLUGIN_PATH LIBPREFIX "/libapp2sd.so"
 
 app2ext_handle *app2ext_init(int storage_type)
 {