# TODO
-# - get stuff from fc spec
-# - cc/cflags
-# - language bindings
+# - finish (pldize) -servers package
#
# Conditional build:
-%bcond_without java # Java bindings
+%bcond_without gui # IceGrid GUI
%bcond_without dotnet # .NET bindings
+%bcond_with java # Java bindings (build requires X11 DISPLAY)
+%bcond_with php # PHP bindings
+%bcond_with default_php # build for default PHP
%bcond_without python # Python bindings
%bcond_without ruby # Ruby bindings
-%bcond_without php # PHP bindings
-%bcond_without gui # IceGrid GUI
+%if %{without java}
+%undefine with_gui
+%endif
+
+%ifarch x32
+%undefine with_dotnet
+%endif
+
+%if %{without default_php}
+%if "%{?php_suffix}" == ""
+%define php_suffix 55
+%endif
+%endif
+%define php_name php%{?php_suffix}
+
+%{?with_java:%include /usr/lib/rpm/macros.java}
Summary: The Ice base runtime and services
+Summary(pl.UTF-8): Podstawowy pakiet uruchomieniowy oraz usługowy Ice
Name: ice
-Version: 3.4.0
-Release: 0.2
+Version: 3.6.3
+Release: 3
License: GPL v2 with exceptions (see ICE_LICENSE)
Group: Applications
-Source0: http://www.zeroc.com/download/Ice/3.4/Ice-%{version}.tar.gz
-# Source0-md5: 998b10627ade020cb00f5beb73efc0e0
-# Extracted from http://zeroc.com/download/Ice/3.4/ice-3.4.0-1.src.rpm
+#Source0Download: https://github.com/zeroc-ice/ice/releases
+Source0: https://github.com/zeroc-ice/ice/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 88bf025890cdd8d1193a7155dc539671
+# Extracted from http://zeroc.com/download/Ice/3.6/rpm/el7/SRPMS/ice-3.6.3-1.el7.src.rpm
Source1: Ice-rpmbuild-%{version}.tar.gz
-# Source1-md5: 869cc60645e7e2b4115584a5ab17d1e9
-Source2: %{name}gridgui
-Source3: IceGridAdmin.desktop
+# Source1-md5: 38536c26981a5cdc9b57723bc28aea44
+Source3: %{name}gridgui
+Source4: IceGridAdmin.desktop
+Patch0: no-arch-opts.patch
+Patch1: csharp-build.patch
+Patch2: %{name}-db.patch
+Patch3: %{name}-php7.patch
URL: http://www.zeroc.com/
-Patch0: %{name}-build.patch
-Patch1: dont-build-demo-test.patch
-Patch2: java-build.patch
-%{?with_python:BuildRequires: rpm-pythonprov}
-%{?with_ruby:BuildRequires: ruby >= 1:1.8.6}
-Patch3: jgoodies.patch
+BuildRequires: bzip2-devel
BuildRequires: db-cxx-devel
-%{?with_java:BuildRequires: db-java-devel}
-%{?with_java:BuildRequires: java-jgoodies-forms}
-%{?with_java:BuildRequires: java-jgoodies-looks}
+BuildRequires: expat-devel
BuildRequires: mcpp-devel
-%{?with_php:BuildRequires: php-devel >= 3:5.0.0}
-BuildRequires: rpmbuild(macros) >= 1.519
-# drop these O/P if not needed
-Provides: Ice
-Obsoletes: Ice
-# Ice doesn't officially support ppc64 at all; sparc64 doesnt have mono
+BuildRequires: openssl-devel
+BuildRequires: rpmbuild(macros) >= 1.665
+%if %{with gui}
+BuildRequires: ImageMagick
+BuildRequires: ImageMagick-coder-png
+%endif
+%if %{with dotnet}
+BuildRequires: mono-csharp
+%endif
+%if %{with java}
+BuildRequires: ant
+BuildRequires: db-java-devel
+BuildRequires: java-jgoodies-common
+BuildRequires: java-jgoodies-forms
+BuildRequires: java-jgoodies-looks
+BuildRequires: jdk
+BuildRequires: jpackage-utils
+BuildRequires: rpm-javaprov
+%endif
+%if %{with php}
+BuildRequires: %{php_name}-devel >= 3:5.0.0
+%endif
+%if %{with python}
+BuildRequires: python-devel
+BuildRequires: rpm-pythonprov
+%endif
+%if %{with ruby}
+BuildRequires: rpm-rubyprov
+BuildRequires: ruby >= 1:1.8.6
+BuildRequires: ruby-devel
+%endif
+# Ice doesn't officially support ppc64 at all; sparc64 doesn't have mono
ExcludeArch: ppc64 sparc64
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
# Some file suffixes we need to grab the right stuff for the file lists
-%define soversion 34
+%define soversion 36
%description
Ice is a modern alternative to object middleware such as CORBA or
transport plug-ins, TCP/IP and UDP/IP support, SSL-based security, a
firewall solution, and much more.
-%package servers
-Summary: Ice services to run through /etc/rc.d/init.d
-Group: Development/Tools
-Requires(post): /sbin/chkconfig
-Requires(pre): shadow-utils
-Requires(preun): /sbin/chkconfig
-Requires(preun): /sbin/service
-Requires: %{name} = %{version}-%{release}
-
-%description servers
-Ice services to run through /etc/rc.d/init.d
+%description -l pl.UTF-8
+Ice to współczesna alternatywa dla pośredniej warstwy obiektowej,
+takiej jak CORBA lub COM/DCOM/COM+. Jest łatwy do nauczenia, a daje
+potężną infrastrukturę sieciową dla wymagających aplikacji
+technicznych. Ma zorientowany obiektowo język specyfikacji, łatwe do
+nauki odwzorowania w C++, C#, Javie, Pythonie, Rubym, PHP i Visual
+Basicu, bardzo wydajny protokół, asynchroniczne wywoływanie i
+ekspediowanie metod, dynamiczne wtyczki transportowe, obsługę TCP/IP
+oraz UDP/IP, szyfrowanie oparte na SSL, wbudowany firewall.
%package devel
Summary: Tools for developing Ice applications in C++
+Summary(pl.UTF-8): Narzędzia do tworzenia aplikacji Ice w C++
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
-# drop these O/P if not needed
-Provides: Ice-devel
-Obsoletes: Ice-devel
%description devel
Tools for developing Ice applications in C++.
-%package java
-Summary: The Ice runtime for Java
-Group: Libraries
-Requires: %{name} = %{version}-%{release}
-Requires: db4-java
-Requires: java >= 1.5.0
+%description devel -l pl.UTF-8
+Narzędzia do tworzenia aplikacji Ice w C++.
-%description java
-The Ice runtime for Java
-
-%package java-devel
-Summary: Tools for developing Ice applications in Java
+%package servers
+Summary: Ice services to run through /etc/rc.d/init.d
+Summary(pl.UTF-8): Usługi Ice do uruchamiania z poziomu /etc/rc.d/init.d
Group: Development/Tools
-Requires: ice-java = %{version}-%{release}
+Requires(post,preun): /sbin/chkconfig
+Requires: %{name} = %{version}-%{release}
+Requires: rc-scripts
+
+%description servers
+Ice services to run through /etc/rc.d/init.d.
-%description java-devel
-Tools for developing Ice applications in Java.
+%description servers -l pl.UTF-8
+Usługi Ice do uruchamiania z poziomu /etc/rc.d/init.d.
-%package csharp
+%package -n icegrid-gui
Summary: IceGrid Admin Tool
-Summary: The Ice runtime for C#
+Summary(pl.UTF-8): Narzędzie administracyjne IceGrid
Group: Development/Tools
-Group: Libraries
Requires: %{name} = %{version}-%{release}
+Requires: java-%{name} = %{version}-%{release}
+Requires: java-jgoodies-forms
+Requires: java-jgoodies-looks
+Requires: jpackage-utils
+
+%description -n icegrid-gui
+Graphical administration tool for IceGrid.
+
+%description -n icegrid-gui -l pl.UTF-8
+Graficzne narzędzie administracyjne do IceGrida.
+
+%package -n java-%{name}
+Summary: The Ice runtime for Java
+Summary(pl.UTF-8): Pakiet uruchomieniowy Ice dla Javy
+Group: Libraries/Java
Requires: %{name} = %{version}-%{release}
-Requires: ice-java = %{version}-%{release}
-Requires: java
-Requires: jgoodies-forms
-Requires: jgoodies-looks
+Requires: db-java
Requires: jpackage-utils
-Requires: mono-core >= 1.2.2
-Provides: ice-dotnet = %{version}-%{release}
-Obsoletes: ice-dotnet < %{version}-%{release}
-%description csharp
-The Ice runtime for C#
+%description -n java-%{name}
+The Ice runtime for Java.
-%package csharp-devel
-Summary: Tools for developing Ice applications in C#
-Group: Development/Tools
-Requires: ice-csharp = %{version}-%{release}
-Requires: pkgconfig
+%description -n java-%{name} -l pl.UTF-8
+Pakiet uruchomieniowy Ice dla Javy.
-%description csharp-devel
-Tools for developing Ice applications in C#.
+%package -n csharp-%{name}
+Summary: The Ice runtime for C#
+Summary(pl.UTF-8): Pakiet uruchomieniowy Ice dla C#
+Group: Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: mono >= 1.2.2
+
+%description -n csharp-%{name}
+The Ice runtime for C#.
+
+%description -n csharp-%{name} -l pl.UTF-8
+Pakiet uruchomieniowy Ice dla C#.
-%package ruby
+%package -n ruby-%{name}
Summary: The Ice runtime for Ruby applications
-Group: Development/Tools
-BuildRequires: ruby-modules
+Summary(pl.UTF-8): Pakiet uruchomieniowy Ice dla aplikacji w języku Ruby
+Group: Development/Languages
Requires: %{name} = %{version}-%{release}
-%{?ruby_mod_ver_requires_eq}
-%description ruby
+%description -n ruby-%{name}
The Ice runtime for Ruby applications.
-%package ruby-devel
-Summary: Tools for developing Ice applications in Ruby
-Group: Development/Tools
-Requires: ice-ruby = %{version}-%{release}
-
-%description ruby-devel
-Tools for developing Ice applications in Ruby.
+%description -n ruby-%{name} -l pl.UTF-8
+Pakiet uruchomieniowy Ice dla aplikacji w języku Ruby.
-%package python
+%package -n python-%{name}
Summary: The Ice runtime for Python applications
-Group: Development/Tools
+Summary(pl.UTF-8): Pakiet uruchomieniowy Ice dla aplikacji w Pythonie
+Group: Development/Languages/Python
Requires: %{name} = %{version}-%{release}
-Requires: python >= 2.3.4
+Requires: python >= 1:2.3.4
-%description python
+%description -n python-%{name}
The Ice runtime for Python applications.
-%package python-devel
-Summary: Tools for developing Ice applications in Python
-Group: Development/Tools
-Requires: ice-python = %{version}-%{release}
-
-%description python-devel
-Tools for developing Ice applications in Python.
+%description -n python-%{name} -l pl.UTF-8
+Pakiet uruchomieniowy Ice dla aplikacji w Pythonie.
-%package php
+%package -n %{php_name}-%{name}
Summary: The Ice runtime for PHP applications
-Group: Libraries
+Summary(pl.UTF-8): Pakiet uruchomieniowy Ice dla aplikacji w PHP
+Group: Development/Languages/PHP
Requires: %{name} = %{version}-%{release}
%{?requires_php_extension}
-%description php
+%description -n %{php_name}-%{name}
The Ice runtime for PHP applications.
-%package php-devel
-Summary: Tools for developing Ice applications in PHP
-Group: Development/Tools
-Requires: ice-php = %{version}-%{release}
-
-%description php-devel
-Tools for developing Ice applications in PHP.
+%description -n %{php_name}-%{name} -l pl.UTF-8
+Pakiet uruchomieniowy Ice dla aplikacji w PHP.
%prep
-%setup -q -n Ice-%{version} -a 1
-%patch0 -p0
+%setup -q -a1
+%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%if %{with java}
+# we nuke it only when we build new class later, as ice build system expects the file being around
+%{__rm} cpp/src/ca/ImportKey.class
+%endif
+
+# update path to our install
+%{__sed} -i -e 's,/usr/share/Ice-[0-9.]\+,%{_datadir}/Ice,' Ice-rpmbuild-*/icegridregistry.conf
+%{__sed} -i -e 's,ln -s Ice-\$(VERSION)/slice,ln -s Ice/slice,' config/Make.common.rules
+%{__sed} -i -e 's,ln -s \.\./Ice-\$(VERSION)/slice,ln -s ../Ice/slice,' config/Make.common.rules
+
+%{__sed} -i -e '1s,/usr/bin/env python,%{__python},' cpp/config/upgradeicegrid36.py
+
%build
+%if %{with java}
+# Rebuild the Java ImportKey class - need it early for main cpp build
+javac cpp/src/ca/ImportKey.java
+%endif
-# Compile the main Ice runtime
-# TODO: CC/CXX passing as make param breaks build system
%{__make} -C cpp \
+ CC="%{__cc}" \
+ CXX="%{__cxx}" \
CFLAGS="%{rpmcflags} -fPIC" \
- CXXFLAGS="%{rpmcxxflags} -fPIC" \
- embedded_runpath_prefix=""
+ CXXFLAGS="%{rpmcxxflags} -fPIC -pthread" \
+ GCC_COMPILER=yes \
+%ifarch x32
+ lp64suffix=x32 \
+%endif
+ embedded_runpath=no
+
+%if %{with gui}
+# Create the IceGrid icon
+convert java/resources/icons/icegrid.ico temp.png
+%{__mv} temp-8.png java/resources/icons/icegrid.png
+%{__rm} temp*.png
+%endif
%if %{with java}
# Set the CLASSPATH correctly for the Java compile
export CLASSPATH=$(build-classpath db jgoodies-forms jgoodies-looks)
-# Rebuild the Java ImportKey class
-cd cpp/src/ca
-rm *.class
-javac ImportKey.java
-cd -
-
%{__make} -C java \
+ CC="%{__cc}" \
+ CXX="%{__cxx}" \
CFLAGS="%{rpmcflags} -fPIC" \
- CXXFLAGS="%{rpmcxxflags} -fPIC" \
- embedded_runpath_prefix=""
-
-# Create the IceGrid icon
-cd java/resources/icons
-convert icegrid.ico temp.png
-mv temp-8.png icegrid.png
-rm temp*.png
-cd -
+ CXXFLAGS="%{rpmcxxflags} -fPIC -pthread" \
+%ifarch x32
+ lp64suffix=x32 \
+%endif
+ embedded_runpath=no
%endif
%if %{with dotnet}
-%{__make} -C cs \
- CFLAGS="%{rpmcflags} -fPIC" \
- CXXFLAGS="%{rpmcxxflags} -fPIC" \
- embedded_runpath_prefix=""
+%{__make} -C csharp \
+ MCS=dmcs \
+%ifarch x32
+ lp64suffix=x32 \
+%endif
+ embedded_runpath=no
%endif
%if %{with python}
-%{__make} -C py \
+%{__make} -C python \
+ CC="%{__cc}" \
+ CXX="%{__cxx}" \
CFLAGS="%{rpmcflags} -fPIC" \
- CXXFLAGS="%{rpmcxxflags} -fPIC" \
- embedded_runpath_prefix=""
+ CXXFLAGS="%{rpmcxxflags} -fPIC -pthread" \
+%ifarch x32
+ lp64suffix=x32 \
+%endif
+ embedded_runpath=no
%endif
%if %{with ruby}
-%{__make} -C rb \
+%{__make} -C ruby \
+ CC="%{__cc}" \
+ CXX="%{__cxx}" \
CFLAGS="%{rpmcflags} -fPIC" \
- CXXFLAGS="%{rpmcxxflags} -fPIC" \
- embedded_runpath_prefix=""
+ CXXFLAGS="%{rpmcxxflags} -fPIC -pthread" \
+%ifarch x32
+ lp64suffix=x32 \
+%endif
+ embedded_runpath=no
%endif
%if %{with php}
%{__make} -C php \
PHP_HOME=%{_prefix} \
CFLAGS="%{rpmcflags} -fPIC" \
- CXXFLAGS="%{rpmcxxflags} -fPIC" \
- embedded_runpath_prefix=""
+ CXXFLAGS="%{rpmcxxflags} -fPIC -pthread" \
+%ifarch x32
+ lp64suffix=x32 \
+%endif
+ embedded_runpath=no
%endif
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_docdir}/Ice-%{version},%{_datadir}/Ice}
-%{__make} install \
- prefix=$RPM_BUILD_ROOT \
- GACINSTALL=yes \
- GAC_ROOT=$RPM_BUILD_ROOT%{_libdir} \
- embedded_runpath_prefix=""
+%{__make} -C cpp install \
+%ifarch x32
+ lp64suffix=x32 \
+%endif
+ SLICE_DIR_SYMLINK=yes \
+ DESTDIR=$RPM_BUILD_ROOT \
+ prefix=%{_prefix} \
+ install_configdir=%{_datadir}/Ice \
+ install_docdir=%{_datadir}/Ice \
+ install_slicedir=%{_datadir}/Ice/slice
%if %{with java}
%{__make} -C java install \
- prefix=$RPM_BUILD_ROOT \
- GACINSTALL=yes \
- GAC_ROOT=$RPM_BUILD_ROOT%{_libdir} \
- embedded_runpath_prefix=""
+%ifarch x32
+ lp64suffix=x32 \
+%endif
+ DESTDIR=$RPM_BUILD_ROOT \
+ prefix=%{_prefix} \
+ install_docdir=%{_datadir}/Ice \
+ install_slicedir=%{_datadir}/Ice/slice
+
# Move Java stuff where it should be
install -d $RPM_BUILD_ROOT%{_javadir}
-mv $RPM_BUILD_ROOT/lib/ant-ice.jar $RPM_BUILD_ROOT%{_javadir}/ant-ice-%{version}.jar
-ln -s ant-ice-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/ant-ice.jar
-mv $RPM_BUILD_ROOT/lib/Ice.jar $RPM_BUILD_ROOT%{_javadir}/Ice-%{version}.jar
+%{__mv} $RPM_BUILD_ROOT%{_prefix}/lib/Ice.jar $RPM_BUILD_ROOT%{_javadir}/Ice-%{version}.jar
ln -s Ice-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/Ice.jar
-mv $RPM_BUILD_ROOT/lib/Freeze.jar $RPM_BUILD_ROOT%{_javadir}/Freeze-%{version}.jar
+%{__mv} $RPM_BUILD_ROOT%{_prefix}/lib/Freeze.jar $RPM_BUILD_ROOT%{_javadir}/Freeze-%{version}.jar
ln -s Freeze-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/Freeze.jar
+
+# Register ant target
+install -d $RPM_BUILD_ROOT{%{_sysconfdir}/ant.d,%{_javadir}/ant}
+%{__mv} $RPM_BUILD_ROOT%{_prefix}/lib/ant-ice.jar $RPM_BUILD_ROOT%{_javadir}/ant/ant-ice-%{version}.jar
+ln -s ant-ice-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/ant/ant-ice.jar
+echo 'ice ant/ant-ice' > $RPM_BUILD_ROOT%{_sysconfdir}/ant.d/ice
%endif
%if %{with gui}
# Install the IceGrid GUI
-mv $RPM_BUILD_ROOT/lib/IceGridGUI.jar $RPM_BUILD_ROOT%{_datadir}/Ice
-install -d $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
-cp -a java/resources/icons/icegrid.png \
- $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
-install -d $RPM_BUILD_ROOT%{_bindir}
-install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}
-install -d $RPM_BUILD_ROOT%{_desktopdir}
-cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
+install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}}
+%{__mv} $RPM_BUILD_ROOT%{_prefix}/lib/IceGridGUI.jar $RPM_BUILD_ROOT%{_datadir}/Ice
+cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
+install -p %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}
+cp -a java/resources/icons/icegrid.png $RPM_BUILD_ROOT%{_pixmapsdir}
+%{__mv} $RPM_BUILD_ROOT%{_prefix}/help/IceGridAdmin $RPM_BUILD_ROOT%{_docdir}/Ice-%{version}
%endif
-# Move other rpm-specific files into the right place (README, service stuff)
-cp -a Ice-rpmbuild-%{version}/ice.ini $RPM_BUILD_ROOT/ice.ini
-
-# Install the servers
-install -d $RPM_BUILD_ROOT%{_sysconfdir}
-cp -a Ice-rpmbuild-%{version}/*.conf $RPM_BUILD_ROOT%{_sysconfdir}
-install -d $RPM_BUILD_ROOT%{_initrddir}
-for i in icegridregistry icegridnode glacier2router; do
- cp -a Ice-rpmbuild-%{version}/$i.redhat $RPM_BUILD_ROOT%{_initrddir}/$i
-done
-install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/icegrid
-
-# "make install" assumes it's going into a directory under /opt.
-# Move things to where they should be in an RPM setting (adapted from
-# the original ZeroC srpm).
-install -d $RPM_BUILD_ROOT%{_bindir}
-mv $RPM_BUILD_ROOT/bin/* $RPM_BUILD_ROOT%{_bindir}
-install -d $RPM_BUILD_ROOT%{_includedir}
-mv $RPM_BUILD_ROOT/include/* $RPM_BUILD_ROOT%{_includedir}
-install -d $RPM_BUILD_ROOT%{_libdir}
-# There are a couple of files that end up installed in /lib, not %{_libdir},
-# so we try this move too.
-mv $RPM_BUILD_ROOT/%{_lib}/* $RPM_BUILD_ROOT%{_libdir}
-mv $RPM_BUILD_ROOT/lib/* $RPM_BUILD_ROOT%{_libdir} || true
-mv $RPM_BUILD_ROOT/help/IceGridAdmin $RPM_BUILD_ROOT%{_docdir}/Ice-%{version}
-
-# Copy the man pages into the correct directory
-install -d $RPM_BUILD_ROOT%{_mandir}/man1
-#cp -a $RPM_BUILD_DIR/Ice-3.3.0-man-pages/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
-
-# Fix the encoding and line-endings of all the IceGridAdmin documentation files
-cd $RPM_BUILD_ROOT%{_docdir}/Ice-%{version}/IceGridAdmin
-chmod a-x *
-for f in *.js *.css; do
- dos2unix $f
-done
-for f in helpman_topicinit.js icegridadmin_navigation.js IceGridAdmin_popup_html.js zoom_pageinfo.js; do
- iconv -f ISO88591 -t UTF8 $f -o $f.tmp
- mv $f.tmp $f
-done
-cd -
-
%if %{with dotnet}
-# .NET spec files (for csharp-devel) -- convert the paths
-for f in IceGrid Glacier2 IceBox Ice IceStorm IcePatch2; do
- sed -i -e "s#/lib/#%{_libdir}/#" $RPM_BUILD_ROOT%{_libdir}/pkgconfig/$f.pc
- sed -i -e "s#mono_root}/usr#mono_root}#" $RPM_BUILD_ROOT%{_libdir}/pkgconfig/$f.pc
- mv $RPM_BUILD_ROOT%{_bindir}/$f.xml $RPM_BUILD_ROOT%{_libdir}/mono/gac/$f/%{version}.*/
-done
+install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
+%{__make} -C csharp install \
+%ifarch x32
+ lp64suffix=x32 \
+%endif
+ GACINSTALL=yes \
+ DESTDIR=$RPM_BUILD_ROOT \
+ prefix=%{_prefix} \
+ install_pkgconfigdir=%{_pkgconfigdir} \
+ install_docdir=%{_datadir}/Ice \
+ install_slicedir=%{_datadir}/Ice/slice
%endif
%if %{with python}
-%{__sed} -i -e '1s,/usr/bin/env python,%{__python},' $RPM_BUILD_ROOT/python/Ice.py
-install -d $RPM_BUILD_ROOT%{py_sitedir}/Ice
-mv $RPM_BUILD_ROOT/python/IcePy.so.*.*.* $RPM_BUILD_ROOT%{py_sitedir}/Ice/IcePy.so
-rm -f $RPM_BUILD_ROOT/python/IcePy.so*
-mv $RPM_BUILD_ROOT/python/* $RPM_BUILD_ROOT%{py_sitedir}/Ice
-cp -a Ice-rpmbuild-%{version}/ice.pth $RPM_BUILD_ROOT%{py_sitedir}
+%{__make} -C python install \
+%ifarch x32
+ lp64suffix=x32 \
+%endif
+ DESTDIR=$RPM_BUILD_ROOT \
+ prefix=%{_prefix} \
+ install_pythondir=%{py_sitedir} \
+ install_docdir=%{_datadir}/Ice \
+ install_slicedir=%{_datadir}/Ice/slice
+
+%{__mv} $RPM_BUILD_ROOT%{py_sitedir}/IcePy.so{.%{version},}
+%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/IcePy.so.*
+
%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
%py_comp $RPM_BUILD_ROOT%{py_sitedir}
%py_postclean
%endif
%if %{with ruby}
-%{__sed} -i -e '1s,/usr/bin/env ruby,%{__ruby},' $RPM_BUILD_ROOT/ruby/*.rb
-install -d $RPM_BUILD_ROOT%{ruby_sitearchdir}
-mv $RPM_BUILD_ROOT/ruby/IceRuby.so.*.*.* $RPM_BUILD_ROOT%{ruby_sitearchdir}/IceRuby.so
-rm -f $RPM_BUILD_ROOT/ruby/IceRuby.so*
-mv $RPM_BUILD_ROOT/ruby/* $RPM_BUILD_ROOT%{ruby_sitearchdir}
+%{__make} -C ruby install \
+%ifarch x32
+ lp64suffix=x32 \
+%endif
+ DESTDIR=$RPM_BUILD_ROOT \
+ prefix=%{_prefix} \
+ install_rubydir=%{ruby_vendorlibdir} \
+ install_libdir=%{ruby_vendorarchdir} \
+ install_docdir=%{_datadir}/Ice \
+ install_slicedir=%{_datadir}/Ice/slice
+
+%{__mv} $RPM_BUILD_ROOT%{ruby_vendorarchdir}/IceRuby.so{.%{version},}
+%{__rm} $RPM_BUILD_ROOT%{ruby_vendorarchdir}/IceRuby.so.*
%endif
%if %{with php}
-# Put the PHP stuff into the right place
-install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir},%{php_data_dir}}
-mv $RPM_BUILD_ROOT/ice.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
-mv $RPM_BUILD_ROOT/php/IcePHP.so $RPM_BUILD_ROOT%{php_extensiondir}
-mv $RPM_BUILD_ROOT/php/* $RPM_BUILD_ROOT%{php_data_dir}
+%{__make} -C php install \
+%ifarch x32
+ lp64suffix=x32 \
%endif
+ DESTDIR=$RPM_BUILD_ROOT \
+ prefix=%{_prefix} \
+ install_docdir=%{_datadir}/Ice \
+ install_slicedir=%{_datadir}/Ice/slice
-mv $RPM_BUILD_ROOT/config/* $RPM_BUILD_ROOT%{_datadir}/Ice
-mv $RPM_BUILD_ROOT/slice $RPM_BUILD_ROOT%{_datadir}/Ice
-# Somehow, some files under "slice" end up with executable permissions -- ??
-find $RPM_BUILD_ROOT%{_datadir}/Ice -name "*.ice" | xargs chmod a-x
+install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
+cp -a Ice-rpmbuild-*/ice.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
+%endif
-# Move the ImportKey.class file -- it'll be in %{_libdir} because of the moves earlier
-mv $RPM_BUILD_ROOT%{_libdir}/ImportKey.class $RPM_BUILD_ROOT%{_datadir}/Ice
+# packaged as %doc
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/Ice/{ICE_LICENSE,LICENSE}
-# Move the license files into the documentation directory
-mv $RPM_BUILD_ROOT/ICE_LICENSE $RPM_BUILD_ROOT%{_docdir}/Ice-%{version}/ICE_LICENSE
-mv $RPM_BUILD_ROOT/LICENSE $RPM_BUILD_ROOT%{_docdir}/Ice-%{version}/LICENSE
-# Copy in the other files too
-cp CHANGES RELEASE_NOTES $RPM_BUILD_ROOT%{_docdir}/Ice-%{version}/
+# Install the servers
+install -d $RPM_BUILD_ROOT%{_sysconfdir}
+cp -a Ice-rpmbuild-*/*.conf $RPM_BUILD_ROOT%{_sysconfdir}
+install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
+for i in icegridregistry icegridnode glacier2router; do
+ cp -a Ice-rpmbuild-*/$i.redhat $RPM_BUILD_ROOT/etc/rc.d/init.d/$i
+done
+install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/icegrid
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
-%post php
+%post -n %{php_name}-%{name}
%php_webserver_restart
-%postun php
+%postun -n %{php_name}-%{name}
if [ "$1" = 0 ]; then
%php_webserver_restart
fi
%files
%defattr(644,root,root,755)
+%doc ICE_LICENSE CHANGELOG*.md README.md
%attr(755,root,root) %{_bindir}/dumpdb
%attr(755,root,root) %{_bindir}/glacier2router
%attr(755,root,root) %{_bindir}/icebox
%attr(755,root,root) %{_bindir}/iceboxadmin
-%attr(755,root,root) %{_bindir}/iceca
%attr(755,root,root) %{_bindir}/icegridadmin
+%attr(755,root,root) %{_bindir}/icegriddb
%attr(755,root,root) %{_bindir}/icegridnode
%attr(755,root,root) %{_bindir}/icegridregistry
%attr(755,root,root) %{_bindir}/icepatch2calc
%attr(755,root,root) %{_bindir}/icepatch2client
%attr(755,root,root) %{_bindir}/icepatch2server
%attr(755,root,root) %{_bindir}/icestormadmin
+%attr(755,root,root) %{_bindir}/icestormdb
%attr(755,root,root) %{_bindir}/icestormmigrate
-%attr(755,root,root) %{_bindir}/transformdb
%attr(755,root,root) %{_bindir}/slice2html
+%attr(755,root,root) %{_bindir}/transformdb
+%{_mandir}/man1/dumpdb.1*
+%{_mandir}/man1/glacier2router.1*
+%{_mandir}/man1/icebox.1*
+%{_mandir}/man1/iceboxadmin.1*
+%{_mandir}/man1/icegridadmin.1*
+%{_mandir}/man1/icegriddb.1*
+%{_mandir}/man1/icegridnode.1*
+%{_mandir}/man1/icegridregistry.1*
+%{_mandir}/man1/icepatch2calc.1*
+%{_mandir}/man1/icepatch2client.1*
+%{_mandir}/man1/icepatch2server.1*
+%{_mandir}/man1/icestormadmin.1*
+%{_mandir}/man1/icestormdb.1*
+%{_mandir}/man1/icestormmigrate.1*
+%{_mandir}/man1/slice2html.1*
+%{_mandir}/man1/transformdb.1*
%attr(755,root,root) %{_libdir}/libFreeze.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libFreeze.so.%{soversion}
%attr(755,root,root) %{_libdir}/libGlacier2.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libGlacier2.so.%{soversion}
+%attr(755,root,root) %{_libdir}/libGlacier2CryptPermissionsVerifier.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libGlacier2CryptPermissionsVerifier.so.%{soversion}
%attr(755,root,root) %{_libdir}/libIce.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libIce.so.%{soversion}
%attr(755,root,root) %{_libdir}/libIceBox.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libIceBox.so.%{soversion}
-%attr(755,root,root) %{_libdir}/libIceDB.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libIceDB.so.%{soversion}
+%attr(755,root,root) %{_libdir}/libIceDiscovery.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libIceDiscovery.so.%{soversion}
%attr(755,root,root) %{_libdir}/libIceGrid.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libIceGrid.so.%{soversion}
-%attr(755,root,root) %{_libdir}/libIceGridFreezeDB.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libIceGridFreezeDB.so.%{soversion}
+%attr(755,root,root) %{_libdir}/libIceLocatorDiscovery.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libIceLocatorDiscovery.so.%{soversion}
%attr(755,root,root) %{_libdir}/libIcePatch2.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libIcePatch2.so.%{soversion}
%attr(755,root,root) %{_libdir}/libIceSSL.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libIceSSL.so.%{soversion}
%attr(755,root,root) %{_libdir}/libIceStorm.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libIceStorm.so.%{soversion}
-%attr(755,root,root) %{_libdir}/libIceStormFreezeDB.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libIceStormFreezeDB.so.%{soversion}
%attr(755,root,root) %{_libdir}/libIceStormService.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libIceStormService.so.%{soversion}
%attr(755,root,root) %{_libdir}/libIceUtil.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libIceXML.so.%{soversion}
%attr(755,root,root) %{_libdir}/libSlice.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libSlice.so.%{soversion}
-%{_datadir}/Ice
+%dir %{_datadir}/Ice
+%{_datadir}/Ice/slice
+%{_datadir}/Ice/icegrid-slice.*.ice.gz
+%{_datadir}/Ice/templates.xml
+%attr(755,root,root) %{_datadir}/Ice/upgradeicegrid36.py
+%{_datadir}/slice
-# XXX gui
+%if %{with gui}
+%files -n icegrid-gui
+%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/icegridgui
+%{_datadir}/Ice/IceGridGUI.jar
+%{_mandir}/man1/icegridgui.1*
%{_desktopdir}/IceGridAdmin.desktop
-%{_iconsdir}/hicolor/*/apps/icegrid.png
-
-# XXX doc
-%doc %{_docdir}/Ice-%{version}
+%{_pixmapsdir}/icegrid.png
+%endif
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/slice2cpp
%attr(755,root,root) %{_bindir}/slice2freeze
%attr(755,root,root) %{_libdir}/libFreeze.so
+%attr(755,root,root) %{_libdir}/libGlacier2CryptPermissionsVerifier.so
%attr(755,root,root) %{_libdir}/libGlacier2.so
-%attr(755,root,root) %{_libdir}/libIce.so
%attr(755,root,root) %{_libdir}/libIceBox.so
-%attr(755,root,root) %{_libdir}/libIceDB.so
+%attr(755,root,root) %{_libdir}/libIceDiscovery.so
%attr(755,root,root) %{_libdir}/libIceGrid.so
-%attr(755,root,root) %{_libdir}/libIceGridFreezeDB.so
+%attr(755,root,root) %{_libdir}/libIceLocatorDiscovery.so
%attr(755,root,root) %{_libdir}/libIcePatch2.so
+%attr(755,root,root) %{_libdir}/libIce.so
%attr(755,root,root) %{_libdir}/libIceSSL.so
-%attr(755,root,root) %{_libdir}/libIceStorm.so
-%attr(755,root,root) %{_libdir}/libIceStormFreezeDB.so
%attr(755,root,root) %{_libdir}/libIceStormService.so
+%attr(755,root,root) %{_libdir}/libIceStorm.so
%attr(755,root,root) %{_libdir}/libIceUtil.so
%attr(755,root,root) %{_libdir}/libIceXML.so
%attr(755,root,root) %{_libdir}/libSlice.so
%{_includedir}/IceSSL
%{_includedir}/IceStorm
%{_includedir}/IceUtil
-%{_includedir}/IceXML
%{_includedir}/Slice
+%{_mandir}/man1/slice2cpp.1*
+%{_mandir}/man1/slice2freeze.1*
+%if %{with java}
+%{_sysconfdir}/ant.d/ice
+%{_javadir}/ant/ant-ice-%{version}.jar
+%{_javadir}/ant/ant-ice.jar
+%endif
-# these pkgconfig files are for csharp, but we do not have separate -devel for csharp
+%if %{with dotnet}
%{_pkgconfigdir}/Glacier2.pc
%{_pkgconfigdir}/Ice.pc
%{_pkgconfigdir}/IceBox.pc
+%{_pkgconfigdir}/IceDiscovery.pc
%{_pkgconfigdir}/IceGrid.pc
+%{_pkgconfigdir}/IceLocatorDiscovery.pc
%{_pkgconfigdir}/IcePatch2.pc
+%{_pkgconfigdir}/IceSSL.pc
%{_pkgconfigdir}/IceStorm.pc
-
+%endif
# as we do not have -devel for each binding, these are in main -devel
# -csharp
%attr(755,root,root) %{_bindir}/slice2cs
+%{_mandir}/man1/slice2cs.1*
# -java
%attr(755,root,root) %{_bindir}/slice2freezej
%attr(755,root,root) %{_bindir}/slice2java
+%{_mandir}/man1/slice2freezej.1*
+%{_mandir}/man1/slice2java.1*
+# -js
+%attr(755,root,root) %{_bindir}/slice2js
+%{_mandir}/man1/slice2js.1*
# -php
%attr(755,root,root) %{_bindir}/slice2php
+%{_mandir}/man1/slice2php.1*
# -python
%attr(755,root,root) %{_bindir}/slice2py
-# -ruby
-%attr(755,root,root) %{_bindir}/slice2rb
+%{_mandir}/man1/slice2py.1*
%files servers
%defattr(644,root,root,755)
%attr(754,root,root) /etc/rc.d/init.d/icegridnode
%attr(754,root,root) /etc/rc.d/init.d/icegridregistry
-%files csharp
+%if %{with dotnet}
+%files -n csharp-%{name}
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/iceboxnet.exe
-%{_libdir}/mono/Glacier2
-%{_libdir}/mono/Ice
-%{_libdir}/mono/IceBox
-%{_libdir}/mono/IceGrid
-%{_libdir}/mono/IcePatch2
-%{_libdir}/mono/IceStorm
-%{_libdir}/mono/gac/Glacier2
-%{_libdir}/mono/gac/Ice
-%{_libdir}/mono/gac/IceBox
-%{_libdir}/mono/gac/IceGrid
-%{_libdir}/mono/gac/IcePatch2
-%{_libdir}/mono/gac/IceStorm
-
-%files python
+%{_mandir}/man1/iceboxnet.1*
+%{_prefix}/lib/mono/Glacier2
+%{_prefix}/lib/mono/Ice
+%{_prefix}/lib/mono/IceBox
+%{_prefix}/lib/mono/IceDiscovery
+%{_prefix}/lib/mono/IceGrid
+%{_prefix}/lib/mono/IceLocatorDiscovery
+%{_prefix}/lib/mono/IcePatch2
+%{_prefix}/lib/mono/IceSSL
+%{_prefix}/lib/mono/IceStorm
+
+%{_prefix}/lib/mono/gac/Glacier2
+%{_prefix}/lib/mono/gac/Ice
+%{_prefix}/lib/mono/gac/IceBox
+%{_prefix}/lib/mono/gac/IceDiscovery
+%{_prefix}/lib/mono/gac/IceGrid
+%{_prefix}/lib/mono/gac/IceLocatorDiscovery
+%{_prefix}/lib/mono/gac/IcePatch2
+%{_prefix}/lib/mono/gac/IceSSL
+%{_prefix}/lib/mono/gac/IceStorm
+
+%{_prefix}/lib/mono/gac/policy.3.6.Glacier2
+%{_prefix}/lib/mono/gac/policy.3.6.Ice
+%{_prefix}/lib/mono/gac/policy.3.6.IceBox
+%{_prefix}/lib/mono/gac/policy.3.6.IceDiscovery
+%{_prefix}/lib/mono/gac/policy.3.6.IceGrid
+%{_prefix}/lib/mono/gac/policy.3.6.IceLocatorDiscovery
+%{_prefix}/lib/mono/gac/policy.3.6.IcePatch2
+%{_prefix}/lib/mono/gac/policy.3.6.IceSSL
+%{_prefix}/lib/mono/gac/policy.3.6.IceStorm
+%endif
+
+%if %{with python}
+%files -n python-%{name}
%defattr(644,root,root,755)
-%{py_sitedir}/ice.pth
-%dir %{py_sitedir}/Ice
-%dir %{py_sitedir}/Ice/IceBox
-%dir %{py_sitedir}/Ice/IceGrid
-%dir %{py_sitedir}/Ice/IcePatch2
-%dir %{py_sitedir}/Ice/IceStorm
-%{py_sitedir}/Ice/*.py[co]
-%{py_sitedir}/Ice/IceBox/*.py[co]
-%{py_sitedir}/Ice/IceGrid/*.py[co]
-%{py_sitedir}/Ice/IcePatch2/*.py[co]
-%{py_sitedir}/Ice/IceStorm/*.py[co]
-%attr(755,root,root) %{py_sitedir}/Ice/IcePy.so
-
-%files ruby
+%attr(755,root,root) %{py_sitedir}/IcePy.so
+%{py_sitedir}/IceBox
+%{py_sitedir}/IceGrid
+%{py_sitedir}/IceMX
+%{py_sitedir}/IcePatch2
+%{py_sitedir}/IceStorm
+%{py_sitedir}/Glacier2*.py[co]
+%{py_sitedir}/Ice.py[co]
+%{py_sitedir}/IceBox*.py[co]
+%{py_sitedir}/IceGrid*.py[co]
+%{py_sitedir}/IcePatch2*.py[co]
+%{py_sitedir}/IceStorm*.py[co]
+%{py_sitedir}/Ice_*.py[co]
+%endif
+
+%if %{with ruby}
+%files -n ruby-%{name}
%defattr(644,root,root,755)
-%{ruby_sitearchdir}/Glacier2.rb
-%{ruby_sitearchdir}/Glacier2
-%{ruby_sitearchdir}/Ice.rb
-%{ruby_sitearchdir}/Ice
-%{ruby_sitearchdir}/IceBox.rb
-%{ruby_sitearchdir}/IceBox
-%{ruby_sitearchdir}/IceGrid.rb
-%{ruby_sitearchdir}/IceGrid
-%{ruby_sitearchdir}/IcePatch2.rb
-%{ruby_sitearchdir}/IcePatch2
-%{ruby_sitearchdir}/IceStorm.rb
-%{ruby_sitearchdir}/IceStorm/IceStorm.rb
-%attr(755,root,root) %{ruby_sitearchdir}/IceRuby.so
-
-%files java
+%{ruby_vendorlibdir}/Glacier2.rb
+%{ruby_vendorlibdir}/Glacier2
+%{ruby_vendorlibdir}/Ice.rb
+%{ruby_vendorlibdir}/Ice
+%{ruby_vendorlibdir}/IceBox.rb
+%{ruby_vendorlibdir}/IceBox
+%{ruby_vendorlibdir}/IceGrid.rb
+%{ruby_vendorlibdir}/IceGrid
+%{ruby_vendorlibdir}/IcePatch2.rb
+%{ruby_vendorlibdir}/IcePatch2
+%{ruby_vendorlibdir}/IceStorm.rb
+%dir %{ruby_vendorlibdir}/IceStorm
+%{ruby_vendorlibdir}/IceStorm/IceStorm.rb
+%{ruby_vendorlibdir}/IceStorm/Metrics.rb
+%attr(755,root,root) %{ruby_vendorarchdir}/IceRuby.so
+%endif
+
+%if %{with java}
+%files -n java-%{name}
%defattr(644,root,root,755)
%{_javadir}/Freeze-%{version}.jar
%{_javadir}/Freeze.jar
%{_javadir}/Ice-%{version}.jar
%{_javadir}/Ice.jar
-%{_javadir}/ant-ice-%{version}.jar
-%{_javadir}/ant-ice.jar
+%endif
-%files php
+%if %{with php}
+%files -n %{php_name}-%{name}
%defattr(644,root,root,755)
%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/ice.ini
%attr(755,root,root) %{php_extensiondir}/IcePHP.so
%{php_data_dir}/IcePatch2
%{php_data_dir}/IceStorm.php
%{php_data_dir}/IceStorm
+%endif