Blame SPECS/python33.spec

89fcd1
%global scl_name_base python
89fcd1
%global scl_name_version 33
89fcd1
%global scl %{scl_name_base}%{scl_name_version}
89fcd1
## General notes about python33 SCL packaging
89fcd1
# - the names of packages are NOT prefixed with 'python3-' (e.g. are the same as in Fedora)
89fcd1
# - the names of binaries of Python 3 itself are both python{-debug,...} and python3{-debug,...}
89fcd1
#   so both are usable in shebangs, the non-versioned binaries are preferred.
89fcd1
# - the names of other binaries are NOT prefixed with 'python3-'.
89fcd1
# - there are both macros in '3' variant and non-versioned variant, e.g. both %{__python}
89fcd1
#   and %{__python3} are available
89fcd1
89fcd1
%scl_package %scl
89fcd1
%global _turn_off_bytecompile 1
89fcd1
89fcd1
%global install_scl 1
89fcd1
89fcd1
# do not produce empty debuginfo package
89fcd1
%global debug_package %{nil}
89fcd1
89fcd1
Summary: Package that installs %scl
89fcd1
Name: %scl_name
89fcd1
Version: 1.1
89fcd1
Release: 13%{?dist}
89fcd1
License: GPLv2+
89fcd1
Source0: macros.additional.%{scl}
89fcd1
Source1: README
89fcd1
Source2: LICENSE
89fcd1
BuildRequires: help2man
89fcd1
# workaround for https://bugzilla.redhat.com/show_bug.cgi?id=857354
89fcd1
BuildRequires: iso-codes
89fcd1
BuildRequires: scl-utils-build
89fcd1
%if 0%{?install_scl}
89fcd1
Requires: %{scl_prefix}python
89fcd1
Requires: %{scl_prefix}python-jinja2
89fcd1
Requires: %{scl_prefix}python-nose
89fcd1
Requires: %{scl_prefix}python-simplejson
89fcd1
Requires: %{scl_prefix}python-setuptools
89fcd1
Requires: %{scl_prefix}python-sphinx
89fcd1
Requires: %{scl_prefix}python-sqlalchemy
89fcd1
Requires: %{scl_prefix}python-virtualenv
89fcd1
%endif
89fcd1
89fcd1
%description
89fcd1
This is the main package for %scl Software Collection.
89fcd1
89fcd1
%package runtime
89fcd1
Summary: Package that handles %scl Software Collection.
89fcd1
Requires: scl-utils
89fcd1
89fcd1
%description runtime
89fcd1
Package shipping essential scripts to work with %scl Software Collection.
89fcd1
89fcd1
%package build
89fcd1
Summary: Package shipping basic build configuration
89fcd1
Requires: scl-utils-build
89fcd1
89fcd1
%description build
89fcd1
Package shipping essential configuration macros to build %scl Software Collection.
89fcd1
89fcd1
%package scldevel
89fcd1
Summary: Package shipping development files for %scl
89fcd1
89fcd1
%description scldevel
89fcd1
Package shipping development files, especially usefull for development of
89fcd1
packages depending on %scl Software Collection.
89fcd1
89fcd1
%prep
89fcd1
%setup -T -c
89fcd1
89fcd1
# This section generates README file from a template and creates man page
89fcd1
# from that file, expanding RPM macros in the template file.
89fcd1
cat >README <<'EOF'
89fcd1
%{expand:%(cat %{SOURCE1})}
89fcd1
EOF
89fcd1
89fcd1
# copy the license file so %%files section sees it
89fcd1
cp %{SOURCE2} .
89fcd1
89fcd1
%build
89fcd1
# generate a helper script that will be used by help2man
89fcd1
cat >h2m_helper <<'EOF'
89fcd1
#!/bin/bash
89fcd1
[ "$1" == "--version" ] && echo "%{scl_name} %{version} Software Collection" || cat README
89fcd1
EOF
89fcd1
chmod a+x h2m_helper
89fcd1
89fcd1
# generate the man page
89fcd1
help2man -N --section 7 ./h2m_helper -o %{scl_name}.7
89fcd1
89fcd1
%install
89fcd1
rm -rf %{buildroot}
89fcd1
mkdir -p %{buildroot}%{_scl_scripts}/root
89fcd1
mkdir -p %{buildroot}%{_root_prefix}/lib/rpm/redhat
89fcd1
cat >> %{buildroot}%{_scl_scripts}/enable << EOF
89fcd1
export PATH=%{_bindir}\${PATH:+:\${PATH}}
89fcd1
export LD_LIBRARY_PATH=%{_libdir}\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}}
89fcd1
export MANPATH=%{_mandir}:\${MANPATH}
89fcd1
# For systemtap
89fcd1
export XDG_DATA_DIRS=%{_datadir}\${XDG_DATA_DIRS:+:\${XDG_DATA_DIRS}}
89fcd1
# For pkg-config
89fcd1
export PKG_CONFIG_PATH=%{_libdir}/pkgconfig\${PKG_CONFIG_PATH:+:\${PKG_CONFIG_PATH}}
89fcd1
EOF
89fcd1
%scl_install
89fcd1
89fcd1
# Add the aditional macros to macros.%%{scl}-config
89fcd1
cat %{SOURCE0} >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config
89fcd1
sed -i 's|@scl@|%{scl}|g' %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config
89fcd1
89fcd1
# Create the scldevel subpackage macros
89fcd1
cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel << EOF
89fcd1
%%scl_%{scl_name_base} %{scl}
89fcd1
%%scl_prefix_%{scl_name_base} %{scl_prefix}
89fcd1
EOF
89fcd1
89fcd1
# install generated man page
89fcd1
mkdir -p %{buildroot}%{_mandir}/man7/
89fcd1
install -m 644 %{scl_name}.7 %{buildroot}%{_mandir}/man7/%{scl_name}.7
89fcd1
89fcd1
%files
89fcd1
89fcd1
%files runtime -f filesystem
89fcd1
%doc README LICENSE
89fcd1
%scl_files
89fcd1
%{_mandir}/man7/%{scl_name}.*
89fcd1
89fcd1
%files build
89fcd1
%{_root_sysconfdir}/rpm/macros.%{scl}-config
89fcd1
89fcd1
%files scldevel
89fcd1
%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel
89fcd1
89fcd1
%changelog
89fcd1
* Mon Mar 31 2014 Honza Horak <hhorak@redhat.com> - 1.1-13
89fcd1
- Fix path typo in README
89fcd1
  Related: #1061458
