Blame SPECS/rh-ruby23.spec

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