Project

General

Profile

« Previous | Next » 

Revision 7b736e7c

Added by specs-from-koji (Jenkins) about 10 years ago

Update rubygem-rkerberos to 0.1.3-2.1.el6

- Support build on EL6
- 1001728 - remove deps of doc subpackage on main package
rebase to 0.1.3 and move doc files to pkgdocdir
- 1001728 - use dist tag with question mark
- fix files section
- initial package

View differences:

rpms/epel-6/rubygem-rkerberos/rubygem-rkerberos.spec
# This package contains macros that provide functionality relating to
# Software Collections. These macros are not used in default
# Fedora builds, and should not be blindly copied or enabled.
# Specifically, the "scl" macro must not be defined in official Fedora
# builds. For more information, see:
# http://docs.fedoraproject.org/en-US/Fedora_Contributor_Documentation
# /1/html/Software_Collections_Guide/index.html
%{!?scl:%global pkg_name %{name}}
%{?scl:%scl_package rubygem-%{gem_name}}
%global gem_name rkerberos
%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}}
%if !("%{?scl}" == "ruby193" || 0%{?rhel} > 6 || 0%{?fedora} > 16)
%define gem_dir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
%define gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}
%define gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem
%define gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}
%if 0%{?rhel} == 6 && 0%{!?scl:1}
%{!?gem_extdir_mri:%global gem_extdir_mri %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")}
%global gem_extdir_mri_lib %{gem_extdir_mri}
%else
%{!?gem_extdir_mri:%global gem_extdir_mri %{gem_extdir}}
%global gem_extdir_mri_lib %{gem_extdir_mri}/lib
%endif
%define version 0.1.2
%define release 1
%global gem_name rkerberos
Summary: A Ruby interface for the the Kerberos library
Name: %{?scl_prefix}rubygem-%{gem_name}
Version: %{version}
Release: %{release}%{dist}
Group: Development/Ruby
Version: 0.1.3
Release: 2.1%{?dist}
Group: Development/Languages
License: Artistic 2.0
URL: http://github.com/domcleal/rkerberos
Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem
BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-root
Requires: %{?scl_prefix}ruby
Requires: %{?scl_prefix}rubygems
BuildRequires: %{?scl_prefix}ruby
BuildRequires: %{?scl_prefix}rubygems
%if "%{?scl}" == "ruby193" || 0%{?rhel} > 6 || 0%{?fedora} > 16
BuildRequires: %{?scl_prefix}rubygems-devel
%endif
BuildRequires: %{?scl_prefix}ruby-devel
BuildRequires: krb5-devel
BuildRequires: %{?scl_prefix}rubygem-rake-compiler
#BuildRequires: %{?scl_prefix}rubygem-rake-compiler
Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}
#test
#BuildRequires: %{?scl_prefix}rubygem(test-unit)
#not yet in Fedora
#BuildRequires: %{?scl_prefix}rubygem(dbi-dbrc)
%description
The rkerberos library is an interface for the Kerberos 5 network
authentication protocol. It wraps the Kerberos C API.
......
%package doc
Summary: Documentation for rubygem-%{gem_name}
Group: Documentation
Requires: %{?scl_prefix}rubygem-%{gem_name} = %{version}-%{release}
BuildArch: noarch
%description doc
......
%prep
%setup -n %{pkg_name}-%{version} -q -T -c
%{?scl:scl enable %{scl} "}
gem unpack %{SOURCE0}
%{?scl:"}
%build
%setup -q -D -T -n %{gem_name}-%{version}
%{__rm} -rf %{buildroot}
mkdir -p ./%{gem_dir}
export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
%{?scl:scl enable %{scl} "}
gem install --local --install-dir ./%{gem_dir} -V --force %{SOURCE0}
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%{?scl:"}
%build
# Create the gem as gem install only works on a gem file
%{?scl:scl enable %{scl} "}
gem build %{gem_name}.gemspec
%{?scl:"}
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a ./%{gem_dir}/* %{buildroot}/%{gem_dir}
# .so is copied into lib/
cp -pa .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
mkdir -p %{buildroot}%{gem_extdir_mri_lib}
mv %{buildroot}%{gem_instdir}/lib/rkerberos.so %{buildroot}%{gem_extdir_mri_lib}
rm -rf %{buildroot}%{gem_dir}/gems/%{gem_name}-%{version}/{ext,tmp}
rm -rf %{buildroot}%{gem_dir}/gems/%{gem_name}-%{version}/.yardoc
rm -rf %{buildroot}%{gem_dir}/gems/%{gem_name}-%{version}/Gemfile*
# rake-compiler isn't needed on the system itself
sed -i '/rake-compiler/ s/runtime/development/' %{buildroot}/%{gem_dir}/specifications/%{gem_name}-%{version}.gemspec
sed -i '/rake-compiler/ s/runtime/development/' %{buildroot}/%{gem_spec}
%clean
%{__rm} -rf %{buildroot}
mkdir -p %{buildroot}%{_pkgdocdir}
for docfile in LICENSE README.md CHANGES MANIFEST; do
mv %{buildroot}%{gem_instdir}/$docfile %{buildroot}%{_pkgdocdir}
ln -s %{_pkgdocdir}/$docfile %{buildroot}%{gem_instdir}
done
%check
pushd ./%{gem_instdir}
# test do not work and many of them need functional keytab
# this need some work in upstream first
#testrb -v -Ilib -Itest test/test_*.rb
popd
%files
%defattr(-, root, root)
%doc %{_pkgdocdir}/README.md
%doc %{gem_instdir}/README.md
%doc %{gem_instdir}/CHANGES
%doc %{gem_instdir}/MANIFEST
%{gem_instdir}/lib/rkerberos.so
%{gem_instdir}/rkerberos.gemspec
%{gem_cache}
%{gem_dir}/specifications/%{gem_name}-%{version}.gemspec
%doc %{_pkgdocdir}/LICENSE
%doc %{gem_instdir}/LICENSE
%{gem_extdir_mri}
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{_pkgdocdir}/README.md
%doc %{gem_instdir}/README.md
%doc %{_pkgdocdir}/LICENSE
%doc %{gem_instdir}/LICENSE
%doc %{_pkgdocdir}/CHANGES
%doc %{gem_instdir}/CHANGES
%doc %{_pkgdocdir}/MANIFEST
%doc %{gem_instdir}/MANIFEST
%doc %{gem_docdir}
%{gem_instdir}/rkerberos.gemspec
%{gem_instdir}/test
%{gem_instdir}/Rakefile
%changelog
* Mon May 19 2014 Dominic Cleal <dcleal@redhat.com> 0.1.3-2.1
- Support build on EL6
* Mon Oct 21 2013 Miroslav Suchý <msuchy@redhat.com> 0.1.3-2
- 1001728 - remove deps of -doc subpackage on main package
* Sun Sep 08 2013 Miroslav Suchý <msuchy@redhat.com> 0.1.3-1
- rebase to 0.1.3 and move doc files to pkgdocdir
- 1001728 - use dist tag with question mark
* Tue Aug 27 2013 Miroslav Suchý <msuchy@redhat.com> 0.1.2-3
- fix files section
* Tue Aug 27 2013 Miroslav Suchý <msuchy@redhat.com> 0.1.2-2
- initial package
* Tue Jun 25 2013 Dominic Cleal <dcleal@redhat.com> 0.1.2-1
- Rebase to rkerberos 0.1.2 (dcleal@redhat.com)

Also available in: Unified diff