]> git.pld-linux.org Git - packages/ice.git/blob - ice.spec
- bindings, based on fc cvs, still lots of todo
[packages/ice.git] / ice.spec
1 # TODO
2 # - get stuff from fc spec
3 # - cc/cflags
4 # - language bindings
5 #
6 # Conditional build:
7 %bcond_without  java            # Java bindings
8 %bcond_without  dotnet          # .NET bindings
9 %bcond_without  python          # Python bindings
10 %bcond_without  ruby            # Ruby bindings
11 %bcond_without  php                     # PHP bindings
12 %bcond_without  gui                     # IceGrid GUI
13
14 Summary:        The Ice base runtime and services
15 Name:           ice
16 Version:        3.4.0
17 Release:        0.1
18 License:        GPL v2 with exceptions (see ICE_LICENSE)
19 Group:          Applications
20 Source0:        http://www.zeroc.com/download/Ice/3.4/Ice-%{version}.tar.gz
21 # Source0-md5:  998b10627ade020cb00f5beb73efc0e0
22 # Extracted from http://zeroc.com/download/Ice/3.4/ice-3.4.0-1.src.rpm
23 Source1:        Ice-rpmbuild-%{version}.tar.gz
24 # Source1-md5:  869cc60645e7e2b4115584a5ab17d1e9
25 Source2:        %{name}gridgui
26 Source3:        IceGridAdmin.desktop
27 URL:            http://www.zeroc.com/
28 Patch0:         %{name}-build.patch
29 Patch1:         dont-build-demo-test.patch
30 Patch2:         java-build.patch
31 Patch3:         jgoodies.patch
32 BuildRequires:  db-cxx-devel
33 %{?with_java:BuildRequires:     db-java-devel}
34 %{?with_java:BuildRequires:     java-jgoodies-forms}
35 %{?with_java:BuildRequires:     java-jgoodies-looks}
36 BuildRequires:  mcpp-devel
37 %{?with_php:BuildRequires:      php-devel >= 3:5.0.0}
38 BuildRequires:  rpmbuild(macros) >= 1.519
39 # drop these O/P if not needed
40 Provides:       Ice
41 Obsoletes:      Ice
42 # Ice doesn't officially support ppc64 at all; sparc64 doesnt have mono
43 ExcludeArch:    ppc64 sparc64
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 # Some file suffixes we need to grab the right stuff for the file lists
47 %define         soversion       34
48
49 %description
50 Ice is a modern alternative to object middleware such as CORBA or
51 COM/DCOM/COM+. It is easy to learn, yet provides a powerful network
52 infrastructure for demanding technical applications. It features an
53 object-oriented specification language, easy to use C++, C#, Java,
54 Python, Ruby, PHP, and Visual Basic mappings, a highly efficient
55 protocol, asynchronous method invocation and dispatch, dynamic
56 transport plug-ins, TCP/IP and UDP/IP support, SSL-based security, a
57 firewall solution, and much more.
58
59 %package servers
60 Summary:        Ice services to run through /etc/rc.d/init.d
61 Group:          Development/Tools
62 Requires(post): /sbin/chkconfig
63 Requires(pre):  shadow-utils
64 Requires(preun):        /sbin/chkconfig
65 Requires(preun):        /sbin/service
66 Requires:       %{name} = %{version}-%{release}
67
68 %description servers
69 Ice services to run through /etc/rc.d/init.d
70
71 %package devel
72 Summary:        Tools for developing Ice applications in C++
73 Group:          Development/Libraries
74 Requires:       %{name} = %{version}-%{release}
75 # drop these O/P if not needed
76 Provides:       Ice-devel
77 Obsoletes:      Ice-devel
78
79 %description devel
80 Tools for developing Ice applications in C++.
81
82 %package java
83 Summary:        The Ice runtime for Java
84 Group:          Libraries
85 Requires:       %{name} = %{version}-%{release}
86 Requires:       db4-java
87 Requires:       java >= 1.5.0
88
89 %description java
90 The Ice runtime for Java
91
92 %package java-devel
93 Summary:        Tools for developing Ice applications in Java
94 Group:          Development/Tools
95 Requires:       ice-java = %{version}-%{release}
96
97 %description java-devel
98 Tools for developing Ice applications in Java.
99
100 %package csharp
101 Summary:        IceGrid Admin Tool
102 Summary:        The Ice runtime for C#
103 Group:          Development/Tools
104 Group:          Libraries
105 Requires:       %{name} = %{version}-%{release}
106 Requires:       %{name} = %{version}-%{release}
107 Requires:       ice-java = %{version}-%{release}
108 Requires:       java
109 Requires:       jgoodies-forms
110 Requires:       jgoodies-looks
111 Requires:       jpackage-utils
112 Requires:       mono-core >= 1.2.2
113 Provides:       ice-dotnet = %{version}-%{release}
114 Obsoletes:      ice-dotnet < %{version}-%{release}
115
116 %description csharp
117 The Ice runtime for C#
118
119 %package csharp-devel
120 Summary:        Tools for developing Ice applications in C#
121 Group:          Development/Tools
122 Requires:       ice-csharp = %{version}-%{release}
123 Requires:       pkgconfig
124
125 %description csharp-devel
126 Tools for developing Ice applications in C#.
127
128 %package ruby
129 Summary:        The Ice runtime for Ruby applications
130 Group:          Development/Tools
131 Requires:       %{name} = %{version}-%{release}
132 Requires:       ruby(abi) = 1.8
133
134 %description ruby
135 The Ice runtime for Ruby applications.
136
137 %package ruby-devel
138 Summary:        Tools for developing Ice applications in Ruby
139 Group:          Development/Tools
140 Requires:       ice-ruby = %{version}-%{release}
141
142 %description ruby-devel
143 Tools for developing Ice applications in Ruby.
144
145 %package python
146 Summary:        The Ice runtime for Python applications
147 Group:          Development/Tools
148 Requires:       %{name} = %{version}-%{release}
149 Requires:       python >= 2.3.4
150
151 %description python
152 The Ice runtime for Python applications.
153
154 %package python-devel
155 Summary:        Tools for developing Ice applications in Python
156 Group:          Development/Tools
157 Requires:       ice-python = %{version}-%{release}
158
159 %description python-devel
160 Tools for developing Ice applications in Python.
161
162 %package php
163 Summary:        The Ice runtime for PHP applications
164 Group:          Libraries
165 Requires:       %{name} = %{version}-%{release}
166 %{?requires_php_extension}
167
168 %description php
169 The Ice runtime for PHP applications.
170
171 %package php-devel
172 Summary:        Tools for developing Ice applications in PHP
173 Group:          Development/Tools
174 Requires:       ice-php = %{version}-%{release}
175
176 %description php-devel
177 Tools for developing Ice applications in PHP.
178
179 %prep
180 %setup -q -n Ice-%{version} -a 1
181 %patch0 -p0
182 %patch1 -p1
183 %patch2 -p1
184 %patch3 -p1
185
186 %build
187
188 # Compile the main Ice runtime
189 # TODO: CC/CXX passing as make param breaks build system
190 %{__make} -C cpp \
191         CFLAGS="%{rpmcflags} -fPIC" \
192         CXXFLAGS="%{rpmcxxflags} -fPIC" \
193         embedded_runpath_prefix=""
194
195 %if %{with java}
196 # Set the CLASSPATH correctly for the Java compile
197 export CLASSPATH=$(build-classpath db jgoodies-forms jgoodies-looks)
198
199 # Rebuild the Java ImportKey class
200 cd cpp/src/ca
201 rm *.class
202 javac ImportKey.java
203 cd -
204
205 %{__make} -C java \
206         CFLAGS="%{rpmcflags} -fPIC" \
207         CXXFLAGS="%{rpmcxxflags} -fPIC" \
208         embedded_runpath_prefix=""
209
210 # Create the IceGrid icon
211 cd java/resources/icons
212 convert icegrid.ico temp.png
213 mv temp-8.png icegrid.png
214 rm temp*.png
215 cd -
216 %endif
217
218 %if %{with dotnet}
219 %{__make} -C cs \
220         CFLAGS="%{rpmcflags} -fPIC" \
221         CXXFLAGS="%{rpmcxxflags} -fPIC" \
222         embedded_runpath_prefix=""
223 %endif
224
225 %if %{with python}
226 %{__make} -C py \
227         CFLAGS="%{rpmcflags} -fPIC" \
228         CXXFLAGS="%{rpmcxxflags} -fPIC" \
229         embedded_runpath_prefix=""
230 %endif
231
232 %if %{with ruby}
233 %{__make} -C rb \
234         CFLAGS="%{rpmcflags} -fPIC" \
235         CXXFLAGS="%{rpmcxxflags} -fPIC" \
236         embedded_runpath_prefix=""
237 %endif
238
239 %if %{with php}
240 %{__make} -C php \
241         PHP_HOME=%{_prefix} \
242         CFLAGS="%{rpmcflags} -fPIC" \
243         CXXFLAGS="%{rpmcxxflags} -fPIC" \
244         embedded_runpath_prefix=""
245 %endif
246
247 %install
248 rm -rf $RPM_BUILD_ROOT
249 install -d $RPM_BUILD_ROOT{%{_docdir}/Ice-%{version},%{_datadir}/Ice}
250
251 %{__make} install \
252         prefix=$RPM_BUILD_ROOT \
253         GACINSTALL=yes \
254         GAC_ROOT=$RPM_BUILD_ROOT%{_libdir} \
255         embedded_runpath_prefix=""
256
257 %if %{with java}
258 %{__make} -C java install \
259         prefix=$RPM_BUILD_ROOT \
260         GACINSTALL=yes \
261         GAC_ROOT=$RPM_BUILD_ROOT%{_libdir} \
262         embedded_runpath_prefix=""
263 # Move Java stuff where it should be
264 install -d $RPM_BUILD_ROOT%{_javadir}
265 mv $RPM_BUILD_ROOT/lib/ant-ice.jar $RPM_BUILD_ROOT%{_javadir}/ant-ice-%{version}.jar
266 ln -s ant-ice-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/ant-ice.jar
267 mv $RPM_BUILD_ROOT/lib/Ice.jar $RPM_BUILD_ROOT%{_javadir}/Ice-%{version}.jar
268 ln -s Ice-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/Ice.jar
269 mv $RPM_BUILD_ROOT/lib/Freeze.jar $RPM_BUILD_ROOT%{_javadir}/Freeze-%{version}.jar
270 ln -s Freeze-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/Freeze.jar
271 %endif
272
273 %if %{with gui}
274 # Install the IceGrid GUI
275 mv $RPM_BUILD_ROOT/lib/IceGridGUI.jar $RPM_BUILD_ROOT%{_datadir}/Ice
276 install -d $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
277 cp -a java/resources/icons/icegrid.png \
278         $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
279 install -d $RPM_BUILD_ROOT%{_bindir}
280 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}
281 install -d $RPM_BUILD_ROOT%{_desktopdir}
282 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
283 %endif
284
285 # Move other rpm-specific files into the right place (README, service stuff)
286 cp -a Ice-rpmbuild-%{version}/ice.ini $RPM_BUILD_ROOT/ice.ini
287
288 # Install the servers
289 install -d $RPM_BUILD_ROOT%{_sysconfdir}
290 cp -a Ice-rpmbuild-%{version}/*.conf $RPM_BUILD_ROOT%{_sysconfdir}
291 install -d $RPM_BUILD_ROOT%{_initrddir}
292 for i in icegridregistry icegridnode glacier2router; do
293         cp -a Ice-rpmbuild-%{version}/$i.redhat $RPM_BUILD_ROOT%{_initrddir}/$i
294 done
295 install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/icegrid
296
297 # "make install" assumes it's going into a directory under /opt.
298 # Move things to where they should be in an RPM setting (adapted from
299 # the original ZeroC srpm).
300 install -d $RPM_BUILD_ROOT%{_bindir}
301 mv $RPM_BUILD_ROOT/bin/* $RPM_BUILD_ROOT%{_bindir}
302 install -d $RPM_BUILD_ROOT%{_includedir}
303 mv $RPM_BUILD_ROOT/include/* $RPM_BUILD_ROOT%{_includedir}
304 install -d $RPM_BUILD_ROOT%{_libdir}
305 # There are a couple of files that end up installed in /lib, not %{_libdir},
306 # so we try this move too.
307 mv $RPM_BUILD_ROOT/%{_lib}/* $RPM_BUILD_ROOT%{_libdir}
308 mv $RPM_BUILD_ROOT/lib/* $RPM_BUILD_ROOT%{_libdir} || true
309 mv $RPM_BUILD_ROOT/help/IceGridAdmin $RPM_BUILD_ROOT%{_docdir}/Ice-%{version}
310
311 # Copy the man pages into the correct directory
312 install -d $RPM_BUILD_ROOT%{_mandir}/man1
313 #cp -a $RPM_BUILD_DIR/Ice-3.3.0-man-pages/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
314
315 # Fix the encoding and line-endings of all the IceGridAdmin documentation files
316 cd $RPM_BUILD_ROOT%{_docdir}/Ice-%{version}/IceGridAdmin
317 chmod a-x *
318 for f in *.js *.css; do
319         dos2unix $f
320 done
321 for f in helpman_topicinit.js icegridadmin_navigation.js IceGridAdmin_popup_html.js zoom_pageinfo.js; do
322         iconv -f ISO88591 -t UTF8 $f -o $f.tmp
323         mv $f.tmp $f
324 done
325 cd -
326
327 %if %{with dotnet}
328 # .NET spec files (for csharp-devel) -- convert the paths
329 for f in IceGrid Glacier2 IceBox Ice IceStorm IcePatch2; do
330         sed -i -e "s#/lib/#%{_libdir}/#" $RPM_BUILD_ROOT%{_libdir}/pkgconfig/$f.pc
331         sed -i -e "s#mono_root}/usr#mono_root}#" $RPM_BUILD_ROOT%{_libdir}/pkgconfig/$f.pc
332         mv $RPM_BUILD_ROOT%{_bindir}/$f.xml $RPM_BUILD_ROOT%{_libdir}/mono/gac/$f/%{version}.*/
333 done
334 %endif
335
336 %if %{with python}
337 %{__sed} -i -e '1s,/usr/bin/env python,%{__python},' $RPM_BUILD_ROOT/python/Ice.py
338 install -d $RPM_BUILD_ROOT%{py_sitedir}/Ice
339 mv $RPM_BUILD_ROOT/python/* $RPM_BUILD_ROOT%{py_sitedir}/Ice
340 cp -a Ice-rpmbuild-%{version}/ice.pth $RPM_BUILD_ROOT%{py_sitedir}
341 %endif
342
343 %if %{with ruby}
344 %{__sed} -i -e '1s,/usr/bin/env ruby,%{__ruby},' $RPM_BUILD_ROOT/ruby/*.rb
345 install -d $RPM_BUILD_ROOT%{ruby_sitearchdir}
346 mv $RPM_BUILD_ROOT/ruby/* $RPM_BUILD_ROOT%{ruby_sitearchdir}
347 %endif
348
349 %if %{with php}
350 # Put the PHP stuff into the right place
351 install -d $RPM_BUILD_ROOT%{_sysconfdir}/php.d
352 mv $RPM_BUILD_ROOT/ice.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.d
353 install -d $RPM_BUILD_ROOT%{php_extdir}
354 mv $RPM_BUILD_ROOT/php/IcePHP.so $RPM_BUILD_ROOT%{php_extdir}
355 install -d $RPM_BUILD_ROOT%{_datadir}/php
356 mv $RPM_BUILD_ROOT/php/* $RPM_BUILD_ROOT%{_datadir}/php
357 %endif
358
359 mv $RPM_BUILD_ROOT/config/* $RPM_BUILD_ROOT%{_datadir}/Ice
360 mv $RPM_BUILD_ROOT/slice $RPM_BUILD_ROOT%{_datadir}/Ice
361 # Somehow, some files under "slice" end up with executable permissions -- ??
362 find $RPM_BUILD_ROOT%{_datadir}/Ice -name "*.ice" | xargs chmod a-x
363
364 # Move the ImportKey.class file -- it'll be in %{_libdir} because of the moves earlier
365 mv $RPM_BUILD_ROOT%{_libdir}/ImportKey.class $RPM_BUILD_ROOT%{_datadir}/Ice
366
367 # Move the license files into the documentation directory
368 mv $RPM_BUILD_ROOT/ICE_LICENSE $RPM_BUILD_ROOT%{_docdir}/Ice-%{version}/ICE_LICENSE
369 mv $RPM_BUILD_ROOT/LICENSE $RPM_BUILD_ROOT%{_docdir}/Ice-%{version}/LICENSE
370 # Copy in the other files too
371 cp CHANGES RELEASE_NOTES  $RPM_BUILD_ROOT%{_docdir}/Ice-%{version}/
372
373 %clean
374 rm -rf $RPM_BUILD_ROOT
375
376 %post   -p /sbin/ldconfig
377 %postun -p /sbin/ldconfig
378
379 %files
380 %defattr(644,root,root,755)
381 %attr(755,root,root) %{_bindir}/dumpdb
382 %attr(755,root,root) %{_bindir}/glacier2router
383 %attr(755,root,root) %{_bindir}/icebox
384 %attr(755,root,root) %{_bindir}/iceboxadmin
385 %attr(755,root,root) %{_bindir}/iceca
386 %attr(755,root,root) %{_bindir}/icegridadmin
387 %attr(755,root,root) %{_bindir}/icegridnode
388 %attr(755,root,root) %{_bindir}/icegridregistry
389 %attr(755,root,root) %{_bindir}/icepatch2calc
390 %attr(755,root,root) %{_bindir}/icepatch2client
391 %attr(755,root,root) %{_bindir}/icepatch2server
392 %attr(755,root,root) %{_bindir}/icestormadmin
393 %attr(755,root,root) %{_bindir}/icestormmigrate
394 %attr(755,root,root) %{_bindir}/slice2cpp
395 %attr(755,root,root) %{_bindir}/slice2cs
396 %attr(755,root,root) %{_bindir}/slice2freeze
397 %attr(755,root,root) %{_bindir}/slice2freezej
398 %attr(755,root,root) %{_bindir}/slice2html
399 %attr(755,root,root) %{_bindir}/slice2java
400 %attr(755,root,root) %{_bindir}/slice2php
401 %attr(755,root,root) %{_bindir}/slice2py
402 %attr(755,root,root) %{_bindir}/slice2rb
403 %attr(755,root,root) %{_bindir}/transformdb
404 %attr(755,root,root) %{_libdir}/libFreeze.so.3.4.0
405 %attr(755,root,root) %ghost %{_libdir}/libFreeze.so.34
406 %attr(755,root,root) %{_libdir}/libGlacier2.so.3.4.0
407 %attr(755,root,root) %ghost %{_libdir}/libGlacier2.so.34
408 %attr(755,root,root) %{_libdir}/libIce.so.3.4.0
409 %attr(755,root,root) %ghost %{_libdir}/libIce.so.34
410 %attr(755,root,root) %{_libdir}/libIceBox.so.3.4.0
411 %attr(755,root,root) %ghost %{_libdir}/libIceBox.so.34
412 %attr(755,root,root) %{_libdir}/libIceDB.so.3.4.0
413 %attr(755,root,root) %ghost %{_libdir}/libIceDB.so.34
414 %attr(755,root,root) %{_libdir}/libIceGrid.so.3.4.0
415 %attr(755,root,root) %ghost %{_libdir}/libIceGrid.so.34
416 %attr(755,root,root) %{_libdir}/libIceGridFreezeDB.so.3.4.0
417 %attr(755,root,root) %ghost %{_libdir}/libIceGridFreezeDB.so.34
418 %attr(755,root,root) %{_libdir}/libIcePatch2.so.3.4.0
419 %attr(755,root,root) %ghost %{_libdir}/libIcePatch2.so.34
420 %attr(755,root,root) %{_libdir}/libIceSSL.so.3.4.0
421 %attr(755,root,root) %ghost %{_libdir}/libIceSSL.so.34
422 %attr(755,root,root) %{_libdir}/libIceStorm.so.3.4.0
423 %attr(755,root,root) %ghost %{_libdir}/libIceStorm.so.34
424 %attr(755,root,root) %{_libdir}/libIceStormFreezeDB.so.3.4.0
425 %attr(755,root,root) %ghost %{_libdir}/libIceStormFreezeDB.so.34
426 %attr(755,root,root) %{_libdir}/libIceStormService.so.3.4.0
427 %attr(755,root,root) %ghost %{_libdir}/libIceStormService.so.34
428 %attr(755,root,root) %{_libdir}/libIceUtil.so.3.4.0
429 %attr(755,root,root) %ghost %{_libdir}/libIceUtil.so.34
430 %attr(755,root,root) %{_libdir}/libIceXML.so.3.4.0
431 %attr(755,root,root) %ghost %{_libdir}/libIceXML.so.34
432 %attr(755,root,root) %{_libdir}/libSlice.so.3.4.0
433 %attr(755,root,root) %ghost %{_libdir}/libSlice.so.34
434 %{_datadir}/Ice
435
436 %files devel
437 %defattr(644,root,root,755)
438 %attr(755,root,root) %{_libdir}/libFreeze.so
439 %attr(755,root,root) %{_libdir}/libGlacier2.so
440 %attr(755,root,root) %{_libdir}/libIce.so
441 %attr(755,root,root) %{_libdir}/libIceBox.so
442 %attr(755,root,root) %{_libdir}/libIceDB.so
443 %attr(755,root,root) %{_libdir}/libIceGrid.so
444 %attr(755,root,root) %{_libdir}/libIceGridFreezeDB.so
445 %attr(755,root,root) %{_libdir}/libIcePatch2.so
446 %attr(755,root,root) %{_libdir}/libIceSSL.so
447 %attr(755,root,root) %{_libdir}/libIceStorm.so
448 %attr(755,root,root) %{_libdir}/libIceStormFreezeDB.so
449 %attr(755,root,root) %{_libdir}/libIceStormService.so
450 %attr(755,root,root) %{_libdir}/libIceUtil.so
451 %attr(755,root,root) %{_libdir}/libIceXML.so
452 %attr(755,root,root) %{_libdir}/libSlice.so
453 %{_includedir}/Freeze
454 %{_includedir}/Glacier2
455 %{_includedir}/Ice
456 %{_includedir}/IceBox
457 %{_includedir}/IceGrid
458 %{_includedir}/IcePatch2
459 %{_includedir}/IceSSL
460 %{_includedir}/IceStorm
461 %{_includedir}/IceUtil
462 %{_includedir}/IceXML
463 %{_includedir}/Slice
This page took 0.05314 seconds and 4 git commands to generate.