]> git.pld-linux.org Git - packages/libkolab.git/blob - libkolab.spec
- pldize
[packages/libkolab.git] / libkolab.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 Summary:        Kolab Object Handling Library
6 Name:           libkolab
7 Version:        0.3.1
8 Release:        1
9 License:        LGPL v3+
10 Group:          Libraries
11 URL:            http://git.kolab.org/libkolab
12 Source0:        http://mirror.kolabsys.com/pub/releases/%{name}-%{version}.tar.gz
13 # Source0-md5:  99f2b2c519c3ebaa57f8f520e8880e9a
14 Patch0:         0001-Fix-kolab-errorhandler.h-kolabformat-errorhandler.h.patch
15 BuildRequires:  QtCore-devel
16 BuildRequires:  curl-devel
17 BuildRequires:  kde4-kdepimlibs-devel >= 4.8
18 BuildRequires:  libkolabxml-devel >= 0.8
19 BuildRequires:  php-devel >= 4:5.0.4
20 BuildRequires:  python-devel
21 BuildRequires:  qt4-build
22 BuildRequires:  rpmbuild(macros) >= 1.600
23 BuildRequires:  swig
24 BuildRequires:  swig-php
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 The libkolab library is an advanced library to handle Kolab objects.
29
30 %package devel
31 Summary:        Kolab library development headers
32 Group:          Development/Languages/PHP
33 Requires:       %{name} = %{version}-%{release}
34 Requires:       libkolabxml-devel >= 0.8
35 Requires:       php-devel
36 Requires:       pkgconfig
37 Requires:       python-devel
38
39 %description devel
40 Development headers for the Kolab object libraries.
41
42 %package -n php-kolab
43 Summary:        PHP Bindings for libkolab
44 Group:          Libraries
45 Requires:       %{name} = %{version}-%{release}
46 %{?requires_php_extension}
47
48 %description -n php-kolab
49 PHP Bindings for libkolab.
50
51 %package -n python-kolab
52 Summary:        Python bindings for libkolab
53 Group:          Libraries
54 Requires:       %{name} = %{version}-%{release}
55
56 %description -n python-kolab
57 Python bindings for libkolab.
58
59 %prep
60 %setup -q
61 %patch0 -p1
62
63 %build
64 rm -rf build
65 install -d build
66 cd build
67 %cmake \
68         -Wno-fatal-errors -Wno-errors \
69         -DINCLUDE_INSTALL_DIR=%{_includedir} \
70         -DPHP_BINDINGS=ON \
71         -DPHP_INSTALL_DIR=%{php_extensiondir} \
72         -DPYTHON_BINDINGS=ON \
73         -DPYTHON_INSTALL_DIR=%{py_sitedir} \
74         ..
75 %{__make}
76 cd -
77
78 %if %{with tests}
79 cd build/tests
80 ./benchmarktest || :
81 ./calendaringtest || :
82 ./formattest || :
83 ./freebusytest || :
84 ./icalendartest || :
85 ./kcalconversiontest || :
86 ./upgradetest || :
87 %endif
88
89 %install
90 rm -rf $RPM_BUILD_ROOT
91 %{__make} -C build install \
92         DESTDIR=$RPM_BUILD_ROOT
93
94 install -d $RPM_BUILD_ROOT%{php_data_dir}
95 mv $RPM_BUILD_ROOT{%{php_extensiondir}/*.php,%{php_data_dir}}
96
97 %clean
98 rm -rf $RPM_BUILD_ROOT
99
100 %post   -p /sbin/ldconfig
101 %postun -p /sbin/ldconfig
102
103 %files
104 %defattr(644,root,root,755)
105 %attr(755,root,root) %{_libdir}/%{name}.so.*.*
106 %attr(755,root,root) %ghost %{_libdir}/%{name}.so.0
107
108 %files devel
109 %defattr(644,root,root,755)
110 %attr(755,root,root) %{_libdir}/%{name}.so
111 %{_libdir}/cmake/Libkolab
112 %{_includedir}/kolab
113
114 %files -n php-kolab
115 %defattr(644,root,root,755)
116 %attr(755,root,root) %{php_extensiondir}/kolabcalendaring.so
117 %attr(755,root,root) %{php_extensiondir}/kolabicalendar.so
118 %attr(755,root,root) %{php_extensiondir}/kolabshared.so
119 %{php_data_dir}/kolabcalendaring.php
120 %{php_data_dir}/kolabicalendar.php
121 %{php_data_dir}/kolabshared.php
122
123 %files -n python-kolab
124 %defattr(644,root,root,755)
125 %dir %{py_sitedir}/kolab
126 %attr(755,root,root) %{py_sitedir}/kolab/_calendaring.so
127 %{py_sitedir}/kolab/calendaring.py[co]
128 %attr(755,root,root) %{py_sitedir}/kolab/_icalendar.so
129 %{py_sitedir}/kolab/icalendar.py[co]
130 %attr(755,root,root) %{py_sitedir}/kolab/_shared.so
131 %{py_sitedir}/kolab/shared.py[co]
This page took 0.759912 seconds and 3 git commands to generate.