]> git.pld-linux.org Git - packages/libkolab.git/blob - libkolab.spec
- up to 0.5.0
[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.5.0
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:  38da4b0918e8585ab935ae02bc321aa0
14 BuildRequires:  QtCore-devel
15 BuildRequires:  curl-devel
16 BuildRequires:  kde4-kdepimlibs-devel >= 4.8
17 BuildRequires:  libkolabxml-devel >= 1.0
18 BuildRequires:  php-devel >= 4:5.0.4
19 BuildRequires:  python-devel
20 BuildRequires:  qt4-build
21 BuildRequires:  rpmbuild(macros) >= 1.600
22 BuildRequires:  swig
23 BuildRequires:  swig-php
24 BuildRequires:  swig-python
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 >= 1.0
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
62 %build
63 rm -rf build
64 install -d build
65 cd build
66 %cmake \
67         -Wno-fatal-errors -Wno-errors \
68         -DPHP_EXECUTABLE=%{_bindir}/php \
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 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
98 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
99 %py_postclean
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %post   -p /sbin/ldconfig
105 %postun -p /sbin/ldconfig
106
107 %files
108 %defattr(644,root,root,755)
109 %attr(755,root,root) %{_libdir}/%{name}.so.*.*
110 %attr(755,root,root) %ghost %{_libdir}/%{name}.so.0
111
112 %files devel
113 %defattr(644,root,root,755)
114 %attr(755,root,root) %{_libdir}/%{name}.so
115 %{_libdir}/cmake/Libkolab
116 %{_includedir}/kolab
117
118 %files -n php-kolab
119 %defattr(644,root,root,755)
120 %attr(755,root,root) %{php_extensiondir}/kolabcalendaring.so
121 %attr(755,root,root) %{php_extensiondir}/kolabicalendar.so
122 %attr(755,root,root) %{php_extensiondir}/kolabshared.so
123 %{php_data_dir}/kolabcalendaring.php
124 %{php_data_dir}/kolabicalendar.php
125 %{php_data_dir}/kolabshared.php
126
127 %files -n python-kolab
128 %defattr(644,root,root,755)
129 %dir %{py_sitedir}/kolab
130 %attr(755,root,root) %{py_sitedir}/kolab/_calendaring.so
131 %{py_sitedir}/kolab/calendaring.py[co]
132 %attr(755,root,root) %{py_sitedir}/kolab/_icalendar.so
133 %{py_sitedir}/kolab/icalendar.py[co]
134 %attr(755,root,root) %{py_sitedir}/kolab/_shared.so
135 %{py_sitedir}/kolab/shared.py[co]
This page took 0.060374 seconds and 4 git commands to generate.