6a419c0
# This package contains macros that provide functionality relating to
6a419c0
# Software Collections. These macros are not used in default
6a419c0
# Fedora builds, and should not be blindly copied or enabled.
6a419c0
# Specifically, the "scl" macro must not be defined in official Fedora
6a419c0
# builds. For more information, see:
6a419c0
# http://docs.fedoraproject.org/en-US/Fedora_Contributor_Documentation
6a419c0
# /1/html/Software_Collections_Guide/index.html
6a419c0
%{!?scl:%global pkg_name %{name}}
6a419c0
%{?scl:%scl_package rubygem-%{gem_name}}
6a419c0
6a419c0
%global gem_name rkerberos
6a419c0
6a419c0
Summary: A Ruby interface for the the Kerberos library
6a419c0
Name: %{?scl_prefix}rubygem-%{gem_name}
6a419c0
0c6d4b8
Version: 0.1.5
b73b6f5
Release: 11%{?dist}
6a419c0
Group: Development/Languages
6a419c0
License: Artistic 2.0
6a419c0
URL: http://github.com/domcleal/rkerberos
6a419c0
Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem
b73b6f5
# Patch to compile with gcc8 + ruby 2.5 wrt rb_funcall argument num fix
b73b6f5
Patch0:  rkerberos-0.1.5-gcc8-argnum-fix.patch
6a419c0
b2a164a
%if 0%{?scl} || 0%{?fedora} > 20
6a419c0
Requires: %{?scl_prefix}ruby
6a419c0
Requires: %{?scl_prefix}rubygems
b2a164a
%endif
6a419c0
6a419c0
BuildRequires: %{?scl_prefix}ruby
6a419c0
BuildRequires: %{?scl_prefix}rubygems
6a419c0
BuildRequires: %{?scl_prefix}rubygems-devel
6a419c0
BuildRequires: %{?scl_prefix}ruby-devel
6a419c0
BuildRequires: krb5-devel
6a419c0
BuildRequires: %{?scl_prefix}rubygem-rake-compiler
6a419c0
b2a164a
%if 0%{?scl} || 0%{?fedora} > 20
6a419c0
Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}
b2a164a
%endif
6a419c0
6a419c0
#test
6a419c0
#BuildRequires: %{?scl_prefix}rubygem(test-unit)
6a419c0
#not yet in Fedora
6a419c0
#BuildRequires: %{?scl_prefix}rubygem(dbi-dbrc)
6a419c0
6a419c0
%description
6a419c0
The rkerberos library is an interface for the Kerberos 5 network
6a419c0
authentication protocol. It wraps the Kerberos C API.
6a419c0
6a419c0
%package doc
6a419c0
Summary: Documentation for rubygem-%{gem_name}
6a419c0
Group: Documentation
6a419c0
BuildArch: noarch
6a419c0
6a419c0
%description doc
6a419c0
This package contains documentation for rubygem-%{gem_name}.
6a419c0
6a419c0
6a419c0
6a419c0
%prep
6a419c0
%{?scl:scl enable %{scl} "}
6a419c0
gem unpack %{SOURCE0}
6a419c0
%{?scl:"}
6a419c0
6a419c0
%setup -q -D -T -n  %{gem_name}-%{version}
b73b6f5
%patch0 -p1
6a419c0
6a419c0
%{?scl:scl enable %{scl} "}
6a419c0
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
6a419c0
%{?scl:"}
6a419c0
6a419c0
%build
6a419c0
# Create the gem as gem install only works on a gem file
6a419c0
%{?scl:scl enable %{scl} "}
6a419c0
gem build %{gem_name}.gemspec
6a419c0
%{?scl:"}
6a419c0
6a419c0
%gem_install
6a419c0
6a419c0
%install
6a419c0
mkdir -p %{buildroot}%{gem_dir}
6a419c0
cp -pa .%{gem_dir}/* \
6a419c0
        %{buildroot}%{gem_dir}/
6a419c0
b2a164a
mkdir -p %{buildroot}%{gem_extdir_mri}
b2a164a
cp -a .%{gem_extdir_mri}/{gem.build_complete,*.so} %{buildroot}%{gem_extdir_mri}/
b2a164a
b2a164a
# Prevent dangling symlink in -debuginfo.
b2a164a
rm -rf %{buildroot}%{gem_instdir}/ext
6a419c0
6a419c0
rm -rf %{buildroot}%{gem_dir}/gems/%{gem_name}-%{version}/{ext,tmp}
6a419c0
rm -rf %{buildroot}%{gem_dir}/gems/%{gem_name}-%{version}/.yardoc
6a419c0
rm -rf %{buildroot}%{gem_dir}/gems/%{gem_name}-%{version}/Gemfile*
6a419c0
# rake-compiler isn't needed on the system itself
6a419c0
sed -i '/rake-compiler/ s/runtime/development/' %{buildroot}/%{gem_spec}
6a419c0
6a419c0
mkdir -p %{buildroot}%{_pkgdocdir}
6a419c0
for docfile in LICENSE README.md CHANGES MANIFEST; do
6a419c0
     mv %{buildroot}%{gem_instdir}/$docfile %{buildroot}%{_pkgdocdir}
6a419c0
     ln -s %{_pkgdocdir}/$docfile %{buildroot}%{gem_instdir}
6a419c0
done
6a419c0
6a419c0
%check
6a419c0
pushd ./%{gem_instdir}
6a419c0
# test do not work and many of them need functional keytab
6a419c0
# this need some work in upstream first
6a419c0
#testrb -v -Ilib -Itest test/test_*.rb
6a419c0
popd
6a419c0
6a419c0
%files
6a419c0
%doc %{_pkgdocdir}/README.md
6a419c0
%doc %{gem_instdir}/README.md
6a419c0
%doc %{_pkgdocdir}/LICENSE
6a419c0
%doc %{gem_instdir}/LICENSE
6a419c0
%{gem_extdir_mri}
6a419c0
%exclude %{gem_cache}
6a419c0
%{gem_spec}
6a419c0
6a419c0
%files doc
6a419c0
%doc %{_pkgdocdir}/README.md
6a419c0
%doc %{gem_instdir}/README.md
6a419c0
%doc %{_pkgdocdir}/LICENSE
6a419c0
%doc %{gem_instdir}/LICENSE
6a419c0
6a419c0
%doc %{_pkgdocdir}/CHANGES
6a419c0
%doc %{gem_instdir}/CHANGES
6a419c0
%doc %{_pkgdocdir}/MANIFEST
6a419c0
%doc %{gem_instdir}/MANIFEST
6a419c0
%doc %{gem_docdir}
6a419c0
%{gem_instdir}/rkerberos.gemspec
6a419c0
%{gem_instdir}/test
6a419c0
%{gem_instdir}/Rakefile
6a419c0
6a419c0
6a419c0
%changelog
b73b6f5
* Sun Feb 18 2018 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.1.5-11
b73b6f5
- Patch to compile with gcc8 + ruby25 wrt rb_funcall argument num fix
b73b6f5
37c366e
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.5-10
37c366e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
37c366e
ec0a920
* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 0.1.5-9
ec0a920
- Rebuilt for switch to libxcrypt
ec0a920
a4eb823
* Thu Jan 04 2018 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.1.5-8
a4eb823
- F-28: rebuild for ruby25
a4eb823
760be49
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.5-7
760be49
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
760be49
212b174
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.5-6
212b174
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
212b174
dad0756
* Tue Mar 07 2017 Vít Ondruch <vondruch@redhat.com> - 0.1.5-5
dad0756
- Remove compilation workarounds (rhbz#1412274).
dad0756
48f180b
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.5-4
48f180b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
48f180b
13b7719
* Wed Jan 25 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.1.5-3
13b7719
- Use GNU extension for compilar flag to avoid build failure on
13b7719
  ppc64{,le} wrt kerberos header (bug 1412274)
13b7719
427960e
* Thu Jan 12 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.1.5-2
427960e
- F-26: rebuild for ruby24
427960e
- add -D_DEFAULT_SOURCE for now
427960e
0c6d4b8
* Mon Oct 24 2016 Miroslav Suchý <msuchy@redhat.com> 0.1.5-1
0c6d4b8
- rebase to 0.1.5
097ae5c
7c9414f
* Thu Oct 22 2015 Miroslav Suchý <msuchy@redhat.com> 0.1.3-9
7c9414f
- rebuild due abi change of krb5 
cb47d8d
b2a164a
* Mon May 26 2014 Miroslav Suchý <msuchy@redhat.com> 0.1.3-4
b2a164a
- move so lib directly to gem_extdir_mri and remove provides and requires
b2a164a
  which are automaticaly generated
b2a164a
8e78e54
* Wed Nov 20 2013 Miroslav Suchý <msuchy@redhat.com> 0.1.3-3
8e78e54
- rebuild because of new krb-devel libraries 
8e78e54
6a419c0
* Mon Oct 21 2013 Miroslav Suchý <msuchy@redhat.com> 0.1.3-2
6a419c0
- 1001728 - remove deps of -doc subpackage on main package
6a419c0
6a419c0
* Sun Sep 08 2013 Miroslav Suchý <msuchy@redhat.com> 0.1.3-1
6a419c0
- rebase to 0.1.3 and move doc files to pkgdocdir
6a419c0
- 1001728 - use dist tag with question mark
6a419c0
6a419c0
* Tue Aug 27 2013 Miroslav Suchý <msuchy@redhat.com> 0.1.2-3
6a419c0
- fix files section
6a419c0
6a419c0
* Tue Aug 27 2013 Miroslav Suchý <msuchy@redhat.com> 0.1.2-2
6a419c0
- initial package
6a419c0
6a419c0
* Tue Jun 25 2013 Dominic Cleal <dcleal@redhat.com> 0.1.2-1
6a419c0
- Rebase to rkerberos 0.1.2 (dcleal@redhat.com)
6a419c0
6a419c0
* Thu May 23 2013 Dominic Cleal <dcleal@redhat.com> 0.1.1-4
6a419c0
- Remove rubygems version requirement (dcleal@redhat.com)
6a419c0
6a419c0
* Wed May 22 2013 Dominic Cleal <dcleal@redhat.com> 0.1.1-3
6a419c0
- Support building in non-SCL Ruby (dcleal@redhat.com)
6a419c0
6a419c0
* Tue May 21 2013 Martin Bačovský <mbacovsk@redhat.com> 0.1.1-2
6a419c0
- new package built with tito
6a419c0
- added support for SCL
6a419c0
6a419c0
6a419c0
* Wed May 08 2013 Dominic Cleal <dcleal@redhat.com> 0.1.1-1
6a419c0
- Update to 0.1.1 release
6a419c0
- Remove patch 103cea7d
6a419c0
6a419c0
* Wed May 08 2013 Dominic Cleal <dcleal@redhat.com> 0.1.0-1
6a419c0
- Initial 0.1.0 release
6a419c0
- Add patch 103cea7d (Add credential cache argument to get_init_creds_keytab)
6a419c0