Blame SPECS/v8314.spec

e9d4b2
%global scl_name_base v8
e9d4b2
%global scl_name_version 314
e9d4b2
 
e9d4b2
%global scl %{scl_name_base}%{scl_name_version}
e9d4b2
%scl_package %scl
e9d4b2
e9d4b2
%global install_scl 1
e9d4b2
e9d4b2
# do not produce empty debuginfo package
e9d4b2
%global debug_package %{nil}
e9d4b2
e9d4b2
Name:		%scl_name
d3b070
Version:	2.0
d3b070
Release:	11%{?dist}
e9d4b2
Summary:	%scl Software Collection
e9d4b2
License:	MIT
e9d4b2
Source0: 	LICENSE
e9d4b2
Source1:	README
e9d4b2
e9d4b2
%if %{?install_scl} > 0
e9d4b2
Requires: %{scl_prefix}gyp
e9d4b2
Requires: %{scl_prefix}v8
e9d4b2
Requires: %{scl_prefix}v8-devel
e9d4b2
Requires: %{scl_prefix}runtime
e9d4b2
%endif
e9d4b2
e9d4b2
BuildRequires:	scl-utils-build
e9d4b2
BuildRequires:  python-devel
e9d4b2
BuildRequires:  help2man
e9d4b2
e9d4b2
%description
e9d4b2
This is the main package for %scl Software Collection.
e9d4b2
e9d4b2
%package runtime
e9d4b2
Summary: Package that handles %scl Software Collection.
e9d4b2
Requires: scl-utils
e9d4b2
e9d4b2
%description runtime
e9d4b2
Package shipping essential scripts to work with %scl Software Collection.
e9d4b2
 
e9d4b2
%package build
e9d4b2
Summary: Package shipping basic build configuration
e9d4b2
Requires: scl-utils-build
e9d4b2
 
e9d4b2
%description build
e9d4b2
Package shipping essential configuration macros to build %scl Software Collection.
e9d4b2
e9d4b2
%package scldevel
e9d4b2
Summary: Package shipping development files for %scl
e9d4b2
Provides: scldevel(%{scl_name_base})
e9d4b2
e9d4b2
%description scldevel
e9d4b2
Package shipping development files, especially usefull for development of
e9d4b2
packages depending on %scl Software Collection.
e9d4b2
e9d4b2
%prep
e9d4b2
%setup -T -c
e9d4b2
# This section generates README file from a template and creates man page
e9d4b2
# from that file, expanding RPM macros in the template file.
e9d4b2
cat >README <<'EOF'
e9d4b2
%{expand:%(cat %{SOURCE1})}
e9d4b2
EOF
e9d4b2
e9d4b2
e9d4b2
%build
e9d4b2
# generate a helper script that will be used by help2man
e9d4b2
cat >h2m_helper <<'EOF'
e9d4b2
#!/bin/bash
d3b070
[ "$1" == "--version" ] && echo "%{scl_name} %{version} Software Collection" || cat README
e9d4b2
EOF
e9d4b2
e9d4b2
chmod a+x h2m_helper
e9d4b2
e9d4b2
# generate the man page
e9d4b2
help2man -N --section 7 ./h2m_helper -o %{scl_name}.7
e9d4b2
e9d4b2
%install
e9d4b2
rm -rf %{buildroot}
e9d4b2
%scl_install
e9d4b2
e9d4b2
# copy the license file so %%files section sees it
e9d4b2
cp %{SOURCE0} .
e9d4b2
e9d4b2
mkdir -p %{buildroot}%{_scl_scripts}/root
e9d4b2
cat >> %{buildroot}%{_scl_scripts}/enable << EOF
e9d4b2
export PATH=%{_bindir}\${PATH:+:\${PATH}} 
e9d4b2
export LD_LIBRARY_PATH=%{_libdir}\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}}
e9d4b2
export PYTHONPATH=%{_scl_root}%{python_sitelib}\${PYTHONPATH:+:\${PYTHONPATH}}
e9d4b2
export MANPATH=%{_mandir}:\$MANPATH
e9d4b2
export PKG_CONFIG_PATH=%{_libdir}/pkgconfig\${PKG_CONFIG_PATH:+:\${PKG_CONFIG_PATH}}
e9d4b2
export CPATH=%{_includedir}\${CPATH:+:\${CPATH}}
e9d4b2
export LIBRARY_PATH=%{_libdir}\${LIBRARY_PATH:+:\${LIBRARY_PATH}}
e9d4b2
EOF
e9d4b2
e9d4b2
cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel << EOF
e9d4b2
%%scl_%{scl_name_base} %{scl}
e9d4b2
%%scl_prefix_%{scl_name_base} %{scl_prefix}
e9d4b2
EOF
e9d4b2
e9d4b2
e9d4b2
# scl doesn't include this directory
e9d4b2
mkdir -p %{buildroot}%{_scl_root}%{python_sitelib}
e9d4b2
mkdir -p %{buildroot}%{_libdir}/pkgconfig
e9d4b2
e9d4b2
cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel << EOF
e9d4b2
%%scl_%{scl_name_base} %{scl}
e9d4b2
%%scl_prefix_%{scl_name_base} %{scl_prefix}
e9d4b2
EOF
e9d4b2
e9d4b2
# install generated man page
e9d4b2
mkdir -p %{buildroot}%{_mandir}/man7/
e9d4b2
install -m 644 %{scl_name}.7 %{buildroot}%{_mandir}/man7/%{scl_name}.7
e9d4b2
e9d4b2
%files
e9d4b2
e9d4b2
%files -f filesystem runtime
e9d4b2
%scl_files
e9d4b2
%doc README LICENSE
e9d4b2
%{_mandir}/man7/%{scl_name}.*
e9d4b2
 
