]> git.pld-linux.org Git - packages/libkolab.git/blob - libkolab.spec
pld ext deps and macros and layout
[packages/libkolab.git] / libkolab.spec
1 # TODO
2 # - pldize this package!
3 #  - file attrs
4 #  - pld cmake macros
5 #  - tests to build, not %check and add bcond
6 #  - drop rhel/fedora dist macros
7 Summary:        Kolab Object Handling Library
8 Name:           libkolab
9 Version:        0.3.1
10 Release:        0.1
11 License:        LGPL v3+
12 Group:          Libraries
13 URL:            http://git.kolab.org/libkolab
14 Source0:        http://mirror.kolabsys.com/pub/releases/%{name}-%{version}.tar.gz
15 # Source0-md5:  99f2b2c519c3ebaa57f8f520e8880e9a
16 BuildRequires:  curl-devel
17 BuildRequires:  kde4-kdepimlibs-devel >= 4.8
18 BuildRequires:  libcalendaring-devel
19 BuildRequires:  libcalendaring-devel
20 BuildRequires:  libkolabxml-devel >= 0.7
21 BuildRequires:  php-devel >= 4:5.0.4
22 BuildRequires:  python-devel
23 BuildRequires:  qt-devel
24 BuildRequires:  rpmbuild(macros) >= 1.519
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/Libraries
33 Requires:       %{name} = %{version}-%{release}
34 Requires:       libkolabxml-devel >= 0.7
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         -DINCLUDE_INSTALL_DIR=%{_includedir} \
69 %if 0%{?rhel} < 7 && 0%{?fedora} < 17
70         -DUSE_LIBCALENDARING=ON \
71 %endif
72         -DPHP_BINDINGS=ON \
73         -DPHP_INSTALL_DIR=%{php_extensiondir} \
74         -DPYTHON_BINDINGS=ON \
75         -DPYTHON_INSTALL_DIR=%{py_sitedir} \
76         ..
77 %{__make}
78 cd -
79
80 %install
81 rm -rf $RPM_BUILD_ROOT
82 %{__make} -C build install \
83         DESTDIR=$RPM_BUILD_ROOT
84
85 install -d $RPM_BUILD_ROOT%{php_data_dir}
86 mv $RPM_BUILD_ROOT{%{php_extensiondir}/*.php,%{php_data_dir}}
87
88 %check
89 pushd build/tests
90 ./benchmarktest || :
91 ./calendaringtest || :
92 ./formattest || :
93 ./freebusytest || :
94 ./icalendartest || :
95 ./kcalconversiontest || :
96 ./upgradetest || :
97 popd
98
99 %clean
100 rm -rf $RPM_BUILD_ROOT
101
102 %post   -p /sbin/ldconfig
103 %postun -p /sbin/ldconfig
104
105 %files
106 %defattr(644,root,root,755)
107 %{_libdir}/%{name}.so.0
108 %{_libdir}/%{name}.so.0.3
109
110 %files devel
111 %defattr(644,root,root,755)
112 %{_libdir}/%{name}.so
113 %{_libdir}/cmake/Libkolab
114 %{_includedir}/kolab
115
116 %files -n php-kolab
117 %defattr(644,root,root,755)
118 %{php_data_dir}/calendaring.php
119 %{php_data_dir}/icalendar.php
120 %attr(755,root,root) %{php_extensiondir}/calendaring.so
121 %attr(755,root,root) %{php_extensiondir}/icalendar.so
122
123 %files -n python-kolab
124 %defattr(644,root,root,755)
125 %{py_sitedir}/_calendaring.so
126 %{py_sitedir}/calendaring.py[co]
127 %{py_sitedir}/_icalendar.so
128 %{py_sitedir}/icalendar.py[co]
This page took 0.080157 seconds and 4 git commands to generate.