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