]> git.pld-linux.org Git - packages/libkolabxml.git/blob - libkolabxml.spec
- almost raw
[packages/libkolabxml.git] / libkolabxml.spec
1 %{!?php_inidir:%global php_inidir %{_sysconfdir}/php.d/}
2 %{?el5:%global php_apiver  %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1)}
3 %{!?python_sitelib:%global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
4 %{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
5
6 # Filter out private python and php libs. Does not work on EPEL5,
7 # therefor we use it conditionally
8 %{?filter_setup:
9 %filter_provides_in %{python_sitearch}/.*\.so$
10 %filter_provides_in %{php_extdir}/.*\.so$
11 %filter_setup
12 }
13
14 Summary:        Kolab XML format collection parser library
15 Name:           libkolabxml
16 Version:        0.7.0
17 Release:        0.1
18 License:        LGPLv3+
19 Group:          Libraries
20 URL:            http://www.kolab.org
21 Source0:        http://git.kolab.org/libkolabxml/snapshot/%{name}-%{version}.tar.gz
22 Patch1:         %{name}-0.7.0-fix-build-without-fpermissive.patch
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %if 0%{?rhel} < 6 && 0%{?fedora} < 15
25 BuildRequires:  boost141-devel
26 %else
27 BuildRequires:  boost-devel
28 %endif
29 BuildRequires:  cmake >= 2.6
30 BuildRequires:  e2fsprogs-devel
31 BuildRequires:  libstdc++-devel
32 %if 0%{?rhel} > 6 || 0%{?fedora} >= 16
33 BuildRequires:  kdelibs-devel
34 BuildRequires:  kdepimlibs-devel
35 %endif
36 BuildRequires:  curl-devel
37 BuildRequires:  php-devel >= 5.3
38 BuildRequires:  python-devel
39 BuildRequires:  qt-devel >= 3
40 BuildRequires:  swig
41 BuildRequires:  uuid-devel
42 BuildRequires:  xerces-c-devel
43 BuildRequires:  xsd
44
45 # Only valid in kolabsys.com Koji
46 #BuildRequires:  xsd-utils
47
48 %description
49 The libkolabxml parsing library interprets Kolab XML formats (xCal,
50 xCard) with bindings for Python, PHP and other languages. The language
51 bindings are available through sub-packages.
52
53 %package devel
54 Summary:        Kolab XML library development headers
55 Group:          Development/Libraries
56 Requires:       %{name}%{?_isa} = %{version}-%{release}
57 %if 0%{?rhel} < 6 && 0%{?fedora} < 15
58 Requires:       boost141-devel
59 %else
60 Requires:       boost-devel
61 %endif
62 Requires:       cmake >= 2.6
63 Requires:       e2fsprogs-devel
64 Requires:       libstdc++-devel
65 %if 0%{?rhel} > 6 || 0%{?fedora} >= 16
66 Requires:       kdelibs-devel
67 Requires:       kdepimlibs-devel
68 %endif
69 Requires:       curl-devel
70 Requires:       php-devel >= 5.3
71 Requires:       python-devel
72 Requires:       qt-devel >= 3
73 Requires:       swig
74 Requires:       uuid-devel
75 Requires:       xerces-c-devel
76 Requires:       xsd
77
78 # Only valid in kolabsys.com Koji
79 #Requires:       xsd-utils
80
81 %description devel
82 Development headers for the Kolab XML libraries.
83
84 %package -n php-kolabformat
85 Summary:        PHP bindings for libkolabxml
86 Group:          Libraries
87 Requires:       %{name}%{?_isa} = %{version}-%{release}
88 %if 0%{?rhel} > 5 || 0%{?fedora} > 15
89 Requires:       php(api) = %{php_core_api}
90 Requires:       php(zend-abi) = %{php_zend_api}
91 %else
92 Requires:       php-api = %{php_apiver}
93 %endif
94
95 %description -n php-kolabformat
96 The PHP kolabformat package offers a comprehensible PHP library using
97 the bindings provided through libkolabxml.
98
99 %package -n python-kolabformat
100 Summary:        Python bindings for libkolabxml
101 Group:          Libraries
102 Requires:       %{name}%{?_isa} = %{version}-%{release}
103
104 %description -n python-kolabformat
105 The PyKolab format package offers a comprehensive Python library using
106 the bindings provided through libkolabxml.
107
108 %prep
109 %setup -q
110 %patch1 -p1
111
112 %build
113 rm -rf build
114 mkdir -p build
115 pushd build
116 %{cmake} -Wno-fatal-errors -Wno-errors \
117         -DCMAKE_SKIP_RPATH=ON \
118         -DCMAKE_PREFIX_PATH=%{_libdir} \
119 %if 0%{?rhel} < 6 && 0%{?fedora} < 15
120         -DBOOST_LIBRARYDIR=%{_libdir}/boost141 \
121         -DBOOST_INCLUDEDIR=%{_includedir}/boost141 \
122         -DBoost_ADDITIONAL_VERSIONS="1.41;1.41.0" \
123 %endif
124         -DINCLUDE_INSTALL_DIR=%{_includedir}/kolabxml \
125         -DPYTHON_INCLUDE_DIRS=%{python_include} \
126         -DPHP_BINDINGS=ON \
127         -DPHP_INSTALL_DIR=%{php_extdir} \
128         -DPYTHON_BINDINGS=ON \
129         -DPYTHON_INSTALL_DIR=%{py_sitedir} \
130         ..
131 %{__make}
132 popd
133
134 %install
135 rm -rf $RPM_BUILD_ROOT
136 pushd build
137 %{__make} install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
138 popd
139
140 install -d $RPM_BUILD_ROOT/%{_datadir}/php
141 mv $RPM_BUILD_ROOT/%{php_extdir}/kolabformat.php $RPM_BUILD_ROOT/%{_datadir}/php/kolabformat.php
142
143 install -d $RPM_BUILD_ROOT/%{php_inidir}/
144 cat >$RPM_BUILD_ROOT/%{php_inidir}/kolabformat.ini <<EOF
145 extension=kolabformat.so
146 EOF
147
148 %check
149 pushd build
150 # Make sure libkolabxml.so.* is found, otherwise the tests fail
151 export LD_LIBRARY_PATH=$( pwd )/src/
152 pushd tests
153 ./bindingstest ||:
154 ./conversiontest ||:
155 ./parsingtest ||:
156 popd
157 php -d enable_dl=On -dextension=src/php/kolabformat.so src/php/test.php ||:
158 python src/python/test.py ||:
159 popd
160
161 %clean
162 rm -rf $RPM_BUILD_ROOT
163
164 %post -p /sbin/ldconfig
165
166 %postun -p /sbin/ldconfig
167
168 %files
169 %defattr(644,root,root,755)
170 %doc DEVELOPMENT NEWS README
171 %{_libdir}/*.so.*
172
173 %files devel
174 %defattr(644,root,root,755)
175 %{_includedir}/kolabxml
176 %{_libdir}/*.so
177 %{_libdir}/cmake/Libkolabxml
178
179 %files -n php-kolabformat
180 %defattr(644,root,root,755)
181 %config(noreplace) %{php_inidir}/kolabformat.ini
182 %{php_data_dir}/kolabformat.php
183 %{php_extdir}/kolabformat.so
184
185 %files -n python-kolabformat
186 %defattr(644,root,root,755)
187 %{py_sitedir}/kolabformat.py*
188 %{py_sitedir}/_kolabformat.so
189
190 %changelog
191 * Wed Jul 25 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.7.0-2
192 - Fix build on ppc64
193 - New upstream version
194
195 * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-4
196 - Rebuilt for https:    //fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
197
198 * Wed Jun 27 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6.0-3
199 - Correct dependency on php
200
201 * Tue Jun 26 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6.0-2
202 - Also remove xsd-utils requirement for -devel sub-package
203
204 * Mon Jun 25 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6.0-1
205 - Actual 0.6.0 release
206
207 * Sat Jun 23 2012 Christoph Wickert <wickert@kolabsys.com> - 0.6-1
208 - Update to 0.6 final
209 - Run ldconfig in %%post and %%postun
210 - Mark kolabformat.ini as config file
211 - Export LD_LIBRARY_PATH so tests can be run in %%check
212 - Add php dependencies to php-kolabformat package
213 - Make base package requirements are arch-specific
214 - Filter unwanted provides of php-kolabformat and python-kolabformat
215
216 * Wed Jun 20 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6-0.4
217 - Some other cleanups to prevent review scrutiny from blocking
218   inclusion
219 - Drop build requirement for xsd-utils
220
221 * Sat Jun  9 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6-0.2
222 - Git snapshot release
223
224 * Wed May 23 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.5-5
225 - Correct use of Python keyword None
226 - Snapshot version with attendee cutype support
227
228 * Tue May 22 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.5-3
229 - Snapshot version with attendee delegation support
230
231 * Sat May 12 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.5-2
232 - Snapshot version with build system changes
233
234 * Wed May  9 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.4.0-3
235 - Fix PHP kolabformat module packaging
236
237 * Wed May  2 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.4.0-2
238 - New version
239
240 * Fri Apr 20 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.3.0-1
241 - New version
242
243 * Mon Apr  9 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.3-0.1
244 - First package
245
This page took 0.081106 seconds and 4 git commands to generate.