|
|
0ccbfb |
%global scl_name_base httpd
|
|
|
0ccbfb |
%global scl_name_version 24
|
|
|
0ccbfb |
%global scl %{scl_name_base}%{scl_name_version}
|
|
|
0ccbfb |
%scl_package %scl
|
|
|
0ccbfb |
|
|
|
0ccbfb |
# do not produce empty debuginfo package
|
|
|
0ccbfb |
%global debug_package %{nil}
|
|
|
0ccbfb |
|
|
|
28d280 |
%if 0%{?rhel} >= 7
|
|
|
0ccbfb |
%define use_system_apr 1
|
|
|
28d280 |
%else
|
|
|
28d280 |
%define use_system_apr 0
|
|
|
28d280 |
%endif
|
|
|
0ccbfb |
|
|
|
0ccbfb |
Summary: Package that installs %scl
|
|
|
0ccbfb |
Name: %scl_name
|
|
|
0ccbfb |
Version: 1.1
|
|
|
28d280 |
Release: 14%{?dist}
|
|
|
0ccbfb |
License: GPLv2+
|
|
|
0ccbfb |
Group: Applications/File
|
|
|
0ccbfb |
Source0: README
|
|
|
0ccbfb |
Source1: LICENSE
|
|
|
28d280 |
Source2: README.7
|
|
|
0ccbfb |
|
|
|
0ccbfb |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
0ccbfb |
BuildRequires: scl-utils-build
|
|
|
0ccbfb |
# Temporary work-around
|
|
|
0ccbfb |
BuildRequires: iso-codes
|
|
|
0ccbfb |
BuildRequires: help2man
|
|
|
0ccbfb |
|
|
|
28d280 |
%if %{use_system_apr}
|
|
|
28d280 |
# Remove httpd24-apr and httpd24-apr-util from system.
|
|
|
28d280 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1088194
|
|
|
28d280 |
Obsoletes: %{scl_prefix}apr
|
|
|
28d280 |
Obsoletes: %{scl_prefix}apr-devel
|
|
|
28d280 |
Obsoletes: %{scl_prefix}apr-util
|
|
|
28d280 |
Obsoletes: %{scl_prefix}apr-util-devel
|
|
|
28d280 |
Obsoletes: %{scl_prefix}apr-util-pgsql
|
|
|
28d280 |
Obsoletes: %{scl_prefix}apr-util-mysql
|
|
|
28d280 |
Obsoletes: %{scl_prefix}apr-util-sqlite
|
|
|
28d280 |
Obsoletes: %{scl_prefix}apr-util-odbc
|
|
|
28d280 |
Obsoletes: %{scl_prefix}apr-util-ldap
|
|
|
28d280 |
Obsoletes: %{scl_prefix}apr-util-openssl
|
|
|
28d280 |
Obsoletes: %{scl_prefix}apr-util-nss
|
|
|
28d280 |
%else
|
|
|
0ccbfb |
Requires: %{scl_prefix}apr
|
|
|
0ccbfb |
Requires: %{scl_prefix}apr-util
|
|
|
0ccbfb |
%endif
|
|
|
0ccbfb |
Requires: %{scl_prefix}httpd
|
|
|
0ccbfb |
|
|
|
0ccbfb |
%description
|
|
|
0ccbfb |
This is the main package for %scl Software Collection.
|
|
|
0ccbfb |
|
|
|
0ccbfb |
%package runtime
|
|
|
0ccbfb |
Summary: Package that handles %scl Software Collection.
|
|
|
0ccbfb |
Requires: scl-utils
|
|
|
0ccbfb |
Requires(post): policycoreutils-python
|
|
|
0ccbfb |
|
|
|
0ccbfb |
%description runtime
|
|
|
0ccbfb |
Package shipping essential scripts to work with %scl Software Collection.
|
|
|
0ccbfb |
|
|
|
0ccbfb |
%package build
|
|
|
0ccbfb |
Summary: Package shipping basic build configuration
|
|
|
0ccbfb |
Requires: scl-utils-build
|
|
|
0ccbfb |
|
|
|
0ccbfb |
%description build
|
|
|
0ccbfb |
Package shipping essential configuration macros to build %scl Software Collection.
|
|
|
0ccbfb |
|
|
|
0ccbfb |
%package scldevel
|
|
|
0ccbfb |
Summary: Package shipping development files for %scl
|
|
|
0ccbfb |
Group: Development/Languages
|
|
|
0ccbfb |
|
|
|
0ccbfb |
%description scldevel
|
|
|
0ccbfb |
Package shipping development files, especially usefull for development of
|
|
|
0ccbfb |
packages depending on %scl Software Collection.
|
|
|
0ccbfb |
|
|
|
0ccbfb |
%prep
|
|
|
0ccbfb |
%setup -c -T
|
|
|
0ccbfb |
|
|
|
0ccbfb |
# copy the license file so %%files section sees it
|
|
|
28d280 |
cp %{SOURCE0} .
|
|
|
0ccbfb |
cp %{SOURCE1} .
|
|
|
28d280 |
cp %{SOURCE2} .
|
|
|
28d280 |
|
|
|
28d280 |
expand_variables() {
|
|
|
28d280 |
sed -i 's|%%{scl_name}|%{scl_name}|g' "$1"
|
|
|
28d280 |
sed -i 's|%%{_scl_root}|%{_scl_root}|g' "$1"
|
|
|
28d280 |
sed -i 's|%%{version}|%{version}|g' "$1"
|
|
|
28d280 |
%if 0%{?rhel} > 6
|
|
|
28d280 |
sed -i 's|%%{start_command}|systemctl start %{scl_name}-httpd|g' "$1"
|
|
|
28d280 |
%else
|
|
|
28d280 |
sed -i 's|%%{start_command}|service %{scl_name}-httpd start|g' "$1"
|
|
|
28d280 |
%endif
|
|
|
28d280 |
}
|
|
|
0ccbfb |
|
|
|
28d280 |
expand_variables README.7
|
|
|
28d280 |
expand_variables README
|
|
|
0ccbfb |
|
|
|
0ccbfb |
cat <
|
|
|
0ccbfb |
export PATH=%{_bindir}:%{_sbindir}\${PATH:+:\${PATH}}
|
|
|
0ccbfb |
export MANPATH=%{_mandir}:\${MANPATH}
|
|
|
0ccbfb |
export PKG_CONFIG_PATH=%{_libdir}/pkgconfig\${PKG_CONFIG_PATH:+:\${PKG_CONFIG_PATH}}
|
|
|
28d280 |
export LIBRARY_PATH=%{_libdir}\${LIBRARY_PATH:+:\${LIBRARY_PATH}}
|
|
|
28d280 |
export LD_LIBRARY_PATH=%{_libdir}\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}}
|
|
|
0ccbfb |
EOF
|
|
|
0ccbfb |
|
|
|
0ccbfb |
# generate rpm macros file for depended collections
|
|
|
0ccbfb |
cat << EOF | tee scldev
|
|
|
0ccbfb |
%%scl_%{scl_name_base} %{scl}
|
|
|
0ccbfb |
%%scl_prefix_%{scl_name_base} %{scl_prefix}
|
|
|
0ccbfb |
EOF
|
|
|
0ccbfb |
|
|
|
0ccbfb |
%build
|
|
|
0ccbfb |
|
|
|
0ccbfb |
%install
|
|
|
0ccbfb |
mkdir -p %{buildroot}%{_scl_scripts}/root
|
|
|
0ccbfb |
install -m 644 enable %{buildroot}%{_scl_scripts}/enable
|
|
|
0ccbfb |
install -D -m 644 scldev %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel
|
|
|
0ccbfb |
|
|
|
28d280 |
# All directories used must be owned
|
|
|
28d280 |
mkdir -p %{buildroot}%{_mandir}/man{1,3,7,8}/
|
|
|
0ccbfb |
mkdir -p %{buildroot}%{_libdir}/pkgconfig/
|
|
|
0ccbfb |
mkdir -p %{buildroot}%{_datadir}/aclocal/
|
|
|
28d280 |
mkdir -p %{buildroot}%{_datadir}/zsh/
|
|
|
28d280 |
mkdir -p %{buildroot}%{_datadir}/licenses/
|
|
|
28d280 |
|
|
|
28d280 |
install -m 644 README.7 %{buildroot}%{_mandir}/man7/%{scl_name}.7
|
|
|
0ccbfb |
|
|
|
0ccbfb |
%scl_install
|
|
|
0ccbfb |
|
|
|
0ccbfb |
cat >> %{buildroot}%{_scl_scripts}/service-environment << EOF
|
|
|
0ccbfb |
# Services are started in a fresh environment without any influence of user's
|
|
|
0ccbfb |
# environment (like environment variable values). As a consequence,
|
|
|
0ccbfb |
# information of all enabled collections will be lost during service start up.
|
|
|
0ccbfb |
# If user needs to run a service under any software collection enabled, this
|
|
|
0ccbfb |
# collection has to be written into HTTPD24_HTTPD_SCLS_ENABLED variable in
|
|
|
0ccbfb |
# /opt/rh/sclname/service-environment.
|
|
|
0ccbfb |
HTTPD24_HTTPD_SCLS_ENABLED="%{scl}"
|
|
|
0ccbfb |
EOF
|
|
|
0ccbfb |
|
|
|
0ccbfb |
%post runtime
|
|
|
0ccbfb |
# Simple copy of context from system root to DSC root.
|
|
|
0ccbfb |
# In case new version needs some additional rules or context definition,
|
|
|
0ccbfb |
# it needs to be solved.
|
|
|
0ccbfb |
# Unfortunately, semanage does not have -e option in RHEL-5, so we have to
|
|
|
0ccbfb |
# have its own policy for collection
|
|
|
0ccbfb |
semanage fcontext -a -e / %{_scl_root} >/dev/null 2>&1 || :
|
|
|
0ccbfb |
restorecon -R %{_scl_root} >/dev/null 2>&1 || :
|
|
|
0ccbfb |
|
|
|
0ccbfb |
%files
|
|
|
0ccbfb |
|
|
|
0ccbfb |
%files runtime
|
|
|
0ccbfb |
%defattr(-,root,root)
|
|
|
0ccbfb |
%doc README LICENSE
|
|
|
0ccbfb |
%scl_files
|
|
|
28d280 |
%dir %{_mandir}/man?
|
|
|
0ccbfb |
%dir %{_libdir}/pkgconfig
|
|
|
0ccbfb |
%dir %{_datadir}/aclocal
|
|
|
28d280 |
%dir %{_datadir}/licenses
|
|
|
28d280 |
%dir %{_datadir}/zsh
|
|
|
0ccbfb |
%{_mandir}/man7/%{scl_name}.*
|
|
|
0ccbfb |
%config(noreplace) %{_scl_scripts}/service-environment
|
|
|
0ccbfb |
|
|
|
0ccbfb |
%files build
|
|
|
0ccbfb |
%defattr(-,root,root)
|
|
|
0ccbfb |
%{_root_sysconfdir}/rpm/macros.%{scl}-config
|
|
|
0ccbfb |
|
|
|
0ccbfb |
%files scldevel
|
|
|
0ccbfb |
%defattr(-,root,root)
|
|
|
0ccbfb |
%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel
|
|
|
0ccbfb |
|
|
|
0ccbfb |
%changelog
|
|
|
28d280 |
* Fri May 06 2016 Jan Kaluza <jkaluza@redhat.com> - 1.1-14
|
|
|
28d280 |
- Resolves:#1219112 - fix error in man page
|
|
|
28d280 |
|
|
|
28d280 |
* Fri May 06 2016 Jan Kaluza <jkaluza@redhat.com> - 1.1-13
|
|
|
28d280 |
- Resolves:#1219112 - fix nginx mentions in the man page
|
|
|
28d280 |
|
|
|
28d280 |
* Thu Apr 14 2016 Joe Orton <jorton@redhat.com> - 1.1-12
|
|
|
28d280 |
- own more directories (#1319968)
|
|
|
31c51a |
|
|
|
28d280 |
* Wed Feb 10 2016 Jan Kaluza <jkaluza@redhat.com> - 1.1-11
|
|
|
28d280 |
- bump the release to match the RHEL6 version of httpd24
|
|
|
31c51a |
|
|
|
28d280 |
* Wed Feb 10 2016 Jan Kaluza <jkaluza@redhat.com> - 1.1-7
|
|
|
28d280 |
- Obsolete all versions of httpd24-apr and httpd24-apr-util on RHEL7 (#1218271)
|
|
|
28d280 |
- Do not mention RHSCL version in README and man page (#1219112)
|
|
|
28d280 |
- Fix bad man page syntax (#1219511)
|
|
|
28d280 |
|
|
|
28d280 |
* Tue Feb 09 2016 Jan Kaluza <jkaluza@redhat.com> - 1.1-6
|
|
|
28d280 |
- use LD_LIBRARY_PATH in enable script
|
|
|
28d280 |
|
|
|
28d280 |
* Wed Jan 28 2015 Jan Kaluza <jkaluza@redhat.com> 1.1-5
|
|
|
28d280 |
- rebuild for rhscl-2.0
|
|
|
31c51a |
|
|
|
0ccbfb |
* Mon Mar 31 2014 Honza Horak <hhorak@redhat.com> - 1.1-4
|
|
|
0ccbfb |
- Fix path typo in README
|
|
|
0ccbfb |
Related: #1061446
|
|
|
0ccbfb |
|
|
|
0ccbfb |
* Tue Mar 25 2014 Jan Kaluza <jkaluza@redhat.com> - 1.1-3
|
|
|
0ccbfb |
- own all directories needed by httpd24 SCL (#1079912)
|
|
|
0ccbfb |
|
|
|
0ccbfb |
* Tue Feb 25 2014 Jan Kaluza <jkaluza@redhat.com> - 1.1-2
|
|
|
0ccbfb |
- add scldevel subpackage (#1067434)
|
|
|
0ccbfb |
|
|
|
0ccbfb |
* Wed Feb 12 2014 Jan Kaluza <jkaluza@redhat.com> - 1.1-1
|
|
|
0ccbfb |
- add README and LICENSE (#1061446)
|
|
|
0ccbfb |
|
|
|
28d280 |
* Wed Jan 15 2014 Jan Kaluza <jkaluza@redhat.com> - 1.8
|
|
|
28d280 |
- add policycoreutils-python dependency (#1052933)
|
|
|
0ccbfb |
|
|
|
28d280 |
* Tue Nov 12 2013 Jan Kaluza <jkaluza@redhat.com> - 1.7
|
|
|
0ccbfb |
- add service-environment config file
|
|
|
0ccbfb |
|
|
|
0ccbfb |
* Fri Sep 20 2013 Jan Kaluza <jkaluza@redhat.com> - 1.6
|
|
|
0ccbfb |
- add prep section and cleanup spec file
|
|
|
0ccbfb |
|
|
|
0ccbfb |
* Fri Jul 26 2013 Jan Kaluza <jkaluza@redhat.com> - 1-5
|
|
|
0ccbfb |
- do not build httpd24 as noarch, fix export PATH
|
|
|
0ccbfb |
|
|
|
0ccbfb |
* Fri Jul 26 2013 Jan Kaluza <jkaluza@redhat.com> - 1-4
|
|
|
0ccbfb |
- add PKG_CONFIG_PATH to "enable" script
|
|
|
0ccbfb |
|
|
|
0ccbfb |
* Fri Apr 19 2013 Jan Kaluza <jkaluza@redhat.com> - 1-3
|
|
|
0ccbfb |
- handle selinux and manpath
|
|
|
0ccbfb |
- build with apr and apr-util from collection
|
|
|
0ccbfb |
|
|
|
0ccbfb |
* Tue Oct 02 2012 Jan Kaluza <jkaluza@redhat.com> - 1-2
|
|
|
0ccbfb |
- updated specfile according to latest guidelines
|
|
|
0ccbfb |
- require iso-codes
|
|
|
0ccbfb |
|
|
|
0ccbfb |
* Wed May 16 2012 Jan Kaluza <jkaluza@redhat.com> - 1-1
|
|
|
0ccbfb |
- initial packaging
|