Project

General

Profile

« Previous | Next » 

Revision 6bfa31ba

Added by Dominic Cleal about 8 years ago

Add tfm-runtime-assets subpackage

Separates the runtime requirement for v8 into a separate package and
enable file, which is added as a build dep to foreman. Removes the
requirement on the v8 collection runtime for regular foreman use.

View differences:

tfm/tfm.spec
Summary: Package that installs %scl
Name: %scl_name
Version: 3.0
Release: 2%{?dist}
Version: 3.1
Release: 1%{?dist}
License: GPLv2+
Group: Applications/File
Source0: README
......
# This should be removed as soon as scl-utils automatically generate
# dependencies on scl -runtime (rhbz#1054711).
Requires: %{scl_runtime}
Requires: %{scl_runtime}-assets
%if 0%{?install_scl}
Requires: %{scl_ror}
Requires: %{scl_ruby}
......
Requires: scl-utils
Requires: %{scl_prefix_ror}runtime
Requires: %{scl_prefix_ruby}runtime
Requires: %{scl_prefix_v8}runtime
Requires: %{_root_bindir}/scl_source
Requires(post): policycoreutils-python
Obsoletes: ruby193-ruby-wrapper
......
Provides dependencies for Foreman (http://theforeman.org/).
%package runtime-assets
Summary: Package that adds asset compilation for %scl Software Collection.
Group: Applications/File
Requires: %{scl_prefix}runtime
Requires: %{scl_prefix_v8}runtime
%description runtime-assets
Package shipping additional scripts to work with %scl Software Collection.
Provides additional asset compilation dependencies for Foreman
(http://theforeman.org/).
%package build
Summary: Package shipping basic build configuration
Group: Applications/File
Requires: scl-utils-build
Requires: %{scl_runtime}
Requires: %{scl_runtime}-assets
Requires: %{scl_prefix_ror}scldevel
Requires: %{scl_prefix_ruby}scldevel
Requires: %{scl_prefix_v8}scldevel
......
%scl_install
cat >> %{buildroot}%{_scl_scripts}/enable << EOF
. scl_source enable %{scl_ror} %{scl_v8}
. scl_source enable %{scl_ror}
if [ -e %{_scl_scripts}/enable_assets ]; then
. %{_scl_scripts}/enable_assets
fi
export PATH=%{_bindir}\${PATH:+:\${PATH}}
export LIBRARY_PATH=%{_libdir}dd\${LIBRARY_PATH:+:\${LIBRARY_PATH}}
......
export GEM_PATH=%{gem_dir}:\${GEM_PATH:+\${GEM_PATH}}\${GEM_PATH:-\`scl enable %{scl_ror} -- ruby -e "print Gem.path.join(':')"\`}
EOF
# enable asset compilation collections optionally, only if -runtime-assets is
# installed, to reduce deps for -runtime
cat >> %{buildroot}%{_scl_scripts}/enable_assets << EOF
. scl_source enable %{scl_v8}
EOF
# additional rpm macros for builds in the collection to set the vendor correctly
cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl_name}-config << EOF
%%scl_vendor %{scl_vendor}
......
%attr(755,-,-) %{_root_bindir}/%{scl_name}-ruby
%{_root_bindir}/ruby193-ruby
%files runtime-assets
%{_scl_scripts}/enable_assets
%files build
%doc LICENSE
%{_root_sysconfdir}/rpm/macros.%{scl}-config

Also available in: Unified diff