Initial library content.
[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
13 %description
14 The package provides libConfig library.
15
16 %package       devel
17 Summary:       Development package for config library
18 Group:         Development/Libraries
19 Requires:      boost-devel
20 Requires:      pkgconfig(libLogger)
21 Requires:      libjson-devel
22
23 %description   devel
24 The package provides libConfig development tools and libs.
25
26 %files         devel
27 %defattr(644,root,root,755)
28 %{_includedir}/sc-tools
29 %{_libdir}/pkgconfig/*.pc
30
31 %prep
32 %setup -q
33
34 %build
35 %{!?build_type:%define build_type "RELEASE"}
36
37 %if %{build_type} == "DEBUG" || %{build_type} == "PROFILING"
38     CFLAGS="$CFLAGS -Wp,-U_FORTIFY_SOURCE"
39     CXXFLAGS="$CXXFLAGS -Wp,-U_FORTIFY_SOURCE"
40 %endif
41
42 %cmake . \
43          -D_LIB_VERSION_=%{lib_version} \
44          -DVERSION=%{version} \
45          -DCMAKE_BUILD_TYPE=%{build_type}
46
47 make -k %{?jobs:-j%jobs}
48
49 %install
50 %make_install
51
52 %clean
53 rm -rf %{buildroot}