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