summaryrefslogtreecommitdiff
path: root/kolab-libs.spec.in
blob: 7e5d4c929b90812e8d326f056795799c8d605748 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
%{!?python_include: %global python_include %{_includedir}/python%(%{__python} -c "from distutils.sysconfig import get_python_version; print(get_python_version())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))")}
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib())")}

Name:           kolab-libs
Version:        @VERSION@
Release:        @RELEASE@%{?dist}
Summary:        Kolab XML format collection parser library

Group:          System/Libraries
License:        LGPLv3+
URL:            http://www.kolab.org
Source0:        http://git.kolab.org/libkolabxml/snapshot/%{name}-%{version}.tar.gz
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

%if 0%{?rhel} < 6 && 0%{?fedora} < 15
BuildRequires:  boost141-devel
%else
BuildRequires:  boost-devel
%endif
BuildRequires:  cmake >= 2.6
BuildRequires:  e2fsprogs-devel
BuildRequires:  gcc-c++
%if 0%{?rhel} > 6 || 0%{?fedora} >= 16
BuildRequires:  kdelibs-devel
BuildRequires:  kdepimlibs-devel
%endif
%if 0%{?rhel} > 5
BuildRequires:  libuuid-devel
%endif
BuildRequires:  php-devel >= 5.3
BuildRequires:  python-devel
BuildRequires:  qt-devel >= 3
BuildRequires:  swig
#%if 0%{?rhel} <= 6 || 0%{?fedora} < 15
#BuildRequires:  uuid-devel
#%endif
BuildRequires:  xerces-c-devel
BuildRequires:  xsd
#Requires:       

%description
The libkolabxml parsing library interprets Kolab XML formats (xCal, xCard) with
bindings for Python, PHP and other languages. The language bindings are available
through sub-packages.

%package devel
Summary:        Kolab XML library development headers
Group:          System/Libraries
Requires:       %{name} = %{version}-%{release}

%description devel
Development headers for the Kolab XML libraries

%package -n pykolab-format
Summary:        Python bindings for libkolabxml
Group:          System/Libraries
Requires:       %{name} = %{version}-%{release}

%description -n pykolab-format
The PyKolab format package offers a comprehensive Python library using the
bindings provided through libkolabxml.

%package -n php-kolabformat
Summary:        PHP bindings for libkolabxml
Group:          System/Libraries
Requires:       %{name} = %{version}-%{release}

%description -n php-kolabformat
The PHP kolabformat package offers a comprehensible PHP library using the
bindings provided through libkolabxml.

%prep
%setup -q

%build
%configure

make %{?_smp_mflags}

pushd libkolabxml
rm -rf build
mkdir -p build
pushd build
%{cmake} -Wno-fatal-errors -Wno-errors \
    -DCMAKE_SKIP_RPATH=ON \
%if 0%{?rhel} <= 6 && 0%{?fedora} < 15
    -DBOOST_LIBRARYDIR=%{_libdir}/boost141 \
    -DBOOST_INCLUDEDIR=%{_includedir}/boost141 \
    -DBoost_ADDITIONAL_VERSIONS="1.41;1.41.0" \
%endif
    -DPYTHON_INCLUDE_DIRS=%{python_include} \
    -DKOLAB_PYTHON_INSTALL_DIR=%{python_sitearch} \
    -DKOLAB_PHP_INSTALL_DIR=%{php_extdir} \
    ..
make 
popd
popd

%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}

pushd libkolabxml/build
make install DESTDIR=%{buildroot}
popd

#%check
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{_builddir}/%{name}-%{version}/c++/build/lib
#export PYTHON_PATH=$PYTHON_PATH:%{builddir}/%{name}-%{version}/
#make quicktest

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc DEVELOPMENT INSTALL
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root,-)
%{_includedir}
%{_libdir}/*.so

%files -n php-kolabformat
%defattr(-,root,root,-)
%{php_extdir}/kolabformat.php
%{php_extdir}/kolabformat.so

%files -n pykolab-format
%defattr(-,root,root,-)
%{python_sitelib}/pykolab
%{python_sitearch}/kolabformat.py*
%{python_sitearch}/_kolabformat.so

%changelog
* Fri Feb 17 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.2-0.1
- First package