|
|
d47586 |
%global scl_name_prefix rh-
|
|
|
d47586 |
%global scl_name_base nginx
|
|
|
d47586 |
%global scl_name_version 18
|
|
|
d47586 |
%global scl %{scl_name_prefix}%{scl_name_base}%{scl_name_version}
|
|
|
d47586 |
%{!?nfsmountable: %global nfsmountable 1}
|
|
|
d47586 |
%scl_package %scl
|
|
|
d47586 |
|
|
|
d47586 |
# do not produce empty debuginfo package
|
|
|
d47586 |
%global debug_package %{nil}
|
|
|
d47586 |
|
|
|
d47586 |
Summary: Package that installs %scl
|
|
|
d47586 |
Name: %scl_name
|
|
|
d47586 |
Version: 2.1
|
|
|
d47586 |
Release: 4%{?dist}
|
|
|
d47586 |
License: GPLv2+
|
|
|
d47586 |
Group: Applications/File
|
|
|
d47586 |
Source0: README
|
|
|
d47586 |
Source1: LICENSE
|
|
|
d47586 |
Source2: README.7
|
|
|
d47586 |
|
|
|
d47586 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
d47586 |
BuildRequires: scl-utils-build
|
|
|
d47586 |
# Temporary work-around
|
|
|
d47586 |
BuildRequires: iso-codes
|
|
|
d47586 |
|
|
|
d47586 |
Requires: %{scl_prefix}nginx
|
|
|
d47586 |
|
|
|
d47586 |
%description
|
|
|
d47586 |
This is the main package for %scl Software Collection.
|
|
|
d47586 |
|
|
|
d47586 |
%package runtime
|
|
|
d47586 |
Summary: Package that handles %scl Software Collection.
|
|
|
d47586 |
Requires: scl-utils
|
|
|
d47586 |
Requires(post): policycoreutils-python libselinux-utils
|
|
|
d47586 |
|
|
|
d47586 |
%description runtime
|
|
|
d47586 |
Package shipping essential scripts to work with %scl Software Collection.
|
|
|
d47586 |
|
|
|
d47586 |
%package build
|
|
|
d47586 |
Summary: Package shipping basic build configuration
|
|
|
d47586 |
Requires: scl-utils-build
|
|
|
d47586 |
|
|
|
d47586 |
%description build
|
|
|
d47586 |
Package shipping essential configuration macros to build %scl Software Collection.
|
|
|
d47586 |
|
|
|
d47586 |
%package scldevel
|
|
|
d47586 |
Summary: Package shipping development files for %scl
|
|
|
d47586 |
Group: Development/Languages
|
|
|
d47586 |
|
|
|
d47586 |
%description scldevel
|
|
|
d47586 |
Package shipping development files, especially usefull for development of
|
|
|
d47586 |
packages depending on %scl Software Collection.
|
|
|
d47586 |
|
|
|
d47586 |
%prep
|
|
|
d47586 |
%setup -c -T
|
|
|
d47586 |
|
|
|
d47586 |
# copy the license file so %%files section sees it
|
|
|
d47586 |
cp %{SOURCE0} .
|
|
|
d47586 |
cp %{SOURCE1} .
|
|
|
d47586 |
cp %{SOURCE2} .
|
|
|
d47586 |
|
|
|
d47586 |
sed -i 's|%%{scl_name}|%{scl_name}|g' README.7
|
|
|
d47586 |
sed -i 's|%%{_scl_root}|%{_scl_root}|g' README.7
|
|
|
d47586 |
sed -i 's|%%{version}|%{version}|g' README.7
|
|
|
d47586 |
|
|
|
d47586 |
# Not required for now
|
|
|
d47586 |
#export LIBRARY_PATH=%{_libdir}\${LIBRARY_PATH:+:\${LIBRARY_PATH}}
|
|
|
d47586 |
#export LD_LIBRARY_PATH=%{_libdir}\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}}
|
|
|
d47586 |
|
|
|
d47586 |
cat <
|
|
|
d47586 |
export PATH=%{_bindir}:%{_sbindir}\${PATH:+:\${PATH}}
|
|
|
d47586 |
export MANPATH=%{_mandir}:\${MANPATH}
|
|
|
d47586 |
export PKG_CONFIG_PATH=%{_libdir}/pkgconfig\${PKG_CONFIG_PATH:+:\${PKG_CONFIG_PATH}}
|
|
|
d47586 |
EOF
|
|
|
d47586 |
|
|
|
d47586 |
# generate rpm macros file for depended collections
|
|
|
d47586 |
cat << EOF | tee scldev
|
|
|
d47586 |
%%scl_%{scl_name_base} %{scl}
|
|
|
d47586 |
%%scl_prefix_%{scl_name_base} %{scl_prefix}
|
|
|
d47586 |
EOF
|
|
|
d47586 |
|
|
|
d47586 |
%build
|
|
|
d47586 |
|
|
|
d47586 |
%install
|
|
|
d47586 |
mkdir -p %{buildroot}%{_scl_scripts}/root
|
|
|
d47586 |
install -m 644 enable %{buildroot}%{_scl_scripts}/enable
|
|
|
d47586 |
install -D -m 644 scldev %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel
|
|
|
d47586 |
|
|
|
d47586 |
mkdir -p %{buildroot}%{_localstatedir}/run/
|
|
|
d47586 |
|
|
|
d47586 |
# install generated man page
|
|
|
d47586 |
mkdir -p %{buildroot}%{_mandir}/man7/
|
|
|
d47586 |
install -m 644 README.7 %{buildroot}%{_mandir}/man7/%{scl_name}.7
|
|
|
d47586 |
|
|
|
d47586 |
%scl_install
|
|
|
d47586 |
|
|
|
d47586 |
# create directory for SCL register scripts
|
|
|
d47586 |
mkdir -p %{buildroot}%{?_scl_scripts}/register.content
|
|
|
d47586 |
mkdir -p %{buildroot}%{?_scl_scripts}/register.d
|
|
|
d47586 |
cat <
|
|
|
d47586 |
#!/bin/sh
|
|
|
d47586 |
ls %{?_scl_scripts}/register.d/* | while read file ; do
|
|
|
d47586 |
[ -x \$f ] && source \$(readlink -f \$file)
|
|
|
d47586 |
done
|
|
|
d47586 |
EOF
|
|
|
d47586 |
# and deregister as well
|
|
|
d47586 |
mkdir -p %{buildroot}%{?_scl_scripts}/deregister.d
|
|
|
d47586 |
cat <
|
|
|
d47586 |
#!/bin/sh
|
|
|
d47586 |
ls %{?_scl_scripts}/deregister.d/* | while read file ; do
|
|
|
d47586 |
[ -x \$f ] && source \$(readlink -f \$file)
|
|
|
d47586 |
done
|
|
|
d47586 |
EOF
|
|
|
d47586 |
|
|
|
d47586 |
%post runtime
|
|
|
d47586 |
# Simple copy of context from system root to DSC root.
|
|
|
d47586 |
# In case new version needs some additional rules or context definition,
|
|
|
d47586 |
# it needs to be solved.
|
|
|
d47586 |
# Unfortunately, semanage does not have -e option in RHEL-5, so we have to
|
|
|
d47586 |
# have its own policy for collection
|
|
|
d47586 |
semanage fcontext -a -e / %{_scl_root} >/dev/null 2>&1 || :
|
|
|
d47586 |
restorecon -R %{_scl_root} >/dev/null 2>&1 || :
|
|
|
d47586 |
selinuxenabled && load_policy || :
|
|
|
d47586 |
|
|
|
d47586 |
%files
|
|
|
d47586 |
|
|
|
d47586 |
%files runtime
|
|
|
d47586 |
%defattr(-,root,root)
|
|
|
d47586 |
%doc README LICENSE
|
|
|
d47586 |
%scl_files
|
|
|
d47586 |
%dir %{_mandir}/man7
|
|
|
d47586 |
%dir %{_mandir}/man8
|
|
|
d47586 |
%{_mandir}/man7/%{scl_name}.*
|
|
|
d47586 |
|
|
|
d47586 |
%dir %{_localstatedir}/run
|
|
|
d47586 |
|
|
|
d47586 |
%attr(0755,root,root) %{?_scl_scripts}/register
|
|
|
d47586 |
%attr(0755,root,root) %{?_scl_scripts}/deregister
|
|
|
d47586 |
%{?_scl_scripts}/register.content
|
|
|
d47586 |
%dir %{?_scl_scripts}/register.d
|
|
|
d47586 |
%dir %{?_scl_scripts}/deregister.d
|
|
|
d47586 |
|
|
|
d47586 |
%files build
|
|
|
d47586 |
%defattr(-,root,root)
|
|
|
d47586 |
%{_root_sysconfdir}/rpm/macros.%{scl}-config
|
|
|
d47586 |
|
|
|
d47586 |
%files scldevel
|
|
|
d47586 |
%defattr(-,root,root)
|
|
|
d47586 |
%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel
|
|
|
d47586 |
|
|
|
d47586 |
%changelog
|
|
|
d47586 |
* Tue Aug 11 2015 Jan Kaluza <jkaluza@redhat.com> - 2.1-4
|
|
|
d47586 |
- expand variables in rh-nginx18 manual page (#1249927)
|
|
|
d47586 |
|
|
|
d47586 |
* Tue Jul 14 2015 Jan Kaluza <jkaluza@redhat.com> - 2.1-3
|
|
|
d47586 |
- Escape apostrophs in rh-nginx18(7) manual page
|
|
|
d47586 |
|
|
|
d47586 |
* Wed Jul 08 2015 Jan Kaluza <jkaluza@redhat.com> - 2.1-2
|
|
|
d47586 |
- rebuild against new scl-utils
|
|
|
d47586 |
|
|
|
d47586 |
* Wed Jul 08 2015 Jan Kaluza <jkaluza@redhat.com> - 2.1-1
|
|
|
d47586 |
- initial packaging
|