diff options
author | Mark Spruiell <mes@zeroc.com> | 2014-04-30 22:12:10 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2014-04-30 22:12:10 +0000 |
commit | 0d3d379ddf11c7d51d11dad0e7149150ad8ecbc7 (patch) | |
tree | 91d303056cf3f9d6f43c4af2496973e45e3eef9e | |
parent | Fixed IceGrid tests Windows makefile (diff) | |
download | ice-0d3d379ddf11c7d51d11dad0e7149150ad8ecbc7.tar.bz2 ice-0d3d379ddf11c7d51d11dad0e7149150ad8ecbc7.tar.xz ice-0d3d379ddf11c7d51d11dad0e7149150ad8ecbc7.zip |
Amazon Linux RPM fixes
-rw-r--r-- | distribution/src/rpm/RPM_README | 15 | ||||
-rw-r--r-- | distribution/src/rpm/ice.spec | 59 | ||||
-rw-r--r-- | distribution/src/rpm/patch.Ice.3.5.1.amzn1-1 | 59 |
3 files changed, 116 insertions, 17 deletions
diff --git a/distribution/src/rpm/RPM_README b/distribution/src/rpm/RPM_README index 8ede962f62b..e274bdb0d7c 100644 --- a/distribution/src/rpm/RPM_README +++ b/distribution/src/rpm/RPM_README @@ -39,7 +39,7 @@ The gpg settings are only needed if you want to sign your RPMs. Replace "/home/rpmbuilder" with a path name that is appropriate for your system. -The value for %dist should be ".sles11" or ".el6". +The value for %dist should be ".sles11", ".el6" or ".amzn1". ====================================================================== @@ -47,8 +47,8 @@ The value for %dist should be ".sles11" or ".el6". ====================================================================== The RPM package build directory is /usr/src/packages on SLES. For -RHEL 6, create and use ~/rpmbuild. In this document we refer to the -package directory symbolically as <rpm-package>. +RHEL 6 and Amazon Linux, create and use ~/rpmbuild. In this document +we refer to the package directory symbolically as <rpm-package>. You may need to adjust the permissions on all subdirectories of this directory to be able to create RPMs as a non-root user. @@ -89,9 +89,10 @@ dependencies are listed below: - openssl-devel - jpackage-utils - python-devel - - bzip2-devel (RHEL) - - expat-devel (RHEL) - - php-devel (RHEL) + - bzip2-devel (RHEL/Amzn) + - expat-devel (RHEL/Amzn) + - php-devel (RHEL/Amzn) + - ruby18-devel (Amzn) - php5-devel (SLES) - mono-core (SLES) - mono-devel (SLES) @@ -169,7 +170,7 @@ $ find-jar proguard.jar Finally, build the RPMs as a non-root user. -On Red Hat Enterprise Linux: +On Red Hat Enterprise Linux and Amazon Linux: $ cd <rpm-package>/SPECS $ rpmbuild -bb --sign --target i386,noarch ice.spec diff --git a/distribution/src/rpm/ice.spec b/distribution/src/rpm/ice.spec index 50030dad175..078a83933eb 100644 --- a/distribution/src/rpm/ice.spec +++ b/distribution/src/rpm/ice.spec @@ -7,17 +7,18 @@ # # ********************************************************************** +%define ruby 0 +%define mono 0 + %if "%{dist}" == ".el6" %define ruby 1 - %define mono 0 -%else - %if "%{dist}" == ".sles11" - %define ruby 1 - %define mono 1 - %else - %define ruby 0 - %define mono 0 - %endif +%endif +%if "%{dist}" == ".amzn1" + %define ruby 1 +%endif +%if "%{dist}" == ".sles11" + %define ruby 1 + %define mono 1 %endif %define buildall 1 @@ -52,6 +53,7 @@ Group: System Environment/Libraries Vendor: ZeroC, Inc. URL: http://www.zeroc.com/ Source0: Ice-%{version}.tar.gz +Patch1: patch.Ice.3.5.1.amzn1-1 Source1: Ice-rpmbuild-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -98,6 +100,13 @@ BuildRequires: expat-devel >= 2.0.1 BuildRequires: php-devel >= 5.3.2 BuildRequires: python-devel >= 2.6.5 %endif +%if "%{dist}" == ".amzn1" +BuildRequires: bzip2-devel >= 1.0.6 +BuildRequires: expat-devel >= 2.0.1 +BuildRequires: php-devel >= 5.3.2 +BuildRequires: php-devel < 5.4 +BuildRequires: python-devel >= 2.6.5 +%endif %if "%{dist}" == ".sles11" BuildRequires: php53-devel >= 5.3.0 BuildRequires: python-devel >= 2.6.0 @@ -174,6 +183,9 @@ Requires(pre): pwdutils %if "%{dist}" == ".el6" Requires(pre): shadow-utils %endif +%if "%{dist}" == ".amzn1" +Requires(pre): shadow-utils +%endif # Requirements for the init.d services Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig @@ -210,7 +222,15 @@ Tools for developing Ice applications in C#. %package ruby Summary: The Ice run time for Ruby Group: System Environment/Libraries -Requires: ice-libs = %{version}-%{release}, ruby +Requires: ice-libs = %{version}-%{release} +# +# Amazon Linux 2014.03 defaults to Ruby 2.0 +# +%if "%{dist}" == ".amzn1" +Requires: ruby18 +%else +Requires: ruby +%endif %description ruby The Ice run time for Ruby. @@ -246,6 +266,9 @@ Requires: php53 %if "%{dist}" == ".el6" Requires: php %endif +%if "%{dist}" == ".amzn1" +Requires: php < 5.4 +%endif %description php The Ice run time for PHP. @@ -261,6 +284,7 @@ Tools for developing Ice applications in PHP. %if %{buildall} %setup -n Ice-%{version} -q +%patch1 -p1 -b .Ice.3.5.1.amzn1-1 %setup -q -n Ice-rpmbuild-%{version} -T -b 1 %endif @@ -384,6 +408,15 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/php mv $RPM_BUILD_ROOT/php/* $RPM_BUILD_ROOT%{_datadir}/php %endif +%if "%{dist}" == ".amzn1" +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/php.d +cp -p $RPM_BUILD_DIR/Ice-rpmbuild-%{version}/ice.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.d +mkdir -p $RPM_BUILD_ROOT%{_libdir}/php/modules +mv $RPM_BUILD_ROOT/php/IcePHP.so $RPM_BUILD_ROOT%{_libdir}/php/modules +mkdir -p $RPM_BUILD_ROOT%{_datadir}/php +mv $RPM_BUILD_ROOT/php/* $RPM_BUILD_ROOT%{_datadir}/php +%endif + %if "%{dist}" == ".sles11" mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/php5/conf.d cp -p $RPM_BUILD_DIR/Ice-rpmbuild-%{version}/ice.ini $RPM_BUILD_ROOT%{_sysconfdir}/php5/conf.d @@ -888,6 +921,12 @@ fi %config(noreplace) %{_sysconfdir}/php.d/ice.ini %endif +%if "%{dist}" == ".amzn1" +%{_datadir}/php +%{_libdir}/php/modules/IcePHP.so +%config(noreplace) %{_sysconfdir}/php.d/ice.ini +%endif + %if "%{dist}" == ".sles11" %{_datadir}/php5 %{_libdir}/php5/extensions diff --git a/distribution/src/rpm/patch.Ice.3.5.1.amzn1-1 b/distribution/src/rpm/patch.Ice.3.5.1.amzn1-1 new file mode 100644 index 00000000000..89452baec61 --- /dev/null +++ b/distribution/src/rpm/patch.Ice.3.5.1.amzn1-1 @@ -0,0 +1,59 @@ +*** Ice-3.5.1/php/src/IcePHP/Config.h.old 2014-04-24 17:23:45.270302373 +0000 +--- Ice-3.5.1/php/src/IcePHP/Config.h 2014-04-24 17:20:12.237119148 +0000 +*************** +*** 42,47 **** +--- 42,51 ---- + # pragma GCC diagnostic warning "-Wsign-compare" + #endif + ++ #if defined(__GNUC__) ++ # pragma GCC diagnostic warning "-Wnarrowing" ++ #endif ++ + #include "php.h" + + #ifdef _WIN32 +*** Ice-3.5.1/rb/config/Make.rules.old 2014-04-24 18:29:45.056527302 +0000 +--- Ice-3.5.1/rb/config/Make.rules 2014-04-24 20:36:38.342808981 +0000 +*************** +*** 72,77 **** +--- 72,79 ---- + else + RUBY_LIB = $(shell $(RUBY) -e 'require "rbconfig"; puts Config::expand("-l$$(RUBY_SO_NAME)-static")') + endif ++ ++ RUBY_LIBS = -L$(LIB_DIR) $(RUBY_LIB) + else + RUBY_MAJOR_VERSION = $(shell $(RUBY) -e 'require "rbconfig"; puts RbConfig::expand("$$(MAJOR)")') + RUBY_MINOR_VERSION = $(shell $(RUBY) -e 'require "rbconfig"; puts RbConfig::expand("$$(MINOR)")') +*************** +*** 86,104 **** + -I$(shell $(RUBY) -e 'require "rbconfig"; puts RbConfig::expand("$$(rubyhdrdir)/$$(arch)")') + endif + +! LIB_DIR = $(shell $(RUBY) -e 'require "rbconfig"; puts RbConfig::expand("$$(libdir)")') +! +! RUBY_SHARED = $(shell $(RUBY) -e 'require "rbconfig"; puts RbConfig::MAKEFILE_CONFIG["ENABLE_SHARED"]') +! +! ifeq ("$(RUBY_SHARED)","yes") +! RUBY_LIB = $(shell $(RUBY) -e 'require "rbconfig"; puts RbConfig::expand("-l$$(RUBY_SO_NAME)")') +! else +! RUBY_LIB = $(shell $(RUBY) -e 'require "rbconfig"; puts RbConfig::expand("-l$$(RUBY_SO_NAME)-static")') +! endif + endif + +- RUBY_LIBS = -L$(LIB_DIR) $(RUBY_LIB) +- + # + # The build architectures for gcc based builds. The format of these + # build flags are OS dependent. For example, under OS X to build +--- 88,96 ---- + -I$(shell $(RUBY) -e 'require "rbconfig"; puts RbConfig::expand("$$(rubyhdrdir)/$$(arch)")') + endif + +! RUBY_LIBS = $(shell $(RUBY) -e 'require "rbconfig"; puts RbConfig::expand("$$(LIBRUBYARG)")') + endif + + # + # The build architectures for gcc based builds. The format of these + # build flags are OS dependent. For example, under OS X to build |