summaryrefslogtreecommitdiffstats
path: root/zorba.spec
blob: d043ec0839d1dae77a39f4ecfc844a81979b6513 (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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
%{!?php_extdir: %{expand: %%global php_extdir %(php-config --extension-dir)}}

%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"] ')}

%{?filter_setup:
%filter_provides_in %{python_sitearch}.*\.so$
%filter_provides_in %{php_extdir}.*\.so$
%filter_provides_in %{ruby_sitearch}.*\.so$
%filter_provides_in %{_docdir} 
%filter_requires_in %{_docdir}
%filter_setup
}

Name:    zorba
Version: 2.1.0
Release: 1%{?dist}
Summary: General purpose XQuery processor implemented in C++
Group:   System Environment/Libraries

# binaries/XQuery modules: ASL 2.0 and BSD
# xsd schema files: W3C
# modules/functx/functx.xq: LGPLv2
License: ASL 2.0 and BSD and W3C and LGPLv2

URL:     http://www.zorba-xquery.com
Source0: http://launchpad.net/zorba/trunk/2.0/+download/%{name}-%{version}.tar.gz

BuildRequires: bison
BuildRequires: boost-devel
BuildRequires: chrpath
BuildRequires: cmake 
BuildRequires: doxygen
BuildRequires: flex
BuildRequires: graphviz
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: jpackage-utils
BuildRequires: libcurl-devel
BuildRequires: libicu-devel
BuildRequires: libxml2-devel
BuildRequires: php-cli 
BuildRequires: php-devel
BuildRequires: python-devel
BuildRequires: ruby
BuildRequires: ruby-devel
BuildRequires: swig
BuildRequires: tex(dvips)
BuildRequires: tex(latex)
BuildRequires: xerces-c-devel
BuildRequires: xqc


%description
Zorba is a general purpose XQuery processor implementing in C++ the W3C family 
of specifications. It is not an XML database. The query processor has been 
designed to be embeddable in a variety of environments such as other 
programming languages extended with XML processing capabilities, browsers,
database servers, XML message dispatchers, or smart phones. Its architecture 
employs a modular design, which allows customizing the Zorba query processor to 
the environment's needs. In particular the architecture of the query processor 
allows a pluggable XML store (e.g. main memory, DOM stores, persistent 
disk-based large stores, S3 stores).


%package devel
Summary:  Development files for %{name}
Group:    Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: cmake
Requires: xqc

%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%package python
Summary:  Python language binding for %{name}
Group:    Development/Languages
Requires: %{name}%{?_isa} = %{version}-%{release}


%description python
This package provides the Python module to use the %{name} API.


%package php
Summary:  PHP language binding for %{name}
Group:    Development/Languages
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: php(zend-abi) = %{php_zend_api}
Requires: php(api) = %{php_core_api}

%description php
This package provides the PHP module to use the %{name} API.


%package ruby
Summary:  Ruby language binding for %{name}
Group:    Development/Languages
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: ruby

%description ruby
This package provides the Ruby module to use the %{name} API.


%package java
Summary:  Java language binding for %{name}
Group:    Development/Languages
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: java >= 1:1.6.0
Requires: jpackage-utils

%description java
This package provides the Java module to use the %{name} API.

%package doc
Summary:   Documentation for the Zorba XQuery processor
Group:     Documentation
BuildArch: noarch

%description doc
This package provides documentation for the %{name} command-line client and 
the programming APIs.
 

%prep
%setup -q

# xqc.h is provided by xqc package
rm -f src/include/xqc.h

find \( -name "*.h" -o -name "*.cpp" \) -exec chmod 644 {} \;


%build
mkdir -p build
cd build
%cmake -DZORBA_LIB_DIRNAME:STRING='%{_lib}' ..

make VERBOSE=1 %{?_smp_mflags}

# create zorba.jar
pushd swig/java
javac -d . *.java
jar cf zorba.jar org/
popd

make doc


%install
make install DESTDIR=%{buildroot} INSTALL="install -p" -C build

# move cmake files to cmake module directory
mkdir -p %{buildroot}%{_datadir}/cmake/Modules/
mv %{buildroot}%{_datadir}/cmake/zorba-%{version}/* %{buildroot}%{_datadir}/cmake/Modules/

# move Java extension module to proper directory
mkdir -p %{buildroot}%{_libdir}/zorba-java/
cp -p build/swig/java/zorba.jar %{buildroot}%{_libdir}/zorba-java/
mv %{buildroot}%{_datadir}/java/*.so %{buildroot}%{_libdir}/zorba-java/
rm -f %{buildroot}%{_datadir}/java/*.java

# move PHP extension module to proper directories
mkdir -p %{buildroot}%{php_extdir}
mkdir -p %{buildroot}%{_datadir}/php/zorba
mv %{buildroot}%{_datadir}/php5/zorba_api_wrapper.php %{buildroot}%{_datadir}/php/zorba
mv %{buildroot}%{_datadir}/php5/zorba_api.so %{buildroot}%{php_extdir}

# move Python extension module to proper directory
mkdir -p %{buildroot}%{python_sitearch}
mv %{buildroot}%{_datadir}/python/* %{buildroot}%{python_sitearch}

# move Ruby extension module to proper directory
mkdir -p %{buildroot}%{ruby_sitearch}
mv %{buildroot}%{_datadir}/ruby/zorba_api.so %{buildroot}%{ruby_sitearch}

chrpath --delete %{buildroot}%{_bindir}/zorba
chrpath --delete %{buildroot}%{_bindir}/testdriver
find %{buildroot} -name "*.so" -exec chrpath --delete {} \;
find %{buildroot} -name "*.so" -exec chmod 755 {} \;

rm -f %{buildroot}%{_includedir}/xqc.h

# move docs to temporary directory used in -doc package
mkdir doc.tmp
mv %{buildroot}/%{_defaultdocdir}/%{name}-%{version}/* doc.tmp
rm -rf %{buildroot}/%{_defaultdocdir}/%{name}-%{version}/
rm -f doc.tmp/*.txt

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig


%files
%doc ChangeLog AUTHORS.txt LICENSE.txt NOTICE.txt README.txt
%{_bindir}/zorba
%{_bindir}/testdriver
%{_libdir}/libzorba_simplestore.so.*
%{_libdir}/zorba/
%{_datadir}/zorba/
%dir %{_datadir}/zorba-%{version}/
%{_datadir}/zorba-%{version}/xqdoc/

%files devel
%{_libdir}/libzorba_simplestore.so
%{_includedir}/zorba/
%{_datadir}/cmake/Modules/*

%files python
%{python_sitearch}/_zorba_api.so
%{python_sitearch}/zorba_api.py*

%files php
%dir %{_datadir}/php/zorba/
%{_datadir}/php/zorba/zorba_api_wrapper.php
%{php_extdir}/zorba_api.so

%files ruby
%{ruby_sitearch}/zorba_api.so

%files java
%{_libdir}/zorba-java/

%files doc
%doc LICENSE.txt
%doc doc.tmp/*


%changelog
* Sat Dec 10 2011 Martin Gieseking <martin.gieseking@uos.de> 2.1.0-1
- updated to new upstream release

* Sun Nov 13 2011 Martin Gieseking <martin.gieseking@uos.de> 2.0.3-1
- updated to new upstream release
- updated Source0 as the upstream repository moved to launchpad

* Mon Sep 19 2011 Martin Gieseking <martin.gieseking@uos.de> 2.0.2-2
- rebuilt for broken dependencies

* Sat Sep 10 2011 Martin Gieseking <martin.gieseking@uos.de> 2.0.2-1
- updated to new upstream release
- dropped patches applied upstream

* Mon Sep 05 2011 Martin Gieseking <martin.gieseking@uos.de> 2.0.1-1
- updated to new upstream release
- the new release no longer provides and depends on jsonxx, thus removed the virtual Provides for the bundled library

* Thu Mar 03 2011 Martin Gieseking <martin.gieseking@uos.de> 1.4.0-3
- added virtual Provides for bundled jsonxx library
- added patch to replace calls of deprecated Boost functions in Fedora >= 15

* Fri Jan 28 2011 Martin Gieseking <martin.gieseking@uos.de> 1.4.0-2
- explicitely BR java/java-devel epoch/version >= 1:1.6.0
- removed BR: php
- move Provides filters to the top
- changed license to ASL 2.0 and BSD
- removed -O3 from CFLAGS/CXXFLAGS
- preserve timestamps of zorba.jar and css files
- link private json library statically
- added missing %%defattr in php subpackage

* Tue Nov 30 2010 Martin Gieseking <martin.gieseking@uos.de> 1.4.0-1
- initial Fedora package