libkolabxml/libkolabxml.spec

197 lines
5.4 KiB
RPMSpec
Raw Normal View History

2012-05-09 14:37:17 +00:00
%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d/}
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
2012-04-10 01:57:45 +00:00
Name: libkolabxml
2012-05-31 13:06:01 +00:00
Version: 0.6
Release: 0.3%{?dist}
2012-04-10 01:57:45 +00:00
Summary: Kolab XML format collection parser library
Group: System/Libraries
License: LGPLv3+
URL: http://www.kolab.org
Source0: http://git.kolab.org/libkolabxml/snapshot/%{name}-%{version}.tar.gz
2012-05-02 10:51:51 +00:00
Patch1: libkolabxml-0.4.0-cmake-woos.patch
2012-04-10 01:57:45 +00:00
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%if 0%{?rhel} < 6 && 0%{?fedora} < 15
BuildRequires: boost141-devel
%else
BuildRequires: boost-devel
%endif
BuildRequires: cmake >= 2.6
BuildRequires: e2fsprogs-devel
BuildRequires: gcc-c++
%if 0%{?rhel} > 6 || 0%{?fedora} >= 16
BuildRequires: kdelibs-devel
BuildRequires: kdepimlibs-devel
%endif
BuildRequires: php-devel >= 5.3
BuildRequires: python-devel
BuildRequires: qt-devel >= 3
BuildRequires: swig
2012-04-11 15:19:32 +00:00
BuildRequires: uuid-devel
2012-04-10 01:57:45 +00:00
BuildRequires: xerces-c-devel
BuildRequires: xsd
# Only valid in kolabsys.com Koji
#BuildRequires: xsd-utils
2012-04-10 01:57:45 +00:00
%description
The libkolabxml parsing library interprets Kolab XML formats (xCal, xCard) with
bindings for Python, PHP and other languages. The language bindings are available
through sub-packages.
%package devel
Summary: Kolab XML library development headers
Group: System/Libraries
Requires: %{name} = %{version}-%{release}
%if 0%{?rhel} < 6 && 0%{?fedora} < 15
2012-05-09 14:02:37 +00:00
Requires: boost141-devel
2012-04-10 01:57:45 +00:00
%else
2012-05-09 14:02:37 +00:00
Requires: boost-devel
2012-04-10 01:57:45 +00:00
%endif
2012-05-09 14:02:37 +00:00
Requires: cmake >= 2.6
Requires: e2fsprogs-devel
Requires: gcc-c++
2012-04-10 01:57:45 +00:00
%if 0%{?rhel} > 6 || 0%{?fedora} >= 16
2012-05-09 14:02:37 +00:00
Requires: kdelibs-devel
Requires: kdepimlibs-devel
2012-04-10 01:57:45 +00:00
%endif
2012-05-09 14:02:37 +00:00
Requires: php-devel >= 5.3
Requires: python-devel
Requires: qt-devel >= 3
Requires: swig
Requires: uuid-devel
Requires: xerces-c-devel
Requires: xsd
Requires: xsd-utils
2012-04-10 01:57:45 +00:00
%description devel
Development headers for the Kolab XML libraries
%package -n php-kolabformat
Summary: PHP bindings for libkolabxml
Group: System/Libraries
Requires: %{name} = %{version}-%{release}
%description -n php-kolabformat
The PHP kolabformat package offers a comprehensible PHP library using the
bindings provided through libkolabxml.
%package -n python-kolabformat
Summary: Python bindings for libkolabxml
Group: System/Libraries
Requires: %{name} = %{version}-%{release}
%description -n python-kolabformat
The PyKolab format package offers a comprehensive Python library using the
bindings provided through libkolabxml.
%prep
%setup -q
2012-05-12 12:22:16 +00:00
#%patch1 -p1
2012-04-10 01:57:45 +00:00
%build
rm -rf build
mkdir -p build
pushd build
%{cmake} -Wno-fatal-errors -Wno-errors \
-DCMAKE_SKIP_RPATH=ON \
2012-04-20 09:37:53 +00:00
-DCMAKE_PREFIX_PATH=%{_libdir} \
2012-04-11 15:19:32 +00:00
%if 0%{?rhel} < 6 && 0%{?fedora} < 15
2012-04-10 01:57:45 +00:00
-DBOOST_LIBRARYDIR=%{_libdir}/boost141 \
-DBOOST_INCLUDEDIR=%{_includedir}/boost141 \
-DBoost_ADDITIONAL_VERSIONS="1.41;1.41.0" \
%endif
-DINCLUDE_INSTALL_DIR=%{_includedir}/kolabxml \
2012-04-10 01:57:45 +00:00
-DPYTHON_INCLUDE_DIRS=%{python_include} \
2012-04-11 15:19:32 +00:00
-DPHP_BINDINGS=ON \
2012-05-02 10:51:51 +00:00
-DPHP_INSTALL_DIR=%{php_extdir} \
2012-04-11 15:19:32 +00:00
-DPYTHON_BINDINGS=ON \
2012-05-02 10:51:51 +00:00
-DPYTHON_INSTALL_DIR=%{python_sitearch} \
2012-04-10 01:57:45 +00:00
..
make
popd
%install
rm -rf %{buildroot}
pushd build
make install DESTDIR=%{buildroot}
popd
2012-05-09 14:17:32 +00:00
mkdir -p %{buildroot}/%{_datadir}/php
mv %{buildroot}/%{php_extdir}/kolabformat.php %{buildroot}/%{_datadir}/php/kolabformat.php
mkdir -p %{buildroot}/%{php_inidir}/
cat >%{buildroot}/%{php_inidir}/kolabformat.ini <<EOF
extension=kolabformat.so
EOF
2012-05-22 16:52:10 +00:00
%check
pushd build
pushd tests
./bindingstest ||:
./conversiontest ||:
./parsingtest ||:
popd
php -d enable_dl=On -dextension=src/php/kolabformat.so src/php/test.php ||:
python src/python/test.py ||:
popd
2012-04-10 01:57:45 +00:00
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
2012-05-02 10:08:50 +00:00
%doc DEVELOPMENT NEWS README
2012-04-10 01:57:45 +00:00
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root,-)
%{_includedir}/kolabxml
2012-04-10 01:57:45 +00:00
%{_libdir}/*.so
2012-05-02 10:51:51 +00:00
%{_libdir}/cmake/Libkolabxml
2012-04-10 01:57:45 +00:00
%files -n php-kolabformat
%defattr(-,root,root,-)
2012-05-09 14:17:32 +00:00
%{php_inidir}/kolabformat.ini
%{_datadir}/php/kolabformat.php
2012-04-10 01:57:45 +00:00
%{php_extdir}/kolabformat.so
%files -n python-kolabformat
%defattr(-,root,root,-)
%{python_sitearch}/kolabformat.py*
%{python_sitearch}/_kolabformat.so
%changelog
* Wed Jun 20 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6-0.3
- Drop build requirement for xsd-utils
2012-06-11 12:18:32 +00:00
* Sat Jun 9 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6-0.2
2012-05-31 13:06:01 +00:00
- Git snapshot release
2012-05-23 14:37:49 +00:00
* Wed May 23 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.5-5
- Correct use of Python keyword None
2012-05-23 08:59:56 +00:00
- Snapshot version with attendee cutype support
2012-05-22 16:52:10 +00:00
* Tue May 22 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.5-3
- Snapshot version with attendee delegation support
* Sat May 12 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.5-2
2012-05-12 12:23:28 +00:00
- Snapshot version with build system changes
2012-05-09 14:17:32 +00:00
* Wed May 9 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.4.0-3
- Fix PHP kolabformat module packaging
* Wed May 2 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.4.0-2
2012-05-02 10:51:51 +00:00
- New version
2012-05-02 10:08:50 +00:00
2012-04-20 09:37:53 +00:00
* Fri Apr 20 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.3.0-1
- New version
2012-04-10 01:57:45 +00:00
* Mon Apr 9 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.3-0.1
- First package