Update to 0.6 final

- Run ldconfig in %post and %postun
- Mark kolabformat.ini as config file
- Export LD_LIBRARY_PATH so tests can be run in %check
- Add php dependencies to php-kolabformat package
- Make base package requirements are arch-specific
- Filter unwanted provides of php-kolabformat and python-kolabformat
This commit is contained in:
Christoph Wickert 2012-06-24 19:20:11 +02:00
parent 16e12ef0d0
commit d4d2730f8c

View File

@ -1,10 +1,19 @@
%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d/}
%{?el5: %global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1)}
%{!?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)")}
# Filter out private python and php libs. Does not work on EPEL5,
# therefor we use it conditionally
%{?filter_setup:
%filter_from_provides %{python_sitearch}/.*\.so$
%filter_from_provides %{php_extdir}/.*\.so$
%filter_setup
}
Name: libkolabxml
Version: 0.6
Release: 0.4%{?dist}
Release: 1%{?dist}
Summary: Kolab XML format collection parser library
Group: System Environment/Libraries
@ -12,7 +21,7 @@ License: LGPLv3+
URL: http://www.kolab.org
# From git.kolab.org/libkolabxml/snapshot/5c360b5c0de1257ae942db547dfa54b2b99a8ad5.tar.gz
Source0: %{name}-%{version}.tar.gz
Source0: http://git.kolab.org/libkolabxml/snapshot/%{name}-%{version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
@ -46,8 +55,8 @@ are available through sub-packages.
%package devel
Summary: Kolab XML library development headers
Group: System/Libraries
Requires: %{name} = %{version}-%{release}
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%if 0%{?rhel} < 6 && 0%{?fedora} < 15
Requires: boost141-devel
%else
@ -75,7 +84,13 @@ Development headers for the Kolab XML libraries
%package -n php-kolabformat
Summary: PHP bindings for libkolabxml
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
%if 0%{?rhel} < 6
Requires: php-api = %{php_apiver}
%else
Requires: php(zend-abi) = %{php_zend_api}
Requires: php(api) = %{php_core_api}
%endif
%description -n php-kolabformat
The PHP kolabformat package offers a comprehensible PHP library using the
@ -84,7 +99,7 @@ bindings provided through libkolabxml.
%package -n python-kolabformat
Summary: Python bindings for libkolabxml
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python-kolabformat
The PyKolab format package offers a comprehensive Python library using the
@ -92,7 +107,6 @@ bindings provided through libkolabxml.
%prep
%setup -q
#%patch1 -p1
%build
rm -rf build
@ -119,7 +133,7 @@ popd
%install
rm -rf %{buildroot}
pushd build
make install DESTDIR=%{buildroot}
make install DESTDIR=%{buildroot} INSTALL='install -p'
popd
mkdir -p %{buildroot}/%{_datadir}/php
@ -132,6 +146,8 @@ EOF
%check
pushd build
# Make sure libkolabxml.so.* is found, otherwise the tests fail
export LD_LIBRARY_PATH=$( pwd )/src/
pushd tests
./bindingstest ||:
./conversiontest ||:
@ -144,6 +160,10 @@ popd
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc DEVELOPMENT NEWS README
@ -157,7 +177,7 @@ rm -rf %{buildroot}
%files -n php-kolabformat
%defattr(-,root,root,-)
%{php_inidir}/kolabformat.ini
%config(noreplace) %{php_inidir}/kolabformat.ini
%{_datadir}/php/kolabformat.php
%{php_extdir}/kolabformat.so
@ -167,6 +187,15 @@ rm -rf %{buildroot}
%{python_sitearch}/_kolabformat.so
%changelog
* Sat Jun 23 2012 Christoph Wickert <wickert@kolabsys.com> - 0.6-1
- Update to 0.6 final
- Run ldconfig in %%post and %%postun
- Mark kolabformat.ini as config file
- Export LD_LIBRARY_PATH so tests can be run in %%check
- Add php dependencies to php-kolabformat package
- Make base package requirements are arch-specific
- Filter unwanted provides of php-kolabformat and python-kolabformat
* Wed Jun 20 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6-0.4
- Some other cleanups to prevent review scrutiny from blocking
inclusion