Blame SPECS/perl516.spec

f523ca
%global scl_name_base    perl
f523ca
%global scl_name_version 516
f523ca
%global scl %{scl_name_base}%{scl_name_version}
f523ca
%scl_package %scl
f523ca
f523ca
%global install_scl 1
f523ca
f523ca
# do not produce empty debuginfo package
f523ca
%global debug_package %{nil}
f523ca
f523ca
Summary: Package that installs %scl
f523ca
Name:    %scl_name
f523ca
Version: 1.1
f523ca
Release: 3%{?dist}
f523ca
License: GPLv2+
f523ca
Source0: macro-build
f523ca
Source1: perl.prov.stack
f523ca
Source2: perl.req.stack
f523ca
Source3: perl.attr
f523ca
Source4: perllib.attr
f523ca
Source5: README
f523ca
Source6: LICENSE
f523ca
BuildRequires: help2man
f523ca
f523ca
%if 0%{?install_scl}
f523ca
Requires: %{scl_prefix}perl
f523ca
%endif
f523ca
BuildRequires: scl-utils-build
f523ca
BuildRequires: iso-codes
f523ca
f523ca
%description
f523ca
This is the main package for %scl Software Collection.
f523ca
f523ca
%package runtime
f523ca
Summary:  Package that handles %scl Software Collection
f523ca
Requires: scl-utils
f523ca
f523ca
%description runtime
f523ca
Package shipping essential scripts to work with %scl Software Collection.
f523ca
f523ca
%package build
f523ca
Summary:  Package shipping basic build configuration
f523ca
Requires: scl-utils-build
f523ca
Requires: %{name}-scldevel = %{version}-%{release}
f523ca
f523ca
%description build
f523ca
Package shipping essential configuration macros to build %scl Software Collection.
f523ca
f523ca
%package scldevel
f523ca
Summary: Package shipping development files for %scl
f523ca
f523ca
%description scldevel
f523ca
Package shipping development files, especially usefull for development of
f523ca
packages depending on %scl Software Collection.
f523ca
f523ca
%prep
f523ca
%setup -c -T
f523ca
f523ca
# This section generates README file from a template and creates man page
f523ca
# from that file, expanding RPM macros in the template file.
f523ca
cat >README <<'EOF'
f523ca
%{expand:%(cat %{SOURCE5})}
f523ca
EOF
f523ca
f523ca
# copy the license file so %%files section sees it
f523ca
cp %{SOURCE6} .
f523ca
f523ca
%build
f523ca
# generate a helper script that will be used by help2man
f523ca
cat >h2m_helper <<'EOF'
f523ca
#!/bin/bash
f523ca
[ "$1" == "--version" ] && echo "%{scl_name} %{version} Software Collection" || cat README
f523ca
EOF
f523ca
chmod a+x h2m_helper
f523ca
f523ca
# generate the man page
f523ca
help2man -N --section 7 ./h2m_helper -o %{scl_name}.7
f523ca
f523ca
%install
f523ca
rm -rf %{buildroot}
f523ca
mkdir -p %{buildroot}%{_scl_scripts}/root
f523ca
cat >> %{buildroot}%{_scl_scripts}/enable << EOF
f523ca
export PATH=%{_bindir}\${PATH:+:\${PATH}}
f523ca
export LD_LIBRARY_PATH=%{_libdir}\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}}
f523ca
export MANPATH=%{_mandir}:\${MANPATH}
f523ca
EOF
f523ca
%scl_install
f523ca
f523ca
# Add the aditional macros to macros.%%{scl}-config
f523ca
cat %{SOURCE0} >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config
f523ca
sed -i 's|@SCL@|%{scl}|g' %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config
f523ca
f523ca
cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel << EOF
f523ca
%%scl_%{scl_name_base} %{scl}
f523ca
%%scl_prefix_%{scl_name_base} %{scl_prefix}
f523ca
EOF
f523ca
f523ca
install -D -m 755 %{SOURCE1} %{buildroot}%{_root_prefix}/lib/rpm/perl.prov.stack
f523ca
install -D -m 755 %{SOURCE2} %{buildroot}%{_root_prefix}/lib/rpm/perl.req.stack
f523ca
sed -i 's|__SCL_NAME__|%{scl}-perl|g' %{buildroot}%{_root_prefix}/lib/rpm/perl.prov.stack
f523ca
sed -i 's|__SCL_NAME__|%{scl}-perl|g' %{buildroot}%{_root_prefix}/lib/rpm/perl.req.stack
f523ca
f523ca
%if ( 0%{?rhel} && 0%{?rhel} < 7 )
f523ca
mkdir -p %{buildroot}/usr/lib/rpm/fileattrs/
f523ca
install -m 644 %{SOURCE3} %{buildroot}%{_root_prefix}/lib/rpm/fileattrs/perl.attr
f523ca
install -m 644 %{SOURCE4} %{buildroot}%{_root_prefix}/lib/rpm/fileattrs/perllib.attr
f523ca
%endif
f523ca
f523ca
# install generated man page
f523ca
mkdir -p %{buildroot}%{_mandir}/man7/
f523ca
install -m 644 %{scl_name}.7 %{buildroot}%{_mandir}/man7/%{scl_name}.7
f523ca
f523ca
%files
f523ca
f523ca
%files runtime -f filesystem
f523ca
%doc README LICENSE
f523ca
%scl_files
f523ca
%{_mandir}/man7/%{scl_name}.*
f523ca
f523ca
%files build
f523ca
%{_root_sysconfdir}/rpm/macros.%{scl}-config
f523ca
f523ca
%files scldevel
f523ca
%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel
f523ca
%{_root_prefix}/lib/rpm/perl.req.stack
f523ca
%{_root_prefix}/lib/rpm/perl.prov.stack
f523ca
%if ( 0%{?rhel} && 0%{?rhel} < 7 )
f523ca
%{_root_prefix}/lib/rpm/fileattrs/perl.attr
f523ca
%{_root_prefix}/lib/rpm/fileattrs/perllib.attr
f523ca
%endif
f523ca
f523ca
%changelog
f523ca
* Fri Mar 28 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.1-3
f523ca
- Wrong macro in README
f523ca
- Resolves: rhbz#1061453
f523ca
f523ca
* Tue Mar 25 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.1-2
f523ca
- Use "-f filesystem" for files section of -runtime on RHEL 7
f523ca
- Resolves: rhbz#1079938
f523ca
f523ca
* Mon Feb 17 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.1-1
f523ca
- Introduce README and LICENSE.
f523ca
- Change version to 1.1.
f523ca
- Resolves: rhbz#1061453
f523ca
f523ca
* Wed Feb 05 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1-21
f523ca
- Update dependencies of sub-package build
f523ca
- Resolves: rhbz#1063206
f523ca
f523ca
* Mon Jan 20 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1-20
f523ca
- Changed name of sub-package devel to scldevel
f523ca
- Added the file macros.%%{scl_name_base}-scldevel
f523ca
- Resolves: rhbz#1055580
f523ca
f523ca
* Mon Jan 20 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1-19
f523ca
- Rebuilt against new scl-utils
f523ca
- Resolves: rhbz#1054726
f523ca
f523ca
* Tue Jan 14 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1-18
f523ca
- Moved perl.(prov|req).stack and file*.attr to sub-package devel
f523ca
- Resolves: rhbz#1052183
f523ca
f523ca
* Wed Jan 08 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1-17
f523ca
- Define macros for tests sub-package
f523ca
- Resolves: rhbz#1049366
f523ca
f523ca
* Mon Nov 25 2013 Jitka Plesnikova <jplesnik@redhat.com> - 1-16
f523ca
- Disable macro perl_bootstrap
f523ca
f523ca
* Tue Nov 12 2013 Jitka Plesnikova <jplesnik@redhat.com> - 1-15
f523ca
- Enable macro perl_bootstrap
f523ca
f523ca
* Mon Nov 04 2013 Jitka Plesnikova <jplesnik@redhat.com> - 1-14
f523ca
- Override %%__pkgconfig_path to solve problems with invalid perl provides
f523ca
f523ca
* Wed Oct 30 2013 Jitka Plesnikova <jplesnik@redhat.com> - 1-13
f523ca
- Update %%scl_package_override
f523ca
f523ca
* Wed Oct 30 2013 Jitka Plesnikova <jplesnik@redhat.com> - 1-12
f523ca
- Define %%prep section
f523ca
- Create macro-build
f523ca
f523ca
* Mon Jun 17 2013 Jitka Plesnikova <jplesnik@redhat.com> - 1-11
f523ca
- Disable macro perl_bootstrap
f523ca
f523ca
* Thu May 23 2013 Jitka Plesnikova <jplesnik@redhat.com> - 1-10
f523ca
- Update definition of MANPATH (rhbz#966388)
f523ca
f523ca
* Tue May 21 2013 Jitka Plesnikova <jplesnik@redhat.com> - 1-9
f523ca
- Do not remove /opt/rh/perl516 to prevent removing of any user data
f523ca
f523ca
* Mon May 13 2013 Jitka Plesnikova <jplesnik@redhat.com> - 1-8
f523ca
- Remove the directory /opt/rh/perl516 after uninstalling rpm (rhbz#956215)
f523ca
f523ca
* Sun Apr 28 2013 Jitka Plesnikova <jplesnik@redhat.com> - 1-7
f523ca
- Remove extra colon from path definition
f523ca
f523ca
* Thu Apr 25 2013 Jitka Plesnikova <jplesnik@redhat.com> - 1-6
f523ca
- Update setting of environment variable in the script enable
f523ca
f523ca
* Wed Feb  6 2013 Jitka Plesnikova <jplesnik@redhat.com> 1-5
f523ca
- enable macro perl_bootstrap
f523ca
f523ca
* Fri Oct  5 2012 Marcela Mašláňová <mmaslano@redhat.com> 1-4
f523ca
- update to new version of Perl 5.16
f523ca
- package perl.{prov,req}.stack as executables
f523ca
f523ca
* Mon Jul 23 2012 Marcela Mašláňová <mmaslano@redhat.com> 1-3
f523ca
- change permission from 700 to 644 on perl.{prov,req}
f523ca
f523ca
* Tue Mar  6 2012 Marcela Mašláňová <mmaslano@redhat.com> 1.2
f523ca
- fix dependency on collection *-runtime
f523ca
f523ca
* Tue Dec 06 2011 Marcela Mašláňová <mmaslano@redhat.com> 1.1
f523ca
- initial packaging of meta perl514 package