99c1dd5bf6d1318b63a34ad3f2969032ecf6c375
[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
15 %description
16 The package provides libConfig library.
17
18 %files
19 %manifest packaging/libConfig.manifest
20 %defattr(644,root,root,755)
21 %attr(755,root,root) %{_libdir}/libConfig.so.0.0.1
22 %{_libdir}/libConfig.so.0
23
24 %package       devel
25 Summary:       Development package for config library
26 Group:         Development/Libraries
27 Requires:      libConfig = %{version}-%{release}
28 Requires:      boost-devel
29 Requires:      pkgconfig(libLogger)
30 Requires:      libjson-devel
31
32 %description   devel
33 The package provides libConfig development tools and libs.
34
35 %files         devel
36 %defattr(644,root,root,755)
37 %{_libdir}/libConfig.so
38 %{_includedir}/sc-tools
39 %{_libdir}/pkgconfig/*.pc
40
41 %prep
42 %setup -q
43
44 %build
45 %{!?build_type:%define build_type "RELEASE"}
46
47 %if %{build_type} == "DEBUG" || %{build_type} == "PROFILING"
48     CFLAGS="$CFLAGS -Wp,-U_FORTIFY_SOURCE"
49     CXXFLAGS="$CXXFLAGS -Wp,-U_FORTIFY_SOURCE"
50 %endif
51
52 %cmake . \
53          -D_LIB_VERSION_=%{lib_version} \
54          -DVERSION=%{version} \
55          -DCMAKE_BUILD_TYPE=%{build_type}
56
57 make -k %{?jobs:-j%jobs}
58
59 %install
60 %make_install
61
62 %clean
63 rm -rf %{buildroot}
64
65 %post -p /sbin/ldconfig
66
67 %postun -p /sbin/ldconfig