+# TODO
+# - pldize this package!
+# - php deps
+# - file attrs
+# - macros
Summary: Kolab Object Handling Library
Name: libkolab
Version: 0.3.1
Release: 0.1
+License: LGPL v3+
Group: Libraries
-License: LGPLv3+
URL: http://git.kolab.org/libkolab
Source0: http://mirror.kolabsys.com/pub/releases/%{name}-%{version}.tar.gz
# Source0-md5: 99f2b2c519c3ebaa57f8f520e8880e9a
BuildRequires: curl-devel
-BuildRequires: kde4-kdepimlibs-devel
+BuildRequires: kde4-kdepimlibs-devel >= 4.8
+BuildRequires: libcalendaring-devel
BuildRequires: libcalendaring-devel
BuildRequires: libkolabxml-devel >= 0.7
BuildRequires: php-devel
BuildRequires: python-devel
BuildRequires: qt-devel
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
The libkolab library is an advanced library to handle Kolab objects.
%package devel
Summary: Kolab library development headers
-BuildRequires: kde4-kdepimlibs-devel >= 4.8
-BuildRequires: libcalendaring-devel
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: libkolabxml-devel >= 0.7
%build
rm -rf build
-mkdir -p build
-pushd build
-%{cmake} -Wno-fatal-errors -Wno-errors \
+install -d build
+cd build
+%cmake \
+ -Wno-fatal-errors -Wno-errors \
-DINCLUDE_INSTALL_DIR=%{_includedir} \
%if 0%{?rhel} < 7 && 0%{?fedora} < 17
-DUSE_LIBCALENDARING=ON \
-DPYTHON_INSTALL_DIR=%{py_sitedir} \
..
%{__make}
-popd
+cd -
%install
rm -rf $RPM_BUILD_ROOT
-pushd build
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
-popd
+%{__make} -C build install \
+ DESTDIR=$RPM_BUILD_ROOT
%check
pushd build/tests
%clean
rm -rf $RPM_BUILD_ROOT
-%post -p /sbin/ldconfig
-
-%postun -p /sbin/ldconfig
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
%files
%defattr(644,root,root,755)
%files -n python-kolab
%defattr(644,root,root,755)
%{py_sitedir}/_calendaring.so
-%{py_sitedir}/calendaring.py*
+%{py_sitedir}/calendaring.py[co]
%{py_sitedir}/_icalendar.so
-%{py_sitedir}/icalendar.py*
-
-
+%{py_sitedir}/icalendar.py[co]