]> git.pld-linux.org Git - packages/ice.git/blame - ice.spec
- bindings, based on fc cvs, still lots of todo
[packages/ice.git] / ice.spec
CommitLineData
5a9bdbd6
ER
1# TODO
2# - get stuff from fc spec
3# - cc/cflags
4# - language bindings
11130741
ER
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
5a9bdbd6
ER
14Summary: The Ice base runtime and services
15Name: ice
85d0fae0 16Version: 3.4.0
5a9bdbd6
ER
17Release: 0.1
18License: GPL v2 with exceptions (see ICE_LICENSE)
85d0fae0 19Group: Applications
5a9bdbd6 20Source0: http://www.zeroc.com/download/Ice/3.4/Ice-%{version}.tar.gz
85d0fae0 21# Source0-md5: 998b10627ade020cb00f5beb73efc0e0
11130741
ER
22# Extracted from http://zeroc.com/download/Ice/3.4/ice-3.4.0-1.src.rpm
23Source1: Ice-rpmbuild-%{version}.tar.gz
24# Source1-md5: 869cc60645e7e2b4115584a5ab17d1e9
25Source2: %{name}gridgui
26Source3: IceGridAdmin.desktop
5a9bdbd6 27URL: http://www.zeroc.com/
85d0fae0 28Patch0: %{name}-build.patch
11130741
ER
29Patch1: dont-build-demo-test.patch
30Patch2: java-build.patch
31Patch3: jgoodies.patch
5a9bdbd6 32BuildRequires: db-cxx-devel
11130741
ER
33%{?with_java:BuildRequires: db-java-devel}
34%{?with_java:BuildRequires: java-jgoodies-forms}
35%{?with_java:BuildRequires: java-jgoodies-looks}
85d0fae0 36BuildRequires: mcpp-devel
11130741
ER
37%{?with_php:BuildRequires: php-devel >= 3:5.0.0}
38BuildRequires: rpmbuild(macros) >= 1.519
5a9bdbd6
ER
39# drop these O/P if not needed
40Provides: Ice
41Obsoletes: Ice
11130741
ER
42# Ice doesn't officially support ppc64 at all; sparc64 doesnt have mono
43ExcludeArch: ppc64 sparc64
85d0fae0 44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
11130741
ER
46# Some file suffixes we need to grab the right stuff for the file lists
47%define soversion 34
48
85d0fae0 49%description
5a9bdbd6
ER
50Ice is a modern alternative to object middleware such as CORBA or
51COM/DCOM/COM+. It is easy to learn, yet provides a powerful network
52infrastructure for demanding technical applications. It features an
53object-oriented specification language, easy to use C++, C#, Java,
54Python, Ruby, PHP, and Visual Basic mappings, a highly efficient
55protocol, asynchronous method invocation and dispatch, dynamic
56transport plug-ins, TCP/IP and UDP/IP support, SSL-based security, a
57firewall solution, and much more.
85d0fae0 58
11130741
ER
59%package servers
60Summary: Ice services to run through /etc/rc.d/init.d
61Group: Development/Tools
62Requires(post): /sbin/chkconfig
63Requires(pre): shadow-utils
64Requires(preun): /sbin/chkconfig
65Requires(preun): /sbin/service
66Requires: %{name} = %{version}-%{release}
67
68%description servers
69Ice services to run through /etc/rc.d/init.d
70
85d0fae0 71%package devel
5a9bdbd6 72Summary: Tools for developing Ice applications in C++
85d0fae0 73Group: Development/Libraries
74Requires: %{name} = %{version}-%{release}
5a9bdbd6
ER
75# drop these O/P if not needed
76Provides: Ice-devel
77Obsoletes: Ice-devel
85d0fae0 78
79%description devel
5a9bdbd6 80Tools for developing Ice applications in C++.
85d0fae0 81
11130741
ER
82%package java
83Summary: The Ice runtime for Java
84Group: Libraries
85Requires: %{name} = %{version}-%{release}
86Requires: db4-java
87Requires: java >= 1.5.0
88
89%description java
90The Ice runtime for Java
91
92%package java-devel
93Summary: Tools for developing Ice applications in Java
94Group: Development/Tools
95Requires: ice-java = %{version}-%{release}
96
97%description java-devel
98Tools for developing Ice applications in Java.
99
100%package csharp
101Summary: IceGrid Admin Tool
102Summary: The Ice runtime for C#
103Group: Development/Tools
104Group: Libraries
105Requires: %{name} = %{version}-%{release}
106Requires: %{name} = %{version}-%{release}
107Requires: ice-java = %{version}-%{release}
108Requires: java
109Requires: jgoodies-forms
110Requires: jgoodies-looks
111Requires: jpackage-utils
112Requires: mono-core >= 1.2.2
113Provides: ice-dotnet = %{version}-%{release}
114Obsoletes: ice-dotnet < %{version}-%{release}
115
116%description csharp
117The Ice runtime for C#
118
119%package csharp-devel
120Summary: Tools for developing Ice applications in C#
121Group: Development/Tools
122Requires: ice-csharp = %{version}-%{release}
123Requires: pkgconfig
124
125%description csharp-devel
126Tools for developing Ice applications in C#.
127
128%package ruby
129Summary: The Ice runtime for Ruby applications
130Group: Development/Tools
131Requires: %{name} = %{version}-%{release}
132Requires: ruby(abi) = 1.8
133
134%description ruby
135The Ice runtime for Ruby applications.
136
137%package ruby-devel
138Summary: Tools for developing Ice applications in Ruby
139Group: Development/Tools
140Requires: ice-ruby = %{version}-%{release}
141
142%description ruby-devel
143Tools for developing Ice applications in Ruby.
144
145%package python
146Summary: The Ice runtime for Python applications
147Group: Development/Tools
148Requires: %{name} = %{version}-%{release}
149Requires: python >= 2.3.4
150
151%description python
152The Ice runtime for Python applications.
153
154%package python-devel
155Summary: Tools for developing Ice applications in Python
156Group: Development/Tools
157Requires: ice-python = %{version}-%{release}
158
159%description python-devel
160Tools for developing Ice applications in Python.
161
162%package php
163Summary: The Ice runtime for PHP applications
164Group: Libraries
165Requires: %{name} = %{version}-%{release}
166%{?requires_php_extension}
167
168%description php
169The Ice runtime for PHP applications.
170
171%package php-devel
172Summary: Tools for developing Ice applications in PHP
173Group: Development/Tools
174Requires: ice-php = %{version}-%{release}
175
176%description php-devel
177Tools for developing Ice applications in PHP.
178
85d0fae0 179%prep
11130741 180%setup -q -n Ice-%{version} -a 1
85d0fae0 181%patch0 -p0
11130741
ER
182%patch1 -p1
183%patch2 -p1
184%patch3 -p1
85d0fae0 185
186%build
11130741
ER
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
197export CLASSPATH=$(build-classpath db jgoodies-forms jgoodies-looks)
198
199# Rebuild the Java ImportKey class
200cd cpp/src/ca
201rm *.class
202javac ImportKey.java
203cd -
204
205%{__make} -C java \
206 CFLAGS="%{rpmcflags} -fPIC" \
207 CXXFLAGS="%{rpmcxxflags} -fPIC" \
208 embedded_runpath_prefix=""
209
210# Create the IceGrid icon
211cd java/resources/icons
212convert icegrid.ico temp.png
213mv temp-8.png icegrid.png
214rm temp*.png
215cd -
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
85d0fae0 246
247%install
248rm -rf $RPM_BUILD_ROOT
11130741 249install -d $RPM_BUILD_ROOT{%{_docdir}/Ice-%{version},%{_datadir}/Ice}
85d0fae0 250
251%{__make} install \
11130741
ER
252 prefix=$RPM_BUILD_ROOT \
253 GACINSTALL=yes \
254 GAC_ROOT=$RPM_BUILD_ROOT%{_libdir} \
255 embedded_runpath_prefix=""
85d0fae0 256
11130741
ER
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
264install -d $RPM_BUILD_ROOT%{_javadir}
265mv $RPM_BUILD_ROOT/lib/ant-ice.jar $RPM_BUILD_ROOT%{_javadir}/ant-ice-%{version}.jar
266ln -s ant-ice-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/ant-ice.jar
267mv $RPM_BUILD_ROOT/lib/Ice.jar $RPM_BUILD_ROOT%{_javadir}/Ice-%{version}.jar
268ln -s Ice-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/Ice.jar
269mv $RPM_BUILD_ROOT/lib/Freeze.jar $RPM_BUILD_ROOT%{_javadir}/Freeze-%{version}.jar
270ln -s Freeze-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/Freeze.jar
271%endif
272
273%if %{with gui}
274# Install the IceGrid GUI
275mv $RPM_BUILD_ROOT/lib/IceGridGUI.jar $RPM_BUILD_ROOT%{_datadir}/Ice
276install -d $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
277cp -a java/resources/icons/icegrid.png \
278 $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
279install -d $RPM_BUILD_ROOT%{_bindir}
280install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}
281install -d $RPM_BUILD_ROOT%{_desktopdir}
282cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
283%endif
284
285# Move other rpm-specific files into the right place (README, service stuff)
286cp -a Ice-rpmbuild-%{version}/ice.ini $RPM_BUILD_ROOT/ice.ini
287
288# Install the servers
289install -d $RPM_BUILD_ROOT%{_sysconfdir}
290cp -a Ice-rpmbuild-%{version}/*.conf $RPM_BUILD_ROOT%{_sysconfdir}
291install -d $RPM_BUILD_ROOT%{_initrddir}
292for i in icegridregistry icegridnode glacier2router; do
293 cp -a Ice-rpmbuild-%{version}/$i.redhat $RPM_BUILD_ROOT%{_initrddir}/$i
294done
295install -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).
300install -d $RPM_BUILD_ROOT%{_bindir}
301mv $RPM_BUILD_ROOT/bin/* $RPM_BUILD_ROOT%{_bindir}
302install -d $RPM_BUILD_ROOT%{_includedir}
303mv $RPM_BUILD_ROOT/include/* $RPM_BUILD_ROOT%{_includedir}
304install -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.
307mv $RPM_BUILD_ROOT/%{_lib}/* $RPM_BUILD_ROOT%{_libdir}
308mv $RPM_BUILD_ROOT/lib/* $RPM_BUILD_ROOT%{_libdir} || true
309mv $RPM_BUILD_ROOT/help/IceGridAdmin $RPM_BUILD_ROOT%{_docdir}/Ice-%{version}
310
311# Copy the man pages into the correct directory
312install -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
316cd $RPM_BUILD_ROOT%{_docdir}/Ice-%{version}/IceGridAdmin
317chmod a-x *
318for f in *.js *.css; do
319 dos2unix $f
320done
321for 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
324done
325cd -
326
327%if %{with dotnet}
328# .NET spec files (for csharp-devel) -- convert the paths
329for 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}.*/
333done
334%endif
335
336%if %{with python}
337%{__sed} -i -e '1s,/usr/bin/env python,%{__python},' $RPM_BUILD_ROOT/python/Ice.py
338install -d $RPM_BUILD_ROOT%{py_sitedir}/Ice
339mv $RPM_BUILD_ROOT/python/* $RPM_BUILD_ROOT%{py_sitedir}/Ice
340cp -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
345install -d $RPM_BUILD_ROOT%{ruby_sitearchdir}
346mv $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
351install -d $RPM_BUILD_ROOT%{_sysconfdir}/php.d
352mv $RPM_BUILD_ROOT/ice.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.d
353install -d $RPM_BUILD_ROOT%{php_extdir}
354mv $RPM_BUILD_ROOT/php/IcePHP.so $RPM_BUILD_ROOT%{php_extdir}
355install -d $RPM_BUILD_ROOT%{_datadir}/php
356mv $RPM_BUILD_ROOT/php/* $RPM_BUILD_ROOT%{_datadir}/php
357%endif
358
359mv $RPM_BUILD_ROOT/config/* $RPM_BUILD_ROOT%{_datadir}/Ice
5a9bdbd6 360mv $RPM_BUILD_ROOT/slice $RPM_BUILD_ROOT%{_datadir}/Ice
11130741
ER
361# Somehow, some files under "slice" end up with executable permissions -- ??
362find $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
365mv $RPM_BUILD_ROOT%{_libdir}/ImportKey.class $RPM_BUILD_ROOT%{_datadir}/Ice
366
367# Move the license files into the documentation directory
368mv $RPM_BUILD_ROOT/ICE_LICENSE $RPM_BUILD_ROOT%{_docdir}/Ice-%{version}/ICE_LICENSE
369mv $RPM_BUILD_ROOT/LICENSE $RPM_BUILD_ROOT%{_docdir}/Ice-%{version}/LICENSE
370# Copy in the other files too
371cp CHANGES RELEASE_NOTES $RPM_BUILD_ROOT%{_docdir}/Ice-%{version}/
85d0fae0 372
373%clean
374rm -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
5a9bdbd6 434%{_datadir}/Ice
85d0fae0 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.1532 seconds and 4 git commands to generate.