%define with_imap_utf7_support 1
%endif
+%if %{with xmllib}
+ %define with_xmllib 1
+%endif
+%if %{with imap_utf7_support}
+ %define with_imap_utf7_support 1
+%endif
+
Summary: library with functions common in Intra2net programs
Name: libi2ncommon
-Version: ##VERSION##
+Version: 2.11
Release: 1
License: GPLv2 + linking exception
Group: Development/Libraries
Vendor: Intra2net AG
-Source: %{name}-%{version}.tar.gz
-Requires: libi2ncommon-utils = %{version}
-BuildPrereq: libtool
+Source: %{name}-%{version}.tar.bz2
BuildRequires: boost-devel >= 1.32.0
-Obsoletes: libgettext
+BuildRequires: libtool openssl-devel
+%if "%{with_imap_utf7_support}" == "1"
+BuildRequires: libiconv
+%endif
%description
library with functions common in Intra2net programs
%package devel
Summary: library with functions common in Intra2net programs
-Group: Intranator/Development
+Group: Intra2net/Development
Requires: libi2ncommon = %{version}
Requires: boost-devel >= 1.32.0
%package config
Summary: library with a config module
-Group: Intranator
+Group: Intra2net
Requires: libi2ncommon = %{version}
%description config
The config module provides a global configuration system with decentralized
declaration of the config variables.
-%if %{with xmllib}
+%if "%{with xmllib}" == "1"
%package xml
Summary: library with a xml module
-Group: Intranator
+Group: Intra2net
Requires: libi2ncommon = %{version}
+BuildRequires: libxml++-devel
%description xml
The xml module provides common xml functions.
%package utils
Summary: library with open source utility modules
-Group: Intranator
+Group: Intra2net
License: GPL version 2 + linking exception
%description utils
%setup -q
%build
-export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/intranator/lib/pkgconfig
-
mkdir build
cd build
export CXXFLAGS="$RPM_OPT_FLAGS"
CMAKE_OPTS=""
-%if %{with xmllib}
+%if "%{with_xmllib}" == "1"
CMAKE_OPTS="$CMAKE_OPTS -DBUILD_XMLLIB=ON"
%endif
-%if %{with imap_utf7_support}
+%if "%{with_imap_utf7_support}" == "1"
CMAKE_OPTS="$CMAKE_OPTS -DIMAP_UTF7_SUPPORT=ON"
%endif
-cmake -DCMAKE_INSTALL_PREFIX="%{prefix}" $CMAKE_OPTS ../
+cmake -DCMAKE_INSTALL_PREFIX="%{_prefix}" $CMAKE_OPTS ../
make %{?_smp_mflags} VERBOSE=1
%clean
rm -fr $RPM_BUILD_ROOT
-%post
-/sbin/ldconfig
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
-%doc COPYING.GPL
+%doc COPYING.GPL Linking-Exception.txt
%{_libdir}/libi2ncommon.so*
%files devel
%defattr(-,root,root)
-# No static library for now
-#%{prefix}/lib/*.*a*
+%{_libdir}/*.*a*
%{_libdir}/libi2ncommon.so
%{_libdir}/pkgconfig/*.pc
-%{prefix}/include/
+%{_includedir}/libi2ncommon/*
%files config
%defattr(-,root,root)
-%doc COPYING.GPL
+%doc COPYING.GPL Linking-Exception.txt
%{_libdir}/libi2ncommon_config.so*
-%if %{with xmllib}
+%if "%{with xmllib}" == "1"
%files xml
%defattr(-,root,root)
-%doc COPYING.GPL
+%doc COPYING.GPL Linking-Exception.txt
%{_libdir}/libi2ncommon_xml.so*
%endif
%files utils
%defattr(-,root,root)
-%doc COPYING.GPL
+%doc COPYING.GPL Linking-Exception.txt
%{_libdir}/libi2ncommon_utils.so*