%global scl_name_prefix zz- %global scl_name_base vagrant %global scl_name_version 2 %global scl %{scl_name_prefix}%{scl_name_base}%{scl_name_version} %scl_package %scl %{!?scl_ruby:%global scl_ruby rh-ruby27} %{!?scl_prefix_ruby:%global scl_prefix_ruby %{scl_ruby}-} # Do not produce empty debuginfo package. %global debug_package %{nil} %global install_scl 1 Summary: Package that installs %scl Name: %scl_name Version: 2.1 Release: 8%{?dist} License: GPLv2+ Source0: README Source1: LICENSE %if 0%{?install_scl} Requires: %{scl_prefix}vagrant Requires: %{scl_prefix}vagrant-libvirt Requires: %{scl_prefix}vagrant-sshfs Requires: %{scl_prefix}vagrant-guest-cygwin %endif BuildRequires: help2man BuildRequires: scl-utils-build BuildRequires: %{scl_prefix_ruby}scldevel BuildRequires: %{scl_prefix_ruby}rubygems-devel %description This is the main package for %scl Software Collection. %package runtime Summary: Package that handles %scl Software Collection. Requires: scl-utils Requires: %{scl_prefix_ruby}runtime %description runtime Package shipping essential scripts to work with %scl Software Collection. %package build Summary: Package shipping basic build configuration Requires: scl-utils-build Requires: %{scl_runtime} Requires: %{scl_prefix_ruby}scldevel %description build Package shipping essential configuration macros to build %scl Software Collection. %package scldevel Summary: Package shipping development files for %scl %description scldevel Package shipping development files, especially usefull for development of packages depending on %scl Software Collection. %prep %setup -T -c # Expand macros used in README file. cat > README << EOF %{expand:%(cat %{SOURCE0})} EOF cp %{SOURCE1} . %build # Generate a helper script that will be used by help2man. cat > h2m_help << 'EOF' #!/bin/bash [ "$1" == "--version" ] && echo "%{scl_name} %{version} Software Collection" || cat README EOF chmod a+x h2m_help # Generate the man page from include.h2m and ./h2m_help --help output. help2man -N --section 7 ./h2m_help -o %{scl_name}.7 %install %scl_install cat >> %{buildroot}%{_scl_scripts}/enable << EOF export PATH=%{_bindir}\${PATH:+:\${PATH}} export LD_LIBRARY_PATH=%{_libdir}\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}} export MANPATH=%{_mandir}:\${MANPATH} export PKG_CONFIG_PATH=%{_libdir}/pkgconfig\${PKG_CONFIG_PATH:+:\${PKG_CONFIG_PATH}} export GEM_PATH=%{gem_dir}:\${GEM_PATH:+\${GEM_PATH}}\${GEM_PATH:-\`scl enable %{scl_ruby} -- ruby -e "print Gem.path.join(':')"\`} . scl_source enable %{scl_ruby} EOF cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel << EOF %%scl_%{scl_name_base} %{scl} %%scl_prefix_%{scl_name_base} %{scl_prefix} EOF # Install generated man page. mkdir -p %{buildroot}%{_mandir}/man7/ install -p -m 644 %{scl_name}.7 %{buildroot}%{_mandir}/man7/ scl enable %{scl_ruby} - << \EOF # Fake vagrant1 SCL environment. # TODO: Is there a way how to leverage the enable scriptlet created above? GEM_PATH=%{gem_dir}:${GEM_PATH:+${GEM_PATH}}${GEM_PATH:-`ruby -e "print Gem.path.join(':')"`} \ X_SCLS=%{scl} \ ruby -rfileutils > rubygems_filesystem.list << \EOR # Create RubyGems filesystem. Gem.ensure_gem_subdirectories '%{buildroot}%{gem_dir}' FileUtils.mkdir_p File.join '%{buildroot}', Gem.default_ext_dir_for('%{gem_dir}') # Output the relevant directories. Gem.default_dirs[:"%{scl}_system"].each { |k, p| puts p } EOR EOF %files %files runtime -f rubygems_filesystem.list %doc README LICENSE %scl_files # Own the manual directories (rhbz#1080036, rhbz#1072319). %dir %{_mandir}/man1 %dir %{_mandir}/man5 %dir %{_mandir}/man7 %{_mandir}/man7/%{scl_name}.* %files build %{_root_sysconfdir}/rpm/macros.%{scl}-config %files scldevel %{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel %changelog * Tue Mar 29 2022 Zdenek Zambersky - 2.1-8 - Included sshfs and guest-cygwin plugins dependencies * Wed Jun 26 2019 Zdenek Zambersky - 2.1-7 - Created new collection * Mon Jun 13 2016 Pavel Valena - 2.1-6 - Install SCL with meta-package * Wed Jun 01 2016 Tomas Hrcka - 2.1.5 - Install collection with meta-package * Thu May 05 2016 Tomas Hrcka - 2.1-3 - Update rh-ror41 to rh-ror42 * Wed Sep 02 2015 Josef Stribny - 2.1-2 - Change prefix to sclo- * Thu Jul 30 2015 Vít Ondruch - 2.1-1 - Fix wrong SCL macros. - Resolves: rhbz#1248142 * Thu Jun 04 2015 Josef Stribny - 1.1-3 - Rename to rh-vagrant1, depend on rh-ruby22 and rh-ror41 * Mon Dec 15 2014 Josef Stribny - 1.1-2 - Install scl packages with meta package * Wed Oct 15 2014 Josef Stribny - 1.1-1 - Initial package