3 %bcond_with imap_utf7_support
5 # Detect Intra2net build environment
8 %define with_imap_utf7_support 1
14 %if %{with imap_utf7_support}
15 %define with_imap_utf7_support 1
18 Summary: library with functions common in Intra2net programs
22 License: GPLv2 + linking exception
23 Group: Development/Libraries
25 Source: %{name}-%{version}.tar.bz2
26 BuildRequires: boost-devel >= 1.32.0
27 BuildRequires: libtool
29 %if "%{with_imap_utf7_support}" == "1"
30 BuildRequires: libiconv
34 library with functions common in Intra2net programs
37 Summary: library with functions common in Intra2net programs
38 Group: Intra2net/Development
39 Requires: libi2ncommon = %{version}
40 Requires: boost-devel >= 1.32.0
44 library with functions common in Intra2net programs
48 Summary: library with a config module
50 Requires: libi2ncommon = %{version}
53 library with a config module.
54 The config module provides a global configuration system with decentralized
55 declaration of the config variables.
57 %if "%{with xmllib}" == "1"
59 Summary: library with a xml module
61 Requires: libi2ncommon = %{version}
62 BuildRequires: libxml++-devel
65 The xml module provides common xml functions.
69 Summary: library with open source utility modules
71 License: GPL version 2 + linking exception
74 Library with open source utility modules.
83 export CFLAGS="$RPM_OPT_FLAGS"
84 export CXXFLAGS="$RPM_OPT_FLAGS"
87 %if "%{with_xmllib}" == "1"
88 CMAKE_OPTS="$CMAKE_OPTS -DBUILD_XMLLIB=ON"
90 %if "%{with_imap_utf7_support}" == "1"
91 CMAKE_OPTS="$CMAKE_OPTS -DIMAP_UTF7_SUPPORT=ON"
94 cmake -DCMAKE_INSTALL_PREFIX="%{_prefix}" $CMAKE_OPTS ../
96 make %{?_smp_mflags} VERBOSE=1
105 make DESTDIR=$RPM_BUILD_ROOT install
108 rm -fr $RPM_BUILD_ROOT
110 %post -p /sbin/ldconfig
112 %postun -p /sbin/ldconfig
115 %defattr(-,root,root)
116 %doc COPYING.GPL Linking-Exception.txt
117 %{_libdir}/libi2ncommon.so*
120 %defattr(-,root,root)
121 # No static library for now
123 %{_libdir}/libi2ncommon.so
124 %{_libdir}/pkgconfig/*.pc
125 %{_includedir}/libi2ncommon/*
128 %defattr(-,root,root)
129 %doc COPYING.GPL Linking-Exception.txt
130 %{_libdir}/libi2ncommon_config.so*
132 %if "%{with xmllib}" == "1"
134 %defattr(-,root,root)
135 %doc COPYING.GPL Linking-Exception.txt
136 %{_libdir}/libi2ncommon_xml.so*
140 %defattr(-,root,root)
141 %doc COPYING.GPL Linking-Exception.txt
142 %{_libdir}/libi2ncommon_utils.so*