|
|
9e2939 |
%global scl_name_prefix rh-
|
|
|
9e2939 |
%global scl_name_base varnish
|
|
|
9e2939 |
%global scl_name_version 6
|
|
|
9e2939 |
%global scl %{scl_name_prefix}%{scl_name_base}%{scl_name_version}
|
|
|
9e2939 |
%{!?nfsmountable: %global nfsmountable 1}
|
|
|
9e2939 |
%scl_package %scl
|
|
|
9e2939 |
|
|
|
9e2939 |
# do not produce empty debuginfo package
|
|
|
9e2939 |
%global debug_package %{nil}
|
|
|
9e2939 |
|
|
|
9e2939 |
Summary: Package that installs %scl
|
|
|
9e2939 |
Name: %scl_name
|
|
|
9e2939 |
Version: 4.1
|
|
|
a94221 |
Release: 6%{?dist}
|
|
|
9e2939 |
License: GPLv2+
|
|
|
9e2939 |
Group: Applications/File
|
|
|
9e2939 |
Source0: README
|
|
|
9e2939 |
Source1: LICENSE
|
|
|
9e2939 |
Source2: README.7
|
|
|
9e2939 |
|
|
|
9e2939 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
9e2939 |
BuildRequires: scl-utils-build
|
|
|
9e2939 |
# Temporary work-around
|
|
|
9e2939 |
BuildRequires: iso-codes
|
|
|
9e2939 |
BuildRequires: help2man
|
|
|
9e2939 |
|
|
|
9e2939 |
Requires: %{scl_prefix}varnish
|
|
|
9e2939 |
|
|
|
9e2939 |
%description
|
|
|
9e2939 |
This is the main package for %scl Software Collection.
|
|
|
9e2939 |
|
|
|
9e2939 |
%package runtime
|
|
|
9e2939 |
Summary: Package that handles %scl Software Collection.
|
|
|
9e2939 |
Requires: scl-utils
|
|
|
9e2939 |
Requires(post): policycoreutils-python
|
|
|
9e2939 |
|
|
|
9e2939 |
%description runtime
|
|
|
9e2939 |
Package shipping essential scripts to work with %scl Software Collection.
|
|
|
9e2939 |
|
|
|
9e2939 |
%package build
|
|
|
9e2939 |
Summary: Package shipping basic build configuration
|
|
|
9e2939 |
Requires: scl-utils-build
|
|
|
9e2939 |
|
|
|
9e2939 |
%description build
|
|
|
9e2939 |
Package shipping essential configuration macros to build %scl Software Collection.
|
|
|
9e2939 |
|
|
|
9e2939 |
%package scldevel
|
|
|
9e2939 |
Summary: Package shipping development files for %scl
|
|
|
9e2939 |
Group: Development/Languages
|
|
|
9e2939 |
|
|
|
9e2939 |
%description scldevel
|
|
|
9e2939 |
Package shipping development files, especially usefull for development of
|
|
|
9e2939 |
packages depending on %scl Software Collection.
|
|
|
9e2939 |
|
|
|
9e2939 |
%prep
|
|
|
9e2939 |
%setup -c -T
|
|
|
9e2939 |
|
|
|
9e2939 |
# copy the license file so %%files section sees it
|
|
|
9e2939 |
cp %{SOURCE0} .
|
|
|
9e2939 |
cp %{SOURCE1} .
|
|
|
9e2939 |
cp %{SOURCE2} .
|
|
|
9e2939 |
|
|
|
9e2939 |
expand_variables() {
|
|
|
9e2939 |
sed -i 's|%%{scl_name}|%{scl_name}|g' "$1"
|
|
|
9e2939 |
sed -i 's|%%{_scl_root}|%{_scl_root}|g' "$1"
|
|
|
9e2939 |
sed -i 's|%%{version}|%{version}|g' "$1"
|
|
|
9e2939 |
%if 0%{?rhel} > 6
|
|
|
9e2939 |
sed -i 's|%%{start_command}|systemctl start %{scl_name}-varnish|g' "$1"
|
|
|
9e2939 |
%else
|
|
|
9e2939 |
sed -i 's|%%{start_command}|service %{scl_name}-varnish start|g' "$1"
|
|
|
9e2939 |
%endif
|
|
|
9e2939 |
}
|
|
|
9e2939 |
|
|
|
9e2939 |
expand_variables README.7
|
|
|
9e2939 |
expand_variables README
|
|
|
9e2939 |
|
|
|
9e2939 |
# Not required for now
|
|
|
9e2939 |
#export LIBRARY_PATH=%{_libdir}\${LIBRARY_PATH:+:\${LIBRARY_PATH}}
|
|
|
9e2939 |
#export LD_LIBRARY_PATH=%{_libdir}\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}}
|
|
|
9e2939 |
|
|
|
9e2939 |
cat <
|
|
|
9e2939 |
export PATH=%{_bindir}:%{_sbindir}\${PATH:+:\${PATH}}
|
|
|
9e2939 |
export LIBRARY_PATH=%{_libdir}\${LIBRARY_PATH:+:\${LIBRARY_PATH}}
|
|
|
9e2939 |
export LD_LIBRARY_PATH=%{_libdir}\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}}
|
|
|
9e2939 |
export MANPATH=%{_mandir}:\${MANPATH}
|
|
|
9e2939 |
export CPATH=%{_includedir}\${CPATH:+:\${CPATH}}
|
|
|
9e2939 |
EOF
|
|
|
9e2939 |
|
|
|
9e2939 |
# generate rpm macros file for depended collections
|
|
|
9e2939 |
cat << EOF | tee scldev
|
|
|
9e2939 |
%%scl_%{scl_name_base} %{scl}
|
|
|
9e2939 |
%%scl_prefix_%{scl_name_base} %{scl_prefix}
|
|
|
9e2939 |
EOF
|
|
|
9e2939 |
|
|
|
9e2939 |
%build
|
|
|
9e2939 |
# generate a helper script that will be used by help2man
|
|
|
9e2939 |
cat >h2m_helper <<'EOF'
|
|
|
9e2939 |
#!/bin/bash
|
|
|
9e2939 |
[ "$1" == "--version" ] && echo "%{scl_name} %{version} Software Collection" || cat README
|
|
|
9e2939 |
EOF
|
|
|
9e2939 |
chmod a+x h2m_helper
|
|
|
9e2939 |
|
|
|
9e2939 |
# generate the man page
|
|
|
9e2939 |
help2man -N --section 7 ./h2m_helper -o %{scl_name}.7
|
|
|
9e2939 |
|
|
|
9e2939 |
|
|
|
9e2939 |
%install
|
|
|
9e2939 |
mkdir -p %{buildroot}%{_scl_scripts}/root
|
|
|
9e2939 |
install -m 644 enable %{buildroot}%{_scl_scripts}/enable
|
|
|
9e2939 |
install -D -m 644 scldev %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel
|
|
|
9e2939 |
|
|
|
9e2939 |
# install generated man page
|
|
|
9e2939 |
mkdir -p %{buildroot}%{_mandir}/man1/
|
|
|
9e2939 |
mkdir -p %{buildroot}%{_mandir}/man7/
|
|
|
9e2939 |
mkdir -p %{buildroot}%{_mandir}/man8/
|
|
|
9e2939 |
mkdir -p %{buildroot}%{_libdir}/pkgconfig/
|
|
|
9e2939 |
mkdir -p %{buildroot}%{_datadir}/aclocal/
|
|
|
9e2939 |
mkdir -p %{buildroot}%{_datadir}/licenses/
|
|
|
9e2939 |
install -m 644 README.7 %{buildroot}%{_mandir}/man7/%{scl_name}.7
|
|
|
9e2939 |
|
|
|
9e2939 |
%scl_install
|
|
|
9e2939 |
|
|
|
9e2939 |
# create directory for SCL register scripts
|
|
|
9e2939 |
mkdir -p %{buildroot}%{?_scl_scripts}/register.content
|
|
|
9e2939 |
mkdir -p %{buildroot}%{?_scl_scripts}/register.d
|
|
|
9e2939 |
cat <
|
|
|
9e2939 |
#!/bin/sh
|
|
|
9e2939 |
ls %{?_scl_scripts}/register.d/* | while read file ; do
|
|
|
9e2939 |
[ -x \$f ] && source \$(readlink -f \$file)
|
|
|
9e2939 |
done
|
|
|
9e2939 |
EOF
|
|
|
9e2939 |
# and deregister as well
|
|
|
9e2939 |
mkdir -p %{buildroot}%{?_scl_scripts}/deregister.d
|
|
|
9e2939 |
cat <
|
|
|
9e2939 |
#!/bin/sh
|
|
|
9e2939 |
ls %{?_scl_scripts}/deregister.d/* | while read file ; do
|
|
|
9e2939 |
[ -x \$f ] && source \$(readlink -f \$file)
|
|
|
9e2939 |
done
|
|
|
9e2939 |
EOF
|
|
|
9e2939 |
|
|
|
9e2939 |
%post runtime
|
|
|
9e2939 |
# Simple copy of context from system root to DSC root.
|
|
|
9e2939 |
# In case new version needs some additional rules or context definition,
|
|
|
9e2939 |
# it needs to be solved.
|
|
|
9e2939 |
# Unfortunately, semanage does not have -e option in RHEL-5, so we have to
|
|
|
9e2939 |
# have its own policy for collection
|
|
|
9e2939 |
semanage fcontext -a -e / %{_scl_root} >/dev/null 2>&1 || :
|
|
|
9e2939 |
restorecon -R %{_scl_root} >/dev/null 2>&1 || :
|
|
|
9e2939 |
selinuxenabled && load_policy || :
|
|
|
9e2939 |
|
|
|
9e2939 |
%files
|
|
|
9e2939 |
|
|
|
9e2939 |
%files runtime
|
|
|
9e2939 |
%defattr(-,root,root)
|
|
|
9e2939 |
%doc README LICENSE
|
|
|
9e2939 |
%scl_files
|
|
|
9e2939 |
%dir %{_mandir}/man1
|
|
|
9e2939 |
%dir %{_mandir}/man3
|
|
|
9e2939 |
%dir %{_mandir}/man7
|
|
|
9e2939 |
%dir %{_mandir}/man8
|
|
|
a94221 |
%dir %{_libdir}
|
|
|
a94221 |
%dir %{_docdir}
|
|
|
9e2939 |
%dir %{_libdir}/pkgconfig
|
|
|
9e2939 |
%dir %{_datadir}/aclocal
|
|
|
9e2939 |
%dir %{_datadir}/licenses
|
|
|
9e2939 |
%{_mandir}/man7/%{scl_name}.*
|
|
|
9e2939 |
%attr(0755,root,root) %{?_scl_scripts}/register
|
|
|
9e2939 |
%attr(0755,root,root) %{?_scl_scripts}/deregister
|
|
|
9e2939 |
%{?_scl_scripts}/register.content
|
|
|
9e2939 |
%dir %{?_scl_scripts}/register.d
|
|
|
9e2939 |
%dir %{?_scl_scripts}/deregister.d
|
|
|
9e2939 |
|
|
|
9e2939 |
%files build
|
|
|
9e2939 |
%defattr(-,root,root)
|
|
|
9e2939 |
%{_root_sysconfdir}/rpm/macros.%{scl}-config
|
|
|
9e2939 |
|
|
|
9e2939 |
%files scldevel
|
|
|
9e2939 |
%defattr(-,root,root)
|
|
|
9e2939 |
%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel
|
|
|
9e2939 |
|
|
|
9e2939 |
%changelog
|
|
|
a94221 |
* Mon Feb 10 2020 Lubos Uhliarik <luhliari@redhat.com> - 4.1-6
|
|
|
a94221 |
- Resolves: #1798849 - leftover files left after the yum remove rh-varnish6
|
|
|
a94221 |
on ppc64le
|
|
|
a94221 |
|
|
|
a94221 |
* Thu Jan 03 2019 Lubos Uhliarik <luhliari@redhat.com> - 4.1-4
|
|
|
a94221 |
- update for Varnish 6 (#1658671)
|
|
|
a94221 |
|
|
|
9e2939 |
* Tue Oct 23 2018 Luboš Uhliarik <luhliari@redhat.com> - 4.1-3
|
|
|
9e2939 |
- varnish6 doesn't own /opt/rh/rh-varnish6/root/usr/share/licenses (#1608952)
|
|
|
9e2939 |
|
|
|
9e2939 |
* Wed Jul 18 2018 Luboš Uhliarik <luhliari@redhat.com> - 4.1-2
|
|
|
9e2939 |
- update for Varnish 6 (#1588045)
|
|
|
9e2939 |
|
|
|
9e2939 |
* Wed Dec 13 2017 Joe Orton <jorton@redhat.com> - 3.1-1
|
|
|
9e2939 |
- update for Varnish 5 (#1518821)
|
|
|
9e2939 |
|
|
|
9e2939 |
* Tue Oct 13 2015 Jan Kaluza <jkaluza@redhat.com> - 2.1-6
|
|
|
9e2939 |
- correct mistakes in man page (#1261372)
|
|
|
9e2939 |
|
|
|
9e2939 |
* Fri Sep 11 2015 Jan Kaluza <jkaluza@redhat.com> - 2.1-5
|
|
|
9e2939 |
- own man3 directory (#1261455)
|
|
|
9e2939 |
- improve the man page (#1261372)
|
|
|
9e2939 |
|
|
|
9e2939 |
* Mon Aug 17 2015 Jan Kaluza <jkaluza@redhat.com> - 2.1-4
|
|
|
9e2939 |
- add sbin directory into PATH (#1253666)
|
|
|
9e2939 |
|
|
|
9e2939 |
* Wed Jul 08 2015 Jan Kaluza <jkaluza@redhat.com> - 2.1-3
|
|
|
9e2939 |
- rebuild against new scl-utils
|
|
|
9e2939 |
|
|
|
9e2939 |
* Tue Jul 07 2015 Jan Kaluza <jkaluza@redhat.com> - 2.1-2
|
|
|
9e2939 |
- enable NFS support
|
|
|
9e2939 |
|
|
|
9e2939 |
* Wed Apr 08 2015 Jan Kaluza <jkaluza@redhat.com> - 2.1-1
|
|
|
9e2939 |
- initial packaging
|