CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-SET(fw_name "capi-appfw-application")
-
-PROJECT(${fw_name})
-
-SET(CMAKE_INSTALL_PREFIX /usr)
-SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(INC_DIR include)
-INCLUDE_DIRECTORIES(${INC_DIR})
-
-SET(requires "dlog bundle appcore-common appcore-efl aul appsvc elementary capi-base-common sqlite3 libtzplatform-config pkgmgr-info glib-2.0")
-SET(pc_requires "capi-base-common vconf-internal-keys capi-appfw-app-control capi-appfw-app-common capi-appfw-preference capi-appfw-event appcore-common libtzplatform-config")
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(${fw_name} REQUIRED ${requires})
-FOREACH(flag ${${fw_name}_CFLAGS})
- SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag} -Werror")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC ")
-SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -Wall -Werror")
-
-IF("${ARCH}" STREQUAL "arm")
- ADD_DEFINITIONS("-DTARGET")
-ENDIF("${ARCH}" STREQUAL "arm")
-
-ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
-ADD_DEFINITIONS("-DSLP_DEBUG")
-
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}")
-
-aux_source_directory(src SOURCES)
-ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
ADD_SUBDIRECTORY(app_control)
ADD_SUBDIRECTORY(app_common)
ADD_SUBDIRECTORY(preference)
ADD_SUBDIRECTORY(event)
+ADD_SUBDIRECTORY(src)
-TARGET_LINK_LIBRARIES(${fw_name} capi-appfw-app-control capi-appfw-app-common capi-appfw-preference capi-appfw-event ${${fw_name}_LDFLAGS})
-
-SET_TARGET_PROPERTIES(${fw_name}
- PROPERTIES
- VERSION ${FULLVER}
- SOVERSION ${MAJORVER}
- CLEAN_DIRECT_OUTPUT 1
-)
-
-INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR})
INSTALL(
DIRECTORY ${INC_DIR}/ DESTINATION include/appfw
FILES_MATCHING
PATTERN "${INC_DIR}/*.h"
)
-SET(PC_NAME ${fw_name})
-SET(PC_REQUIRED ${pc_requires})
-SET(PC_LDFLAGS -l${fw_name})
-
-CONFIGURE_FILE(
- capi-appfw-module.pc.in
- ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc
- @ONLY
-)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
-
IF(UNIX)
ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution)
%description
An Application library in SLP C API package.
+%package -n capi-appfw-app-control
+Summary: An Application Control library in Tizen C API
+Group: System/API
+
+%description -n capi-appfw-app-control
+An Application Control library in Tizen C API package.
+
+%package -n capi-appfw-app-common
+Summary: An Application Common library in Tizen C API
+Group: System/API
+
+%description -n capi-appfw-app-common
+An Application Common library in Tizen C API package.
+
+%package -n capi-appfw-preference
+Summary: An Application Preference library in Tizen C API
+Group: System/API
+
+%description -n capi-appfw-preference
+An Application Preference library in Tizen C API package.
+
+%package -n capi-appfw-event
+Summary: An Application Event library in Tizen C API
+Group: System/API
+
+%description -n capi-appfw-event
+An Application Event library in Tizen C API package.
+
%package devel
Summary: An Application library in SLP C API (Development)
Group: System/API
%description devel
An Application library in SLP C API (Development) package.
+%package -n capi-appfw-app-control-devel
+Summary: An Application Control library in Tizen C API (Development)
+Group: System/API
+Requires: capi-appfw-app-control = %{version}-%{release}
+
+%description -n capi-appfw-app-control-devel
+An Application Control library in Tizen C API (Development) package.
+
+%package -n capi-appfw-app-common-devel
+Summary: An Application Common library in Tizen C API (Development)
+Group: System/API
+Requires: capi-appfw-app-common = %{version}-%{release}
+
+%description -n capi-appfw-app-common-devel
+An Application Common library in Tizen C API (Development) package.
+
+%package -n capi-appfw-preference-devel
+Summary: An Application Preference library in Tizen C API (Development)
+Group: System/API
+Requires: capi-appfw-preference = %{version}-%{release}
+
+%description -n capi-appfw-preference-devel
+An Application Preference library in Tizen C API (Development) package.
+
+%package -n capi-appfw-event-devel
+Summary: An Application Event library in Tizen C API (Development)
+Group: System/API
+Requires: capi-appfw-event = %{version}-%{release}
+
+%description -n capi-appfw-event-devel
+An Application Event library in Tizen C API (Development) package.
+
+
%prep
%setup -q
cp %{SOURCE1001} .
cp LICENSE %{buildroot}%{_datadir}/license/%{name}
%post -p /sbin/ldconfig
-
%postun -p /sbin/ldconfig
+%post -n capi-appfw-app-control -p /sbin/ldconfig
+%postun -n capi-appfw-app-control -p /sbin/ldconfig
+
+%post -n capi-appfw-app-common -p /sbin/ldconfig
+%postun -n capi-appfw-app-common -p /sbin/ldconfig
+
+%post -n capi-appfw-preference -p /sbin/ldconfig
+%postun -n capi-appfw-preference -p /sbin/ldconfig
+
+%post -n capi-appfw-event -p /sbin/ldconfig
+%postun -n capi-appfw-event -p /sbin/ldconfig
+
%files
%manifest %{name}.manifest
%{_libdir}/libcapi-appfw-application.so.*
+%{_datadir}/license/%{name}
+
+%files -n capi-appfw-app-control
+%manifest %{name}.manifest
%{_libdir}/libcapi-appfw-app-control.so.*
+%{_datadir}/license/%{name}
+
+%files -n capi-appfw-app-common
+%manifest %{name}.manifest
%{_libdir}/libcapi-appfw-app-common.so.*
+%{_datadir}/license/%{name}
+
+%files -n capi-appfw-preference
+%manifest %{name}.manifest
%{_libdir}/libcapi-appfw-preference.so.*
-%{_libdir}/libcapi-appfw-event.so.*
+%{_datadir}/license/%{name}
+%files -n capi-appfw-event
+%manifest %{name}.manifest
+%{_libdir}/libcapi-appfw-event.so.*
%{_datadir}/license/%{name}
%files devel
%manifest %{name}.manifest
-%{_includedir}/appfw/*.h
-%{_libdir}/pkgconfig/*.pc
+%{_includedir}/appfw/app.h
+%{_includedir}/appfw/app_internal.h
+%{_includedir}/appfw/app_extension.h
+%{_includedir}/appfw/app_resource_manager.h
+%{_includedir}/appfw/app_i18n.h
+%{_libdir}/pkgconfig/capi-appfw-application.pc
%{_libdir}/libcapi-appfw-application.so
+
+%files -n capi-appfw-app-control-devel
+%manifest %{name}.manifest
+%{_includedir}/appfw/app_control.h
+%{_includedir}/appfw/app_control_internal.h
+%{_libdir}/pkgconfig/capi-appfw-app-control.pc
%{_libdir}/libcapi-appfw-app-control.so
+
+%files -n capi-appfw-app-common-devel
+%manifest %{name}.manifest
+%{_includedir}/appfw/app_common.h
+%{_includedir}/appfw/app_types.h
+%{_libdir}/pkgconfig/capi-appfw-app-common.pc
%{_libdir}/libcapi-appfw-app-common.so
+
+%files -n capi-appfw-preference-devel
+%manifest %{name}.manifest
+%{_includedir}/appfw/app_preference.h
+%{_includedir}/appfw/app_preference_internal.h
+%{_includedir}/appfw/app_preference_log.h
+%{_libdir}/pkgconfig/capi-appfw-preference.pc
%{_libdir}/libcapi-appfw-preference.so
-%{_libdir}/libcapi-appfw-event.so
+%files -n capi-appfw-event-devel
+%manifest %{name}.manifest
+%{_includedir}/appfw/app_event.h
+%{_libdir}/pkgconfig/capi-appfw-event.pc
+%{_libdir}/libcapi-appfw-event.so
--- /dev/null
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+SET(fw_name "capi-appfw-application")
+
+PROJECT(${fw_name})
+
+SET(CMAKE_INSTALL_PREFIX /usr)
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+
+SET(INC_DIR ${CMAKE_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES(${INC_DIR})
+
+SET(requires "dlog bundle appcore-common appcore-efl aul appsvc elementary capi-base-common sqlite3 libtzplatform-config pkgmgr-info glib-2.0")
+SET(pc_requires "capi-base-common vconf-internal-keys capi-appfw-app-control capi-appfw-app-common appcore-common libtzplatform-config")
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(${fw_name} REQUIRED ${requires})
+FOREACH(flag ${${fw_name}_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag} -Werror")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC ")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -Wall -Werror")
+
+IF("${ARCH}" STREQUAL "arm")
+ ADD_DEFINITIONS("-DTARGET")
+ENDIF("${ARCH}" STREQUAL "arm")
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DSLP_DEBUG")
+
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}")
+
+ADD_LIBRARY(${fw_name} SHARED
+ app_device.c
+ app_main.c
+ app_resource.c
+ app_resource_manager.c
+ i18n.c
+ )
+
+TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS})
+
+SET_TARGET_PROPERTIES(${fw_name}
+ PROPERTIES
+ VERSION ${FULLVER}
+ SOVERSION ${MAJORVER}
+ CLEAN_DIRECT_OUTPUT 1
+)
+
+INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR})
+INSTALL(
+ DIRECTORY ${INC_DIR}/ DESTINATION include/appfw
+ FILES_MATCHING
+ PATTERN "*_private.h" EXCLUDE
+ PATTERN "${INC_DIR}/*.h"
+ )
+
+SET(PC_NAME ${fw_name})
+SET(PC_REQUIRED ${pc_requires})
+SET(PC_LDFLAGS -l${fw_name})
+
+CONFIGURE_FILE(
+ ${CMAKE_SOURCE_DIR}/capi-appfw-module.pc.in
+ ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc
+ @ONLY
+)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)