Storing serializable types in KVStore
[archive/platform/core/system/libConfig.git] / packaging / libConfig.spec
1 %define lib_version   0.0.1
2
3 Name:          libConfig
4 Version:       %{lib_version}
5 Release:       0
6 Source0:       %{name}-%{version}.tar.gz
7 License:       Apache-2.0
8 Group:         Security/Other
9 Summary:       Config library
10
11 BuildRequires: cmake
12 BuildRequires: pkgconfig(sqlite3)
13
14 %description
15 The package provides libConfig library.
16
17 %files
18 %manifest packaging/libConfig.manifest
19 %defattr(644,root,root,755)
20 %attr(755,root,root) %{_libdir}/libConfig.so.0.0.1
21 %{_libdir}/libConfig.so.0
22
23 %package       devel
24 Summary:       Development package for config library
25 Group:         Development/Libraries
26 Requires:      libConfig = %{version}-%{release}
27 Requires:      boost-devel
28 Requires:      pkgconfig(libLogger)
29 Requires:      libjson-devel
30
31 %description   devel
32 The package provides libConfig development tools and libs.
33
34 %files         devel
35 %defattr(644,root,root,755)
36 %{_libdir}/libConfig.so
37 %{_includedir}/sc-tools
38 %{_libdir}/pkgconfig/*.pc
39
40 %prep
41 %setup -q
42
43 %build
44 %{!?build_type:%define build_type "RELEASE"}
45
46 %if %{build_type} == "DEBUG" || %{build_type} == "PROFILING"
47     CFLAGS="$CFLAGS -Wp,-U_FORTIFY_SOURCE"
48     CXXFLAGS="$CXXFLAGS -Wp,-U_FORTIFY_SOURCE"
49 %endif
50
51 %cmake . \
52          -D_LIB_VERSION_=%{lib_version} \
53          -DVERSION=%{version} \
54          -DCMAKE_BUILD_TYPE=%{build_type}
55
56 make -k %{?jobs:-j%jobs}
57
58 %install
59 %make_install
60
61 %clean
62 rm -rf %{buildroot}
63
64 %post -p /sbin/ldconfig
65
66 %postun -p /sbin/ldconfig