89fcd1
89fcd1
* Thu Mar 20 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.1-12
89fcd1
- Use "-f filesystem for files section of -runtime on RHEL 7.
89fcd1
Resolves: rhbz#1072281
89fcd1
89fcd1
* Mon Feb 17 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.1-11
89fcd1
- Introduce README and LICENSE.
89fcd1
- Change version to 1.1.
89fcd1
Resolves: rhbz#1061458
89fcd1
89fcd1
* Wed Jan 22 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1-10
89fcd1
- Add scldevel subpackage.
89fcd1
Resolves: rhbz#1056415
89fcd1
89fcd1
* Mon Jan 20 2014 Tomas Radej <tradej@redhat.com> - 1-9
89fcd1
- Rebuilt with fixed scl-utils
89fcd1
Resolves: rhbz#1054734
89fcd1
89fcd1
* Mon Nov 25 2013 Robert Kuska <rkuska@redhat.com> - 1-8
89fcd1
- Add unversioned python macros for building depending packages
89fcd1
89fcd1
* Tue Nov 12 2013 Robert Kuska <rkuska@redhat.com> - 1-7
89fcd1
- Make building depending collections on top of python33 easier
89fcd1
- Add prep phase with setup macro because of rhel7 requirements
89fcd1
89fcd1
* Mon May 27 2013 Robert Kuska <rkuska@redhat.com> - 1-6
89fcd1
- Another fix of MANPATH (RHBZ #966393)
89fcd1
89fcd1
* Thu May 23 2013 Robert Kuska <rkuska@redhat.com> - 1-5
89fcd1
- Fix MANPATH (RHBZ #966393).
89fcd1
89fcd1
* Tue May 07 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 1-4
89fcd1
- Remove unneded rhel-5 specifics.
89fcd1
- Add some more dependencies to metapackage spec.
89fcd1
- Fix the enable scriptlet variable definition to be really secure.
89fcd1
- Move the rpm scripts to python-devel, so that possible depending
89fcd1
collections can use them as well.
89fcd1
89fcd1
* Thu Apr 11 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 1-3
89fcd1
- Define variables in enable scriptlets in a secure way (RHBZ #949000).
89fcd1
89fcd1
* Thu Jan 31 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 1-2
89fcd1
- Require the whole SCL on installation.
89fcd1
89fcd1
* Fri Dec 21 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1-1
89fcd1
- Initial package.