Blame SPECS/rh-ror42.spec

f36522
%global scl_name_prefix rh-
f36522
%global scl_name_base ror
f36522
%global scl_name_version 42
f36522
f36522
%global scl %{scl_name_prefix}%{scl_name_base}%{scl_name_version}
f36522
f36522
# Fallback to rh-ruby23. rh-ruby23-scldevel is probably not available in
f36522
# the buildroot.
f36522
%{!?scl_ruby:%global scl_ruby rh-ruby23}
f36522
%{!?scl_prefix_ruby:%global scl_prefix_ruby %{scl_ruby}-}
f36522
f36522
# Fallback to rh-nodejs4 rh-nodejs4-scldevel is probably not available in
f36522
# the buildroot.
f36522
%{!?scl_nodejs:%global scl_nodejs rh-nodejs4}
f36522
%{!?scl_prefix_nodejs:%global scl_prefix_nodejs %{scl_nodejs}-}
f36522
f36522
# Do not produce empty debuginfo package.
f36522
%global debug_package %{nil}
f36522
f36522
# Support SCL over NFS.
f36522
%global nfsmountable 1
f36522
f36522
%{!?install_scl: %global install_scl 1}
f36522
f36522
%scl_package %scl
f36522
f36522
Summary: Package that installs %scl
f36522
Name: %scl_name
f36522
Version: 2.2
f36522
Release: 7%{?dist}
f36522
License: GPLv2+
f36522
Source0: README
f36522
Source1: LICENSE
f36522
f36522
%if 0%{?install_scl}
f36522
Requires: %{scl_prefix}rubygem-sqlite3
f36522
Requires: %{scl_prefix}rubygem-rails
f36522
Requires: %{scl_prefix}rubygem-sass-rails
f36522
Requires: %{scl_prefix}rubygem-coffee-rails
f36522
Requires: %{scl_prefix}rubygem-jquery-rails
f36522
Requires: %{scl_prefix}rubygem-sdoc
f36522
Requires: %{scl_prefix}rubygem-turbolinks
f36522
Requires: %{scl_prefix}rubygem-bcrypt
f36522
Requires: %{scl_prefix}rubygem-uglifier
f36522
Requires: %{scl_prefix}rubygem-jbuilder
f36522
Requires: %{scl_prefix}rubygem-spring
f36522
Requires: %{scl_prefix}rubygem-byebug
f36522
Requires: %{scl_prefix}rubygem-web-console
f36522
Requires: %{scl_prefix_nodejs}nodejs
f36522
%endif
f36522
BuildRequires: help2man
f36522
BuildRequires: scl-utils-build
f36522
BuildRequires: %{scl_prefix_ruby}scldevel
f36522
BuildRequires: %{scl_prefix_ruby}rubygems-devel
f36522
f36522
%description
f36522
This is the main package for %scl Software Collection.
f36522
f36522
%package runtime
f36522
Summary: Package that handles %scl Software Collection.
f36522
Requires: scl-utils
f36522
# enable scriptlet depends on ruby executable.
f36522
Requires: %{scl_prefix_ruby}ruby
f36522
f36522
%description runtime
f36522
Package shipping essential scripts to work with %scl Software Collection.
f36522
f36522
%package build
f36522
Summary: Package shipping basic build configuration
f36522
Requires: scl-utils-build
f36522
Requires: %{scl_runtime}
f36522
Requires: %{scl_prefix_ruby}scldevel
f36522
Requires: %{scl_prefix_nodejs}scldevel
f36522
f36522
%description build
f36522
Package shipping essential configuration macros to build %scl Software Collection.
f36522
f36522
%package scldevel
f36522
Summary: Package shipping development files for %scl
f36522
Provides: scldevel(%{scl_name_base})
f36522
f36522
%description scldevel
f36522
Package shipping development files, especially usefull for development of
f36522
packages depending on %scl Software Collection.
f36522
f36522
%prep
f36522
%setup -T -c
f36522
f36522
# Expand macros used in README file.
f36522
cat > README << EOF
f36522
%{expand:%(cat %{SOURCE0})}
f36522
EOF
f36522
f36522
cp %{SOURCE1} .
f36522
f36522
%build
f36522
# Generate a helper script that will be used by help2man.
f36522
cat > h2m_help << 'EOF'
f36522
#!/bin/bash
f36522
[ "$1" == "--version" ] && echo "%{scl_name} %{version} Software Collection" || cat README
f36522
EOF
f36522
chmod a+x h2m_help
f36522
f36522
# Generate the man page from include.h2m and ./h2m_help --help output.
f36522
help2man -N --section 7 ./h2m_help -o %{scl_name}.7
f36522
f36522
%install
f36522
%scl_install
f36522
f36522
cat >> %{buildroot}%{_scl_scripts}/enable << EOF
f36522
export PATH=%{_bindir}\${PATH:+:\${PATH}}
f36522
export LD_LIBRARY_PATH=%{_libdir}\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}}
f36522
export MANPATH=%{_mandir}:\${MANPATH}
f36522
export PKG_CONFIG_PATH=%{_libdir}/pkgconfig\${PKG_CONFIG_PATH:+:\${PKG_CONFIG_PATH}}
f36522
export GEM_PATH=\${GEM_PATH:=%{gem_dir}:\`scl enable %{scl_ruby} -- ruby -e "print Gem.path.join(':')"\`}
f36522
f36522
. scl_source enable %{scl_ruby}
f36522
EOF
f36522
f36522
cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel << EOF
f36522
%%scl_%{scl_name_base} %{scl}
f36522
%%scl_prefix_%{scl_name_base} %{scl_prefix}
f36522
EOF
f36522
f36522
# Install generated man page.
f36522
mkdir -p %{buildroot}%{_mandir}/man7/
f36522
install -p -m 644 %{scl_name}.7 %{buildroot}%{_mandir}/man7/
f36522
f36522
scl enable %{scl_ruby} - << \EOF
f36522
set -e
f36522
f36522
# Fake rh-ror42 SCL environment.
f36522
# TODO: Is there a way how to leverage the enable scriptlet created above?
f36522
GEM_PATH=%{gem_dir}:`ruby -e "print Gem.path.join(':')"` \
f36522
X_SCLS=%{scl} \
f36522
ruby -rfileutils > rubygems_filesystem.list << \EOR
f36522
  # Create RubyGems filesystem.
f36522
  Gem.ensure_gem_subdirectories '%{buildroot}%{gem_dir}'
f36522
  FileUtils.mkdir_p File.join '%{buildroot}', Gem.default_ext_dir_for('%{gem_dir}')
f36522
f36522
  # Output the relevant directories.
f36522
  puts Gem.default_dirs['%{scl}_system'.to_sym].values
f36522
EOR
f36522
EOF
f36522
f36522
%files
f36522
f36522
%files runtime -f rubygems_filesystem.list
f36522
%doc README LICENSE
f36522
%scl_files
f36522
# Own the manual directories (rhbz#1080036, rhbz#1072319).
f36522
%dir %{_mandir}/man1
f36522
%dir %{_mandir}/man5
f36522
%dir %{_mandir}/man7
f36522
%{_mandir}/man7/%{scl_name}.*
f36522
f36522
%files build
f36522
%{_root_sysconfdir}/rpm/macros.%{scl}-config
f36522
f36522
%files scldevel
f36522
%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel
f36522
f36522
%changelog
f36522
* Wed Apr 06 2016 Pavel Valena <pvalena@redhat.com> - 2.2-7
f36522
- Add rubygem-web-console do Requires
f36522
  - Resolves: rhbz#1317080
f36522
f36522
* Thu Mar 03 2016 Pavel Valena <pvalena@redhat.com> - 2.2-6
f36522
- Add rubygem-byebug to Requires
f36522
f36522
* Thu Mar 03 2016 Pavel Valena <pvalena@redhat.com> - 2.2-5
f36522
- Add nodejs to Requires
f36522
f36522
* Thu Mar 03 2016 Pavel Valena <pvalena@redhat.com> - 2.2-4
f36522
- Enable install_scl
f36522
f36522
* Thu Feb 25 2016 Pavel Valena <pvalena@redhat.com> - 2.2-3
f36522
- Add rh-nodejs4-scldevel to the Requires of build subpackage
f36522
f36522
* Sat Feb 20 2016 Pavel Valena <pvalena@redhat.com> - 2.2-2
f36522
- Fix path generation in Fake SCL environment
f36522
f36522
* Thu Dec 17 2015 Pavel Valena <pvalena@redhat.com> - 2.2-1
f36522
- Initial metapackage.