CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(ug-setting-bluetooth-efl C)
+PROJECT(ug-bluetooth-efl C)
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-SET(EXEC_PREFIX "\${prefix}")
-SET(LIBDIR "\${prefix}/lib")
-SET(INCLUDEDIR "\${prefix}/include")
+SET(PKG_NAME ug-bluetooth-efl)
+SET(APP_ROOT_DIR /usr/apps/${PKG_NAME})
+SET(LIB_DIR ${APP_ROOT_DIR}/lib/ug)
+SET(DATA_DIR ${APP_ROOT_DIR}/shared/trusted)
+SET(RES_DIR ${APP_ROOT_DIR}/res)
+SET(EXEC_DIR ${APP_ROOT_DIR}/bin)
SET(VERSION 0.1.0)
-SET(RESDIR "${PREFIX}/res")
-SET(LOCALEDIR "${RESDIR}/locale")
-SET(EDJDIR "${RESDIR}/edje/${PROJECT_NAME}")
-SET(IMAGEDIR "${RESDIR}/images/${PROJECT_NAME}")
-SET(HELPDIR "${RESDIR}/help/${PROJECT_NAME}")
-SET(TABLEDIR "${RESDIR}/tables/${PROJECT_NAME}")
+SET(LOCALEDIR ${APP_ROOT_DIR}/shared/res/locale/)
+SET(EDJDIR ${RES_DIR}/edje/)
+SET(IMAGEDIR ${RES_DIR}/images/)
+SET(HELPDIR ${RES_DIR}/help/)
+SET(TABLEDIR ${RES_DIR}/tables/)
SET(SRCS
src/ui/bt-main-ug.c
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION 0.1.0)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/ug/lib)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_DIR})
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/images/ug-bluetooth-efl.png DESTINATION ${IMAGEDIR})
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/images/ DESTINATION ${IMAGEDIR} FILES_MATCHING PATTERN "*.png")
ADD_SUBDIRECTORY(po)
-ADD_SUBDIRECTORY(data)
\ No newline at end of file
+ADD_SUBDIRECTORY(data)
%define _optdir /opt
%define _usrdir /usr
-%define _ugdir %{_usrdir}/ug
+%define _appdir %{_usrdir}/apps/ug-bluetooth-efl/
+%define _helpfile help_settings_bluetooth.xml
+%define _bindir %{_appdir}/bin/
Name: ug-bluetooth-efl
Summary: UI gadget about the bluetooth
%endif
export LDFLAGS
-cmake . -DCMAKE_INSTALL_PREFIX=%{_ugdir}
+cmake . -DCMAKE_INSTALL_PREFIX=%{_appdir}
make %{?jobs:-j%jobs}
%post
-mkdir -p /usr/ug/bin/
-ln -sf /usr/bin/ug-client /usr/ug/bin/setting-bluetooth-efl
-ln -sf /usr/bin/ug-client /usr/ug/bin/setting-bluetooth-efl-single
+mkdir -p %{_bindir}
+
+ln -sf /usr/apps/ug-bluetooth-efl/bin/ug-bluetooth-efl /usr/apps/ug-bluetooth-efl/bin/ug-bluetooth-efl-single
+ln -sf /usr/apps/ug-bluetooth-efl/lib/ug/libug-bluetooth-efl.so.0.1.0 /usr/apps/ug-bluetooth-efl/lib/ug/libug-bluetooth-efl-single.so
+#ln -sf /usr/bin/ug-client /usr/ug/bin/setting-bluetooth-efl
+#ln -sf /usr/bin/ug-client /usr/ug/bin/setting-bluetooth-efl-single
%install
rm -rf %{buildroot}
%files
%manifest ug-bluetooth-efl.manifest
%defattr(-,root,root,-)
-%{_ugdir}/res/help/*
-%{_ugdir}/res/edje/ug-setting-bluetooth-efl/*.edj
-%{_ugdir}/res/locale/*/LC_MESSAGES/*
-%{_ugdir}/res/images/ug-setting-bluetooth-efl/*
-%{_ugdir}/lib/libug-setting-bluetooth-efl.so.0.1.0
-%{_ugdir}/lib/libug-setting-bluetooth-efl.so
+%{_appdir}/res/edje/*.edj
+%{_appdir}/shared/res/locale/*/LC_MESSAGES/ug-bluetooth-efl.mo
+%{_appdir}/res/images/*
+%{_appdir}/res/help/*
+%{_appdir}/lib/ug/libug-bluetooth-efl.so.0.1.0
+%{_appdir}/lib/ug/libug-bluetooth-efl.so
%ifarch i586
%exclude %{_usrdir}/share/packages/ug-bluetooth-efl.xml
%else
%endif
%{_usrdir}/share/icons/default/small/ug-bluetooth-efl.png
%{_datadir}/license/ug-bluetooth-efl
-%{_ugdir}/res/tables/ug-setting-bluetooth-efl/ug-bluetooth-efl_ChangeableColorTable.xml
-%{_ugdir}/res/tables/ug-setting-bluetooth-efl/ug-bluetooth-efl_FontInfoTable.xml
+%{_appdir}/res/tables/ug-bluetooth-efl_ChangeableColorTable.xml
+%{_appdir}/res/tables/ug-bluetooth-efl_FontInfoTable.xml