そこでrpmを独自に作成して管理したいケースが出てくる。
こちらに習いビルドしてみた。
http://nullpopopo.blogcube.info/2013/07/centos-ruby200rpm.html
EC_GROUP_new_curve_GF2m
というエラーが出てしまう。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ossl_pkey_ec.c: In function 'ossl_ec_group_initialize': | |
ossl_pkey_ec.c:766: warning: implicit declaration of function 'EC_GF2m_simple_method' | |
ossl_pkey_ec.c:766: warning: assignment makes pointer from integer without a cast | |
ossl_pkey_ec.c:821: error: 'EC_GROUP_new_curve_GF2m' undeclared (first use in this function) | |
ossl_pkey_ec.c:821: error: (Each undeclared identifier is reported only once | |
ossl_pkey_ec.c:821: error: for each function it appears in.) | |
make[2]: *** [ossl_pkey_ec.o] Error 1 | |
make[2]: Leaving directory `/root/rpm/BUILD/ruby-2.0.0-p247/ext/openssl' | |
make[1]: *** [ext/openssl/all] Error 2 | |
make[1]: Leaving directory `/root/rpm/BUILD/ruby-2.0.0-p247' | |
make: *** [build-ext] Error 2 |
ruby-2.0.0-p353.tar.gzに差し替えて、SPECファイルを書き換えた。
%define rubyver 2.0.0
%define rubyminorver p353
Name: ruby
Version: %{rubyver}%{rubyminorver}
Release: 2%{?dist}
License: Ruby License/GPL - see COPYING
URL: http://www.ruby-lang.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel gcc unzip openssl-devel db4-devel byacc make libyaml-devel
Source0: ftp://ftp.ruby-lang.org/pub/ruby/ruby-%{rubyver}-%{rubyminorver}.tar.gz
Summary: An interpreter of object-oriented scripting language
Group: Development/Languages
Provides: ruby(abi) = 2.0
Provides: ruby-irb
Provides: ruby-rdoc
Provides: ruby-libs
Provides: ruby-devel
Provides: rubygems
Obsoletes: ruby
Obsoletes: ruby-libs
Obsoletes: ruby-irb
Obsoletes: ruby-rdoc
Obsoletes: ruby-devel
Obsoletes: rubygems
%description
Ruby is the interpreted scripting language for quick and easy
object-oriented programming. It has many features to process text
files and to do system management tasks (as in Perl). It is simple,
straight-forward, and extensible.
%prep
%setup -n ruby-%{rubyver}-%{rubyminorver}
%build
export CFLAGS="$RPM_OPT_FLAGS -Wall -fno-strict-aliasing"
%configure \
--enable-shared \
--disable-rpath \
--without-X11 \
--without-tk \
--includedir=%{_includedir}/ruby \
--libdir=%{_libdir}
make %{?_smp_mflags}
%install
# installing binaries ...
make install DESTDIR=$RPM_BUILD_ROOT
#we don't want to keep the src directory
rm -rf $RPM_BUILD_ROOT/usr/src
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%{_bindir}
%{_includedir}
%{_datadir}
%{_libdir}
%define rubyminorver p353
だけ変更した。rpmbuildすれば、
ruby-2.0.0p353-2.el6.x86_64.rpm
ruby-debuginfo-2.0.0p353-2.el6.x86_64.rpm
が作成できる。
0 件のコメント:
コメントを投稿