Blame SPECS/rh-ruby26.spec

656739
%global scl_name_prefix rh-
656739
%global scl_name_base ruby
656739
%global scl_name_version 26
656739
656739
# Do not produce empty debuginfo package.
656739
%global debug_package %{nil}
656739
656739
# Support SCL over NFS.
656739
%global nfsmountable 1
656739
656739
# nfsmountable macro must be defined before defining the %%scl_package macro
656739
%global scl %{scl_name_prefix}%{scl_name_base}%{scl_name_version}
656739
%scl_package %scl
656739
656739
%{!?install_scl: %global install_scl 1}
656739
656739
Summary: Package that installs %scl
656739
Name: %scl_name
656739
Version: 2.6
656739
Release: 1%{?dist}
656739
License: GPLv2+
656739
Source0: README
656739
Source1: LICENSE
656739
%if 0%{?install_scl}
656739
Requires: %{scl_prefix}ruby
656739
%endif
656739
BuildRequires: help2man
656739
BuildRequires: scl-utils-build
656739
656739
%description
656739
This is the main package for %scl Software Collection.
656739
656739
%package runtime
656739
Summary: Package that handles %scl Software Collection.
656739
Requires: scl-utils
656739
656739
%description runtime
656739
Package shipping essential scripts to work with %scl Software Collection.
656739
656739
%package build
656739
Summary: Package shipping basic build configuration
656739
Requires: scl-utils-build
656739
656739
%description build
656739
Package shipping essential configuration macros to build %scl Software Collection.
656739
656739
%package scldevel
656739
Summary: Package shipping development files for %scl
656739
656739
%description scldevel
656739
Package shipping development files, especially usefull for development of
656739
packages depending on %scl Software Collection.
656739
656739
%prep
656739
%setup -T -c
656739
656739
# Expand macros used in README file.
656739
cat > README << EOF
656739
%{expand:%(cat %{SOURCE0})}
656739
EOF
656739
656739
cp %{SOURCE1} .
656739
656739
%build
656739
# Generate a helper script that will be used by help2man.
656739
cat > h2m_help << 'EOF'
656739
#!/bin/bash
656739
[ "$1" == "--version" ] && echo "%{scl_name} %{version} Software Collection" || cat README
656739
EOF
656739
chmod a+x h2m_help
656739
656739
# Generate the man page from include.h2m and ./h2m_help --help output.
656739
help2man -N --section 7 ./h2m_help -o %{scl_name}.7
656739
656739
%install
656739
%scl_install
656739
656739
# Fix: install gem binaries to SCL PATH
656739
# https://bugzilla.redhat.com/show_bug.cgi?id=1225496
656739
perl -e 'while (<>) { if (/^([^=]*=["'\'']?)([^\$]*)(.*)/) { $pre = $1 ; $path = $2 ;
656739
  $post = $3 ; ($newpath = $path) =~ s/usr/usr\/local/ ; $newpath =~ s/://g ;
656739
  print "$pre$newpath:$path$post\n" }}' <<EOF >>%{buildroot}%{_scl_scripts}/enable
656739
export PATH=%{_bindir}\${PATH:+:\${PATH}}
656739
export LD_LIBRARY_PATH=%{_libdir}\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}}
656739
export MANPATH=%{_mandir}:\$MANPATH
656739
export PKG_CONFIG_PATH=%{_libdir}/pkgconfig\${PKG_CONFIG_PATH:+:\${PKG_CONFIG_PATH}}
656739
# For SystemTap.
656739
export XDG_DATA_DIRS=%{_datadir}:\${XDG_DATA_DIRS:-/usr/local/share:/usr/share}
656739
EOF
656739
656739
cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel << EOF
656739
%%scl_%{scl_name_base} %{scl}
656739
%%scl_prefix_%{scl_name_base} %{scl_prefix}
656739
EOF
656739
656739
# Install generated man page.
656739
mkdir -p %{buildroot}%{_mandir}/man7/
656739
install -p -m 644 %{scl_name}.7 %{buildroot}%{_mandir}/man7/
656739
656739
# Create directory for pkgconfig files, originally provided by pkgconfig
656739
# package, but not for SCL.
656739
mkdir -p %{buildroot}%{_libdir}/pkgconfig
656739
656739
# Create directory for license files (rhbz#1420233).
656739
%{?_licensedir:mkdir -p %{buildroot}%{_licensedir}}
656739
656739
%files
656739
656739
%files runtime
656739
%doc README LICENSE
656739
%scl_files
656739
%{?_licensedir:%dir %{_licensedir}}
656739
# Own the manual directories (rhbz#1073458, rhbz#1072319).
656739
%dir %{_mandir}/man1
656739
%dir %{_mandir}/man5
656739
%dir %{_mandir}/man7
656739
%dir %{_libdir}/pkgconfig
656739
%{_mandir}/man7/%{scl_name}.*
656739
656739
%files build
656739
%{_root_sysconfdir}/rpm/macros.%{scl}-config
656739
656739
%files scldevel
656739
%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel
656739
656739
%changelog
656739
* Mon Jan 07 2019 Vít Ondruch <vondruch@redhat.com> - 2.6-1
656739
- Update to 2.6.
656739
656739
* Fri Jan 05 2018 Jun Aruga <jaruga@redhat.com> - 2.5-2
656739
- Update to 2.5.
656739
656739
* Tue Feb 28 2017 Vít Ondruch <vondruch@redhat.com> - 2.4-2
656739
- Own the license directory.
656739
  Resolves: rhbz#1420233
656739
656739
* Tue Dec 13 2016 Vít Ondruch <vondruch@redhat.com> - 2.4-1
656739
- Initial package