| %{!?scl_name_base: %global scl_name_base postgresql} |
| %{!?scl_name_version: %global scl_name_version 92} |
| %{!?scl:%global scl %{scl_name_base}%{scl_name_version}} |
| %scl_package %scl |
| |
| |
| %global debug_package %{nil} |
| |
| |
| Summary: Package that installs %scl |
| Name: %scl_name |
| Version: 1.1 |
| Release: 20%{?dist} |
| License: GPLv2+ |
| Group: Applications/File |
| Source0: README |
| Source1: LICENSE |
| Requires: scl-utils |
| Requires: %{scl_prefix}postgresql-server |
| BuildRequires: scl-utils-build help2man |
| BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
| |
| %description |
| This is the main package for %scl Software Collection, which installs |
| necessary packages to use PostgreSQL 9.2 server. Software Collections allow |
| to install more versions of the same package by using alternative |
| directory structure. |
| Install this package if you want to use PostgreSQL 9.2 server on your system. |
| |
| %package runtime |
| Summary: Package that handles %scl Software Collection. |
| Group: Applications/File |
| Requires: scl-utils |
| Requires(post): policycoreutils-python libselinux-utils |
| |
| %description runtime |
| Package shipping essential scripts to work with %scl Software Collection. |
| |
| %package build |
| Summary: Package shipping basic build configuration |
| Group: Applications/File |
| Requires: scl-utils-build |
| |
| %description build |
| Package shipping essential configuration macros to build %scl Software |
| Collection or packages depending on %scl Software Collection. |
| |
| %package scldevel |
| Summary: Package shipping development files for %scl |
| |
| %description scldevel |
| Package shipping development files, especially usefull for development of |
| packages depending on %scl Software Collection. |
| |
| %prep |
| %setup -c -T |
| |
| |
| |
| cat >README <<'EOF' |
| %{expand:%(cat %{SOURCE0})} |
| EOF |
| |
| |
| cp %{SOURCE1} . |
| |
| %build |
| |
| cat >h2m_helper <<'EOF' |
| |
| [ "$1" == "--version" ] && echo "%{scl_name} %{version} Software Collection" || cat README |
| EOF |
| chmod a+x h2m_helper |
| |
| |
| help2man -N --section 7 ./h2m_helper -o %{scl_name}.7 |
| |
| %install |
| rm -rf %{buildroot} |
| mkdir -p %{buildroot}%{_scl_scripts}/root |
| |
| |
| mkdir -p %{buildroot}%{_mandir}/man7/ |
| install -m 644 %{scl_name}.7 %{buildroot}%{_mandir}/man7/%{scl_name}.7 |
| |
| %scl_install |
| |
| |
| |
| |
| |
| |
| cat >> %{buildroot}%{_scl_scripts}/enable << EOF |
| export PATH=%{_bindir}\${PATH:+:\${PATH}} |
| export LIBRARY_PATH=%{_libdir}\${LIBRARY_PATH:+:\${LIBRARY_PATH}} |
| export LD_LIBRARY_PATH=%{_libdir}\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}} |
| export MANPATH=%{_mandir}:\${MANPATH} |
| EOF |
| |
| |
| cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel << EOF |
| %%scl_%{scl_name_base} %{scl} |
| %%scl_prefix_%{scl_name_base} %{scl_prefix} |
| EOF |
| |
| |
| cat >> %{buildroot}%{_scl_scripts}/service-environment << EOF |
| |
| |
| |
| |
| |
| |
| POSTGRESQL92_SCLS_ENABLED="%{scl}" |
| EOF |
| |
| %post runtime |
| |
| |
| |
| |
| |
| semanage fcontext -a -e / %{_scl_root} >/dev/null 2>&1 || : |
| semanage fcontext -a -e /etc/rc.d/init.d/postgresql /etc/rc.d/init.d/%{scl_prefix}postgresql >/dev/null 2>&1 || : |
| restorecon -R %{_scl_root} >/dev/null 2>&1 || : |
| restorecon /etc/rc.d/init.d/%{scl_prefix}postgresql >/dev/null 2>&1 || : |
| selinuxenabled && load_policy || : |
| |
| %files |
| |
| %files runtime -f filesystem |
| %doc README LICENSE |
| %scl_files |
| %config(noreplace) %{_scl_scripts}/service-environment |
| %{_mandir}/man7/%{scl_name}.* |
| |
| %files build |
| %{_root_sysconfdir}/rpm/macros.%{scl}-config |
| |
| %files scldevel |
| %{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel |
| |
| %changelog |
| * Mon Mar 31 2014 Honza Horak <hhorak@redhat.com> - 1.1-20 |
| - Fix path typo in README |
| Related: |
| |
| * Thu Mar 27 2014 Jozef Mlich <jmlich@redhat.com> - 1.1-19 |
| - Resolves: |
| |
| * Thu Feb 13 2014 Jozef Mlich <jmlich@redhat.com> - 1.1-18 |
| - Resolves: |
| on scl-utils-build) |
| - Add LICENSE, README and postgresql92.7 man page |
| Resloves: |
| |
| * Wed Feb 12 2014 Honza Horak <hhorak@redhat.com> - 1.1-17 |
| - Add -scldevel subpackage |
| Resolves: |
| |
| * Wed Dec 18 2013 Jozef Mlich <jmlich@redhat.com> 1-17 |
| - release bump |
| Resolves |
| |
| * Tue Nov 26 2013 Jozef Mlich <jmlich@redhat.com> 1-16 |
| - By default, patch(1) creates backup files when chunks apply with offsets. |
| Turn that off to ensure such files don't get included in RPMs. |
| |
| * Fri Nov 22 2013 Honza Horak <hhorak@redhat.com> 1-15 |
| - Rename variable to match postgresql package |
| |
| * Mon Nov 18 2013 Jozef Mlich <jmlich@redhat.com> 1-14 |
| - release bump |
| |
| * Wed Oct 9 2013 Jozef Mlich <jmlich@redhat.com> 1-13 |
| - release bump to scl 1.1 |
| |
| * Wed May 22 2013 Honza Horak <hhorak@redhat.com> 1-12 |
| - Run semanage on whole root, BZ |
| - Require semanage utility to be installed for -runtime package |
| - Fix MANPATH definition, colon in the end is correct (it means default) |
| Resolves: BZ |
| |
| * Fri May 3 2013 Honza Horak <hhorak@redhat.com> 1-11 |
| - Run semanage for all directories separately, since it has |
| problems with definition for whole root |
| |
| * Thu May 2 2013 Honza Horak <hhorak@redhat.com> 1-10 |
| - Handle context of the init script |
| - Add better descriptions for packages |
| |
| * Fri Apr 26 2013 Honza Horak <hhorak@redhat.com> 1-9 |
| - fix escaping in PATH variable definition |
| |
| * Mon Apr 8 2013 Honza Horak <hhorak@redhat.com> 1-8 |
| - Don't require policycoreutils-python in RHEL-5 or older |
| - Require postgresql-server from the collection as main package |
| - Build separately on all arches |
| - Fix Environment variables definition |
| |
| * Wed Feb 20 2013 Honza Horak <hhorak@redhat.com> 1-7 |
| - Use %%setup macro to create safer build environment |
| |
| * Fri Nov 09 2012 Honza Horak <hhorak@redhat.com> 1-6 |
| - rename spec file to correspond with package name |
| |
| * Thu Nov 08 2012 Honza Horak <hhorak@redhat.com> 1-5 |
| - Mark service-environment as a config file |
| |
| * Thu Oct 25 2012 Honza Horak <hhorak@redhat.com> 1-5 |
| - create service-environment file to hold information about all collections, |
| that should be enabled when service is starting |
| - added policycoreutils-python for semanage -e |
| |
| * Thu Oct 18 2012 Honza Horak <hhorak@redhat.com> 1-3 |
| - copy SELinux context from core mysql files |
| |
| * Wed Oct 03 2012 Honza Horak <hhorak@redhat.com> 1-2 |
| - update to postgresql-9.2 and rename to postgresql92 |
| |
| * Mon Mar 19 2012 Honza Horak <hhorak@redhat.com> 1-1 |
| - initial packaging |
| |