spec: make it a bit more airy

Version: 10.3-2
This commit is contained in:
Pavel Raiskup 2018-04-13 15:03:09 +02:00
parent 50065a2277
commit 8ac102b47e

View File

@ -290,6 +290,7 @@ The postgresql-upgrade package contains the pg_upgrade utility and supporting
files needed for upgrading a PostgreSQL database from the previous major
version of PostgreSQL.
%package upgrade-devel
Summary: Support for build of extensions required for upgrade process
Group: Development/Libraries
@ -318,6 +319,7 @@ which is an extension to the PostgreSQL database server.
Install this if you want to write database functions in Perl.
%endif
%if %plpython
%package plpython
Summary: The Python2 procedural language for PostgreSQL
@ -331,6 +333,7 @@ which is an extension to the PostgreSQL database server.
Install this if you want to write database functions in Python 2.
%endif
%if %plpython3
%package plpython3
Summary: The Python3 procedural language for PostgreSQL
@ -343,6 +346,7 @@ which is an extension to the PostgreSQL database server.
Install this if you want to write database functions in Python 3.
%endif
%if %pltcl
%package pltcl
Summary: The Tcl procedural language for PostgreSQL
@ -356,6 +360,7 @@ which is an extension to the PostgreSQL database server.
Install this if you want to write database functions in Tcl.
%endif
%if %test
%package test
Summary: The test suite distributed with PostgreSQL
@ -369,6 +374,7 @@ PostgreSQL database management system, including regression tests and
benchmarks.
%endif
%prep
( cd %_sourcedir; sha256sum -c %{SOURCE16}; sha256sum -c %{SOURCE17} )
%setup -q -a 12
@ -391,8 +397,8 @@ tar xfj %{SOURCE3}
# remove .gitignore files to ensure none get into the RPMs (bug #642210)
find . -type f -name .gitignore | xargs rm
%build
%build
# fail quickly and obviously if user tries to build as root
%if %runselftest
if [ x"`id -u`" = x0 ]; then
@ -595,6 +601,7 @@ test "$test_failure" -eq 0
popd
%endif
%install
cd postgresql-setup-%{setup_version}
make install DESTDIR=$RPM_BUILD_ROOT
@ -614,7 +621,6 @@ description "Upgrade data from system PostgreSQL version (PostgreSQL %{prevm
redhat_sockets_hack no
EOF
make DESTDIR=$RPM_BUILD_ROOT install-world
%if %plpython3
@ -784,9 +790,11 @@ find_lang_bins pltcl.lst pltcl
%endif
%endif
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%pre server
/usr/sbin/groupadd -g 26 -o -r postgres >/dev/null 2>&1 || :
/usr/sbin/useradd -M -N -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \
@ -812,8 +820,8 @@ make -C postgresql-setup-%{setup_version} check
%clean
# FILES section.
# FILES sections.
%files -f main.lst
%doc doc/KNOWN_BUGS doc/MISSING_FEATURES doc/TODO
%doc COPYRIGHT README HISTORY doc/bug.template
@ -846,11 +854,13 @@ make -C postgresql-setup-%{setup_version} check
%{_mandir}/man1/vacuumdb.*
%{_mandir}/man7/*
%files docs
%doc *-US.pdf
%doc doc/html
%{_libdir}/pgsql/tutorial/
%files contrib -f contrib.lst
%doc contrib/spi/*.example
%{_bindir}/oid2name
@ -983,6 +993,7 @@ make -C postgresql-setup-%{setup_version} check
%{_libdir}/pgsql/pgxml.so
%endif
%files libs -f libs.lst
%doc COPYRIGHT
%dir %{_libdir}/pgsql
@ -991,6 +1002,7 @@ make -C postgresql-setup-%{setup_version} check
%{_libdir}/libpgtypes.so.*
%{_libdir}/libpq.so.*
%files server -f server.lst
%{_bindir}/initdb
%{_bindir}/pg_basebackup
@ -1074,14 +1086,15 @@ make -C postgresql-setup-%{setup_version} check
%files test-rpm-macros
%{macrosdir}/macros.%name-test
%{_datadir}/postgresql-setup/postgresql_pkg_tests.sh
%{macrosdir}/macros.%name-test
%files static
%{_libdir}/libpgcommon.a
%{_libdir}/libpgport.a
%if %upgrade
%files upgrade
%{_libdir}/pgsql/postgresql-%{prevmajorversion}/bin
@ -1091,6 +1104,7 @@ make -C postgresql-setup-%{setup_version} check
%exclude %{_libdir}/pgsql/postgresql-%{prevmajorversion}/lib/pkgconfig
%{_libdir}/pgsql/postgresql-%{prevmajorversion}/share
%files upgrade-devel
%{_libdir}/pgsql/postgresql-%{prevmajorversion}/bin/pg_config
%{_libdir}/pgsql/postgresql-%{prevmajorversion}/include
@ -1099,18 +1113,21 @@ make -C postgresql-setup-%{setup_version} check
%{macrosdir}/macros.%name-upgrade
%endif
%if %plperl
%files plperl -f plperl.lst
%{_datadir}/pgsql/extension/plperl*
%{_libdir}/pgsql/plperl.so
%endif
%if %pltcl
%files pltcl -f pltcl.lst
%{_datadir}/pgsql/extension/pltcl*
%{_libdir}/pgsql/pltcl.so
%endif
%if %plpython
%files plpython -f plpython.lst
%{_datadir}/pgsql/extension/plpython2*
@ -1118,17 +1135,20 @@ make -C postgresql-setup-%{setup_version} check
%{_libdir}/pgsql/plpython2.so
%endif
%if %plpython3
%files plpython3 -f plpython3.lst
%{_datadir}/pgsql/extension/plpython3*
%{_libdir}/pgsql/plpython3.so
%endif
%if %test
%files test
%attr(-,postgres,postgres) %{_libdir}/pgsql/test
%endif
%changelog
* Fri Apr 13 2018 Pavel Raiskup <praiskup@redhat.com> - 10.3-2
- define %%precise_version helper macro