Increase version to 2.9
[libi2ncommon] / libi2ncommon.spec
... / ...
CommitLineData
1%bcond_with Intra2net
2%bcond_with xmllib
3%bcond_with imap_utf7_support
4
5# Detect Intra2net build environment
6%if %{with Intra2net}
7 %define with_xmllib 1
8 %define with_imap_utf7_support 1
9%endif
10
11%if %{with xmllib}
12 %define with_xmllib 1
13%endif
14%if %{with imap_utf7_support}
15 %define with_imap_utf7_support 1
16%endif
17
18Summary: library with functions common in Intra2net programs
19Name: libi2ncommon
20Version: 2.9
21Release: 1
22License: GPLv2 + linking exception
23Group: Development/Libraries
24Vendor: Intra2net AG
25Source: %{name}-%{version}.tar.bz2
26BuildRequires: boost-devel >= 1.32.0
27BuildRequires: libtool
28
29%if "%{with_imap_utf7_support}" == "1"
30BuildRequires: libiconv
31%endif
32
33%description
34library with functions common in Intra2net programs
35
36%package devel
37Summary: library with functions common in Intra2net programs
38Group: Intra2net/Development
39Requires: libi2ncommon = %{version}
40Requires: boost-devel >= 1.32.0
41
42
43%description devel
44library with functions common in Intra2net programs
45
46
47%package config
48Summary: library with a config module
49Group: Intra2net
50Requires: libi2ncommon = %{version}
51
52%description config
53library with a config module.
54The config module provides a global configuration system with decentralized
55declaration of the config variables.
56
57%if "%{with xmllib}" == "1"
58%package xml
59Summary: library with a xml module
60Group: Intra2net
61Requires: libi2ncommon = %{version}
62BuildRequires: libxml++-devel
63
64%description xml
65The xml module provides common xml functions.
66%endif
67
68%package utils
69Summary: library with open source utility modules
70Group: Intra2net
71License: GPL version 2 + linking exception
72
73%description utils
74Library with open source utility modules.
75
76%prep
77%setup -q
78
79%build
80mkdir build
81cd build
82
83export CFLAGS="$RPM_OPT_FLAGS"
84export CXXFLAGS="$RPM_OPT_FLAGS"
85
86CMAKE_OPTS=""
87%if "%{with_xmllib}" == "1"
88 CMAKE_OPTS="$CMAKE_OPTS -DBUILD_XMLLIB=ON"
89%endif
90%if "%{with_imap_utf7_support}" == "1"
91 CMAKE_OPTS="$CMAKE_OPTS -DIMAP_UTF7_SUPPORT=ON"
92%endif
93
94cmake -DCMAKE_INSTALL_PREFIX="%{_prefix}" $CMAKE_OPTS ../
95
96make %{?_smp_mflags} VERBOSE=1
97
98%check
99cd build
100make check
101
102%install
103
104cd build
105make DESTDIR=$RPM_BUILD_ROOT install
106
107%clean
108rm -fr $RPM_BUILD_ROOT
109
110%post -p /sbin/ldconfig
111
112%postun -p /sbin/ldconfig
113
114%files
115%defattr(-,root,root)
116%doc COPYING.GPL Linking-Exception.txt
117%{_libdir}/libi2ncommon.so*
118
119%files devel
120%defattr(-,root,root)
121# No static library for now
122#%{prefix}/lib/*.*a*
123%{_libdir}/libi2ncommon.so
124%{_libdir}/pkgconfig/*.pc
125%{_includedir}/libi2ncommon/*
126
127%files config
128%defattr(-,root,root)
129%doc COPYING.GPL Linking-Exception.txt
130%{_libdir}/libi2ncommon_config.so*
131
132%if "%{with xmllib}" == "1"
133%files xml
134%defattr(-,root,root)
135%doc COPYING.GPL Linking-Exception.txt
136%{_libdir}/libi2ncommon_xml.so*
137%endif
138
139%files utils
140%defattr(-,root,root)
141%doc COPYING.GPL Linking-Exception.txt
142%{_libdir}/libi2ncommon_utils.so*