SET(INC_DIR include)
INCLUDE_DIRECTORIES(${INC_DIR})
-SET(dependents "dlog pmapi vconf")
+SET(dependents "dlog pmapi vconf capi-base-common")
+SET(pc_dependents "capi-base-common")
INCLUDE(FindPkgConfig)
pkg_check_modules(${fw_name} REQUIRED ${dependents})
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(
DIRECTORY ${INC_DIR}/ DESTINATION include/system
)
SET(PC_NAME ${fw_name})
-SET(PC_REQUIRED ${dependents})
+SET(PC_REQUIRED ${pc_dependents})
SET(PC_LDFLAGS -l${fw_name})
-SET(PC_CFLAGS -I\${includedir}/system)
CONFIGURE_FILE(
${fw_name}.pc.in
Version: @VERSION@
Requires: @PC_REQUIRED@
Libs: -L${libdir} @PC_LDFLAGS@
-Cflags: -I${includedir} @PC_CFLAGS@
+Cflags: -I${includedir}
Package: capi-system-power
Architecture: any
-Depends: ${shilbs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
Description: A power library in Tizen Native API
Package: capi-system-power-dev
#!/usr/bin/make -f
+FULLVER ?= $(shell dpkg-parsechangelog | grep Version: | cut -d ' ' -f 2 | cut -d '-' -f 1)
+MAJORVER ?= $(shell echo $(FULLVER) | cut -d '.' -f 1)
+
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
configure: configure-stamp
configure-stamp:
dh_testdir
- mkdir -p $(CMAKE_BUILD_DIR) && cd $(CMAKE_BUILD_DIR) && cmake ..
+ mkdir -p $(CMAKE_BUILD_DIR) && cd $(CMAKE_BUILD_DIR) && cmake .. -DFULLVER=${FULLVER} -DMAJORVER=${MAJORVER}
touch configure-stamp
+#sbs-git:slp/api/power capi-system-power 0.1.0 0432661af455f52366bdcd809dc72a00854c763c
Name: capi-system-power
-Summary: A power library in Tizen Native API
-Version: 0.1.0
-Release: 1
+Summary: A power library in Tizen C API
+Version: 0.1.0
+Release: 7
Group: TO_BE/FILLED_IN
-License: Apache-2.0
+License: TO BE FILLED IN
Source0: %{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(pmapi)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(capi-base-common)
+BuildRequires: pkgconfig(vconf)
+
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%package devel
-Summary: A power library in Tizen Native API (Development)
+Summary: A power library in Tizen C API (Development)
Group: TO_BE/FILLED_IN
Requires: %{name} = %{version}-%{release}
%build
-cmake . -DCMAKE_INSTALL_PREFIX=/usr
+MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
+cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
make %{?jobs:-j%jobs}
%files
-%{_libdir}/libcapi-system-power.so
+%{_libdir}/libcapi-system-power.so.*
%files devel
%{_includedir}/system/power.h
%{_libdir}/pkgconfig/*.pc
+%{_libdir}/libcapi-system-power.so