Merge branch 'daemon-ext'
[libi2ncommon] / libi2ncommon.spec
CommitLineData
80156cdf
TJ
1%bcond_with Intra2net
2%bcond_with xmllib
652f47a7 3%bcond_with imap_utf7_support
80156cdf
TJ
4
5# Detect Intra2net build environment
6%if %{with Intra2net}
7 %define with_xmllib 1
652f47a7 8 %define with_imap_utf7_support 1
80156cdf
TJ
9%endif
10
92cb1b01
GE
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
e93545dd
GE
18Summary: library with functions common in Intra2net programs
19Name: libi2ncommon
38b8c825 20Version: 2.11
c778e35b 21Release: 1
0e23f538 22License: GPLv2 + linking exception
f9f14e9c 23Group: Development/Libraries
e93545dd 24Vendor: Intra2net AG
92cb1b01 25Source: %{name}-%{version}.tar.bz2
5ff2acd9 26BuildRequires: boost-devel >= 1.32.0
7e3a907d 27BuildRequires: libtool openssl-devel
16c2256f 28
92cb1b01
GE
29%if "%{with_imap_utf7_support}" == "1"
30BuildRequires: libiconv
31%endif
e93545dd
GE
32
33%description
34library with functions common in Intra2net programs
35
36%package devel
37Summary: library with functions common in Intra2net programs
1d0bc90d 38Group: Intra2net/Development
5ff2acd9 39Requires: libi2ncommon = %{version}
16c2256f
RP
40Requires: boost-devel >= 1.32.0
41
e93545dd
GE
42
43%description devel
44library with functions common in Intra2net programs
45
23d53eb1
RP
46
47%package config
48Summary: library with a config module
1d0bc90d 49Group: Intra2net
23d53eb1
RP
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
92cb1b01 57%if "%{with xmllib}" == "1"
ce6792dd
TJ
58%package xml
59Summary: library with a xml module
1d0bc90d 60Group: Intra2net
ce6792dd 61Requires: libi2ncommon = %{version}
92cb1b01 62BuildRequires: libxml++-devel
ce6792dd
TJ
63
64%description xml
65The xml module provides common xml functions.
80156cdf 66%endif
23d53eb1 67
f3311b30
TJ
68%package utils
69Summary: library with open source utility modules
1d0bc90d 70Group: Intra2net
f3311b30
TJ
71License: GPL version 2 + linking exception
72
73%description utils
74Library with open source utility modules.
75
e93545dd
GE
76%prep
77%setup -q
78
79%build
263b5807
TJ
80mkdir build
81cd build
82
83export CFLAGS="$RPM_OPT_FLAGS"
84export CXXFLAGS="$RPM_OPT_FLAGS"
80156cdf
TJ
85
86CMAKE_OPTS=""
92cb1b01 87%if "%{with_xmllib}" == "1"
80156cdf
TJ
88 CMAKE_OPTS="$CMAKE_OPTS -DBUILD_XMLLIB=ON"
89%endif
92cb1b01 90%if "%{with_imap_utf7_support}" == "1"
652f47a7
TJ
91 CMAKE_OPTS="$CMAKE_OPTS -DIMAP_UTF7_SUPPORT=ON"
92%endif
80156cdf 93
92cb1b01 94cmake -DCMAKE_INSTALL_PREFIX="%{_prefix}" $CMAKE_OPTS ../
263b5807
TJ
95
96make %{?_smp_mflags} VERBOSE=1
97
98%check
99cd build
100make check
e93545dd
GE
101
102%install
263b5807
TJ
103
104cd build
e93545dd
GE
105make DESTDIR=$RPM_BUILD_ROOT install
106
107%clean
108rm -fr $RPM_BUILD_ROOT
109
92cb1b01
GE
110%post -p /sbin/ldconfig
111
112%postun -p /sbin/ldconfig
e93545dd
GE
113
114%files
115%defattr(-,root,root)
bdafe097 116%doc COPYING.GPL Linking-Exception.txt
f9f14e9c 117%{_libdir}/libi2ncommon.so*
e93545dd
GE
118
119%files devel
120%defattr(-,root,root)
adf4a846 121%{_libdir}/*.*a*
f9f14e9c
GE
122%{_libdir}/libi2ncommon.so
123%{_libdir}/pkgconfig/*.pc
c6e19f3d 124%{_includedir}/libi2ncommon/*
23d53eb1
RP
125
126%files config
127%defattr(-,root,root)
bdafe097 128%doc COPYING.GPL Linking-Exception.txt
f9f14e9c 129%{_libdir}/libi2ncommon_config.so*
23d53eb1 130
92cb1b01 131%if "%{with xmllib}" == "1"
ce6792dd
TJ
132%files xml
133%defattr(-,root,root)
bdafe097 134%doc COPYING.GPL Linking-Exception.txt
f9f14e9c 135%{_libdir}/libi2ncommon_xml.so*
80156cdf 136%endif
f3311b30
TJ
137
138%files utils
139%defattr(-,root,root)
bdafe097 140%doc COPYING.GPL Linking-Exception.txt
f9f14e9c 141%{_libdir}/libi2ncommon_utils.so*