e9d4b2
%files build
e9d4b2
%{_root_sysconfdir}/rpm/macros.%{scl}-config
e9d4b2
e9d4b2
%files scldevel
e9d4b2
%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel
e9d4b2
e9d4b2
%changelog
d3b070
* Mon Jan 05 2015 Tomas Hrcka <thrcka@redhat.com> - 2.0-11
d3b070
- RHSCL 2.0 release
d3b070
d3b070
* Thu Apr 03 2014 Tomas Hrcka <thrcka@redhat.com> - 1.1-10
d3b070
- Fix white space typo in README generation 
d3b070
e9d4b2
* Mon Mar 31 2014 Honza Horak <hhorak@redhat.com> - 1.1-9
e9d4b2
- Fix path typo in README
e9d4b2
  Related: #1061462
e9d4b2
e9d4b2
* Fri Mar 21 2014 Tomas Hrcka <thrcka@redhat.com> - 1.1-8
e9d4b2
- Add python_sitelib to the package
e9d4b2
- Enable %files -f filesystem to fix manpages ownership
e9d4b2
e9d4b2
* Thu Feb 13 2014 Tomas Hrcka <thrcka@redhat.com> - 1.1-7
e9d4b2
- Added Provides: scldevel(%{scl_name_base}) to scldevel subpackage
e9d4b2
e9d4b2
* Wed Feb 12 2014 Tomas Hrcka <thrcka@redhat.com> - 1.1-6
e9d4b2
- Define scl_name_base and scl_name_version macros
e9d4b2
e9d4b2
* Wed Feb 12 2014 Honza Horak <hhorak@redhat.com> - 1.1-5
e9d4b2
- Some more grammar fixes in README
e9d4b2
  Related: #1061462
e9d4b2
e9d4b2
* Wed Feb 12 2014 Tomas Hrcka <thrcka@redhat.com> - 1.1-4
e9d4b2
- Add README and LICENSE files
e9d4b2
- Add man page
e9d4b2
- Bump version to 1.1 
e9d4b2
e9d4b2
* Mon Jan 27 2014 Tomas Hrcka <thrcka@redhat.com> - 1-4
e9d4b2
- Add -scldevel sub-package.
e9d4b2
e9d4b2
* Thu Jan 23 2014 Tomas Hrcka <thrcka@redhat.com> - 1-5
e9d4b2
- Install collection packages as dependency(again)
e9d4b2
e9d4b2
* Tue Jan 21 2014 Tomas Hrcka <thrcka@redhat.com> - 1-4
e9d4b2
- Rebuild rhbz#1054255
e9d4b2
e9d4b2
* Mon Dec 16 2013 Tomas Hrcka <thrcka@redhat.com> - 1-3
e9d4b2
- Install collection packages as dependency
e9d4b2
e9d4b2
* Tue Nov 26 2013 Honza Horak <hhorak@redhat.com> - 1-2
e9d4b2
- Provide CPATH and LIBRARY_PATH in the enable scriptlet
e9d4b2
e9d4b2
* Tue Oct 29 2013 thrcka@redhat.com - 1-1
e9d4b2
- Initial version of the V8 Software Collection