Browse Source

postgresql-12.4-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@12467 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 3 years ago
parent
commit
8dd1294864
1 changed files with 137 additions and 129 deletions
  1. 137 129
      p/postgresql/postgresql-vl.spec

+ 137 - 129
p/postgresql/postgresql-vl.spec

@@ -1,13 +1,12 @@
 %bcond_with systemd
 
-%define plperl %{?_without_perl:0}%{!?_without_perl:1}
-%define plpython %{?_without_python:0}%{!?_without_python:1}
+%bcond_without plperl
+%bcond_without pltcl
+%bcond_without plpython3
+
 %define non6xpamdeps 0
 
-%define tcl 1
 %define test 0
-%define pltcl 1
-%define pls 1
 %define ssl 1
 %define kerberos 0
 %define nls 1
@@ -18,9 +17,9 @@
 Summary: PostgreSQL client programs
 Summary(ja): PostgreSQL のクライアントプログラム群
 Name: postgresql
-Version: 12.3
+Version: 12.4
 Release: 1%{?_dist_release}%{?with_systemd:.systemd}
-Group: Applications/Databases
+Group: servers
 Vendor: Project Vine
 Distribution: Vine Linux
 
@@ -61,10 +60,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-root
 BuildRequires: perl build-essential
 BuildRequires: bison, flex, pam-devel
 BuildRequires: libicu-devel
-%if %plpython
-BuildRequires: python python-devel
+%if %{with plpython3}
+BuildRequires: python3 python3-devel python3-rpm-macros
 %endif
-%if %tcl
+%if %{with pltcl}
 BuildRequires: tcl-devel
 %endif
 BuildRequires: libedit-devel
@@ -91,21 +90,7 @@ Obsoletes: postgresql7
 Conflicts: postgresql8
 Conflicts: postgresql8-jdbc
 Conflicts: postgresql-jdbc < %{pgver}
-
-%if %pls
 Obsoletes: postgresql7-plperl
-%endif
-
-Requires: /sbin/ldconfig initscripts
-Requires(pre): shadow-utils
-%if %{with systemd}
-BuildRequires: systemd-devel
-%{?systemd_requires}
-%else
-Requires(post): chkconfig
-Requires(preun): chkconfig, /sbin/service
-Requires(postun): chkconfig, /sbin/service
-%endif
 
 # This is the PostgreSQL Global Development Group Official RPMset spec file,
 # or a derivative thereof.
@@ -167,11 +152,12 @@ PostgreSQLはSQLの構成要素(トランザクション、副問い合わせお
 はこのパッケージが必要です。またpostgresql-serverパッケージをインスト
 ールする場合にも、このパッケージをインストールする必要があります。
 
+
 %if 0
 %package libs
 Summary: The shared libraries required for any PostgreSQL clients.
 Summary(ja): PostgreSQL クライアントに必要な共有ライブラリ
-Group: System Environment/Libraries
+Group: system
 Obsoletes: postgresql7-libs
 Conflicts: postgresql8-libs
 Conflicts: postgresql-libs >= 9.3.0
@@ -187,15 +173,25 @@ postgresql-libs パッケージは、すべての PostgreSQL クライアント
 ムやインターフェースのための中核的な共有ライブラリを提供します。
 PostgreSQL サーバに接続する必要のある、PostgreSQL パッケージやクライア
 ントを使う場合には、このパッケージをインストールする必要があります。
-
 %endif
 
+
 %package server
 Summary: The programs needed to create and run a PostgreSQL server.
 Summary(ja): PostgreSQL サーバを構築・実行するのに必要なプログラム
-Group: Applications/Databases
-Requires: /usr/sbin/useradd /sbin/chkconfig 
+Group: servers
 Requires: %{name} = %{version}
+Requires: /sbin/ldconfig
+Requires(pre): shadow-utils
+%if %{with systemd}
+BuildRequires: systemd-devel
+%{?systemd_requires}
+%else
+Requires:  initscripts
+Requires(post): chkconfig
+Requires(preun): chkconfig, /sbin/service
+Requires(postun): chkconfig, /sbin/service
+%endif
 Obsoletes: postgresql7-server
 Conflicts: postgresql8-server
 
@@ -221,9 +217,11 @@ PostgreSQL は先進的でオブジェクト指向的なデータベース管理
 テナンスしたりしたい場合は postgresql-server をインストールする必要が
 あります。さらに postgresql パッケージもインストールしてください。
 
+
 %package llvmjit
 Summary:        Just-in-time compilation support for PostgreSQL
 Summary(ja):    PostgreSQLのJust-in-timeコンパイルサポート
+Group:          programming
 Requires:       %{name}-server%{?_isa} = %{version}-%{release}
 Requires:       llvm => 5.0
 Provides:       postgresql-llvmjit >= %{version}-%{release}
@@ -236,10 +234,11 @@ just-in-time compiling parts of PostgreSQL queries. Using LLVM it
 compiles e.g. expressions and tuple deforming into native code, with the
 goal of accelerating analytics queries.
 
+
 %package docs
 Summary: Extra documentation for PostgreSQL
 Summary(ja): PostgreSQL に関するその他の文書
-Group: Applications/Documentation
+Group: documentation
 Obsoletes: postgresql7-docs
 Conflicts: postgresql8-docs
 
@@ -249,6 +248,7 @@ as well as the documentation in other formats, and some extra documentation.
 Install this package if you want to help with the PostgreSQL documentation
 project, or if you want to generate printed documentation.
 
+
 %package contrib
 Summary: Contributed source and binaries distributed with PostgreSQL
 Summary(ja): PostgreSQL と一緒に配布される、寄贈されたソースとバイナリ
@@ -261,10 +261,11 @@ Conflicts: postgresql8-contrib
 The postgresql-contrib package contains contributed packages that are
 included in the PostgreSQL distribution.
 
+
 %package devel
 Summary: PostgreSQL development header files.
 Summary(ja): PostgreSQL のサーバサイド開発用ヘッダファイル
-Group: Development/Libraries
+Group: programming
 Requires: %{name}-static = %{version}
 Requires: libicu-devel
 Requires: clang-devel
@@ -281,10 +282,11 @@ server-side C or C++ applications.
 postgresql-devel パッケージには、PostgreSQL サーバサイド C / C++ アプリケー
 ションをコンパイルするために必要なヘッダファイルが含まれています。
 
+
 %package static
 Summary: PostgreSQL development libraries.
 Summary(ja): PostgreSQL のサーバサイド開発用ライブラリ
-Group: Development/Libraries
+Group: programming
 Obsoletes: postgresql7-devel
 Conflicts: postgresql8-devel
 Conflicts: libpq-devel >= 9.3.0
@@ -298,35 +300,51 @@ postgresql-static パッケージには、PostgreSQL サーバサイド C / C++
 ションをコンパイルするために必要なライブラリが含まれています。
 
 #------------
-%if %pls
-%package pl
-Summary: The PL procedural languages for PostgreSQL.
-Summary(ja): PostgreSQL 用の手続き言語 PL
-Group: Applications/Databases
+%if %{with plperl}
+%package plperl
+Summary: The Perl procedural languages for PostgreSQL.
+Summary(ja): PostgreSQL用の手続き言語PL/Perl
+Group: programming
 Requires: %{name} = %{version}
 Obsoletes: postgresql7-pl
 Conflicts: postgresql8-pl
 
-%description pl
-PostgreSQL is an advanced Object-Relational database management
-system.  The postgresql-pl package contains the the PL/Perl, PL/Tcl, and PL/Python
-procedural languages for the backend.  PL/Pgsql is part of the core server package.
+%description plperl
+The postgresql-plperl package contains the PL/Perl procedural language,
+which is an extension to the PostgreSQL database server.
+Install this if you want to write database functions in Perl.
 %endif
 
 #------------
-%if %tcl
-%package tcl
-Summary: A Tcl client library for PostgreSQL.
-Summary(ja): PostgreSQL の Tcl クライアントライブラリ
-Group: Applications/Databases
-Requires: tcl >= 8.0
-Obsoletes: postgresql7-tcl
-Conflicts: postgresql8-tcl
+%if %{with pltcl}
+%package pltcl
+Summary: The Tcl procedural languages for PostgreSQL.
+Summary(ja): PostgreSQL用の手続き言語PL/Tcl
+Group: programming
+Requires: %{name} = %{version}
+Obsoletes: postgresql7-pl
+Conflicts: postgresql8-pl
 
-%description tcl
-PostgreSQL is an advanced Object-Relational database management
-system.  The postgresql-tcl package contains the libpgtcl client library,
-the pg-enhanced pgtclsh,and the pg-enhanced tksh, if so configured at buildtime.
+%description pltcl
+The postgresql-pltcl package contains the PL/Tcl procedural language,
+which is an extension to the PostgreSQL database server.
+Install this if you want to write database functions in Tcl.
+%endif
+
+#------------
+%if %{with plpython3}
+%package plpython3
+Summary: The Python3 procedural languages for PostgreSQL.
+Summary(ja): PostgreSQL用の手続き言語PL/Python
+Group: programming
+Requires: %{name} = %{version}
+Obsoletes: postgresql7-pl
+Conflicts: postgresql8-pl
+
+%description plpython3
+The postgresql-plpython3 package contains the PL/Python3 procedural language,
+which is an extension to the PostgreSQL database server.
+Install this if you want to write database functions in Python 3.
 %endif
 
 #------------
@@ -334,7 +352,7 @@ the pg-enhanced pgtclsh,and the pg-enhanced tksh, if so configured at buildtime.
 %package test
 Summary: The test suite distributed with PostgreSQL.
 Summary(ja): PostgreSQL と共に配布されるテストスート
-Group: Applications/Databases
+Group: other
 Requires: postgresql = %{version}
 Obsoletes: postgresql7-test
 Conflicts: postgresql8-test
@@ -366,18 +384,20 @@ perl -pi -e "s|^libpq = .+\$|libpq = $LIBPQ_PATH -lpthread|" src/Makefile.global
 
 CFLAGS=`echo $CFLAGS|xargs -n 1|grep -v ffast-math|xargs -n 100`
 
+export PYTHON=%{__python3}
+
 ./configure \
 	--prefix=%{_prefix} \
 	--libdir=%{_libdir} \
 	--disable-rpath \
-%if %plperl
+%if %{with plperl}
 	--with-perl \
 %endif
-%if %tcl
+%if %{with pltcl}
 	--with-tcl \
 	--with-tclconfig=%{_libdir} \
 %endif
-%if %plpython
+%if %{with plpython3}
 	--with-python \
 %endif
 %if %ssl
@@ -479,52 +499,32 @@ install -m 644 ./doc/src/sgml/man1/* $RPM_BUILD_ROOT/%{_mandir}/man1
 install -m 644 ./doc/src/sgml/man3/* $RPM_BUILD_ROOT/%{_mandir}/man3
 install -m 644 ./doc/src/sgml/man7/* $RPM_BUILD_ROOT/%{_mandir}/man7
 
-
-%find_lang initdb-%{pgver}
-%find_lang pg_archivecleanup-%{pgver}
-%find_lang pg_basebackup-%{pgver}
-%find_lang pg_checksums-%{pgver}
-%find_lang pg_config-%{pgver}
-%find_lang pg_controldata-%{pgver}
-%find_lang pg_ctl-%{pgver}
-%find_lang pg_dump-%{pgver}
-%find_lang pg_resetwal-%{pgver}
-%find_lang pg_rewind-%{pgver}
-%find_lang pg_test_fsync-%{pgver}
-%find_lang pg_test_timing-%{pgver}
-%find_lang pg_upgrade-%{pgver}
-%find_lang pg_waldump-%{pgver}
-%find_lang pgscripts-%{pgver}
-%find_lang postgres-%{pgver}
-%find_lang psql-%{pgver}
-%ifarch !x86_64
-%find_lang scripts-%{pgver}
+find_lang_bins ()
+{
+	lstfile=$1 ; shift
+	cp /dev/null "$lstfile"
+	for binary; do
+		%find_lang "$binary"-%{pgver}
+		cat "$binary"-%{pgver}.lang >>"$lstfile"
+	done
+}
+find_lang_bins devel.lst pg_config
+find_lang_bins server.lst \
+	initdb pg_archivecleanup pg_basebackup pg_checksums pg_controldata \
+	pg_ctl pg_resetwal pg_rewind pg_test_fsync pg_test_timing pg_waldump \
+	plpgsql postgres pg_upgrade
+find_lang_bins main.lst \
+	pg_dump pgscripts psql
+%if %{with plperl}
+find_lang_bins plperl.lst plperl
 %endif
-
-%find_lang plperl-%{pgver}
-%find_lang plpgsql-%{pgver}
-%find_lang plpython-%{pgver}
-%find_lang pltcl-%{pgver}
-
-cat psql-%{pgver}.lang pg_dump-%{pgver}.lang > main.lst
-cat pg_config-%{pgver}.lang > devel.lst
-cat initdb-%{pgver}.lang pg_archivecleanup-%{pgver}.lang \
-	pg_basebackup-%{pgver}.lang pg_controldata-%{pgver}.lang \
-	pg_checksums-%{pgver}.lang pg_ctl-%{pgver}.lang \
-	pg_resetwal-%{pgver}.lang pg_rewind-%{pgver}.lang \
-	pg_test_fsync-%{pgver}.lang pg_test_timing-%{pgver}.lang \
-	pg_upgrade-%{pgver}.lang pg_waldump-%{pgver}.lang \
-	postgres-%{pgver}.lang \
-	> server.lst
-%ifarch !x86_64
-cat scripts-%{pgver}.lang >> server.lst
+%if %{with plpython3}
+# plpython3 shares message files with plpython
+find_lang_bins plpython3.lst plpython
+%endif
+%if %{with pltcl}
+find_lang_bins pltcl.lst pltcl
 %endif
-
-#cat ecpg-%{pgver}.lang ecpglib6-%{pgver}.lang >> devel.lst
-cat plperl-%{pgver}.lang > pl.lst
-cat plpgsql-%{pgver}.lang >> pl.lst
-cat plpython-%{pgver}.lang >> pl.lst
-cat pltcl-%{pgver}.lang > tcl.lst
 
 rm -rf ./extension
 mv -f %{buildroot}%{_docdir}/postgresql/extension ./
@@ -605,14 +605,19 @@ if [ $1 = 0 ] ; then
 fi
 %endif
 
-%if %tcl
-%post -p /sbin/ldconfig   tcl
-%postun -p /sbin/ldconfig   tcl
+%if %{with plperl}
+%post -p /sbin/ldconfig   plperl
+%postun -p /sbin/ldconfig   plperl
+%endif
+
+%if %{with plpython3}
+%post -p /sbin/ldconfig   plpython3
+%postun -p /sbin/ldconfig   plpython3
 %endif
 
-%if %pls
-%post -p /sbin/ldconfig   pl
-%postun -p /sbin/ldconfig   pl
+%if %{with pltcl}
+%post -p /sbin/ldconfig   pltcl
+%postun -p /sbin/ldconfig   pltcl
 %endif
 
 %if %test
@@ -656,7 +661,6 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/vacuumdb.*
 %{_mandir}/man3/*
 %{_mandir}/man7/*
-%{_localedir}/*/LC_MESSAGES/pgscripts-%{pgver}.mo
 %dir %{_libdir}/postgresql/bitcode
 
 %files docs
@@ -675,7 +679,6 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/postgresql/bloom.so
 %{_libdir}/postgresql/btree_gin.so
 %{_libdir}/postgresql/btree_gist.so
-#%{_libdir}/postgresql/chkpass.so
 %{_libdir}/postgresql/citext.so
 %{_libdir}/postgresql/cube.so
 %{_libdir}/postgresql/dblink.so
@@ -708,15 +711,12 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/postgresql/tablefunc.so
 %{_libdir}/postgresql/tcn.so
 %{_libdir}/postgresql/test_decoding.so
-#%{_libdir}/postgresql/timetravel.so
 %{_libdir}/postgresql/unaccent.so
 %{_bindir}/oid2name
 %{_bindir}/pg_standby
-%{_bindir}/pgbench
 %{_bindir}/vacuumlo
 %{_mandir}/man1/oid2name.*
 %{_mandir}/man1/pg_standby.*
-%{_mandir}/man1/pgbench.*
 %{_mandir}/man1/vacuumlo.*
 
 %if 0
@@ -753,10 +753,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_bindir}/pg_test_timing
 %{_bindir}/pg_upgrade
 %{_bindir}/pg_waldump
+%{_bindir}/pgbench
 %{_bindir}/postgres
 %{_bindir}/postmaster
 %{_mandir}/man1/initdb.*
-##{_mandir}/man1/ipcclean.*
 %{_mandir}/man1/pg_archivecleanup.*
 %{_mandir}/man1/pg_basebackup.*
 %{_mandir}/man1/pg_checksums.*
@@ -771,6 +771,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/pg_test_timing.*
 %{_mandir}/man1/pg_upgrade.*
 %{_mandir}/man1/pg_waldump.*
+%{_mandir}/man1/pgbench.*
 %{_mandir}/man1/postgres.*
 %{_mandir}/man1/postmaster.*
 %dir %{_libdir}/postgresql
@@ -784,7 +785,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/postgresql/tsm_system_time.so
 %dir %{_datadir}/pgsql
 %{_datadir}/pgsql/errcodes.txt
-%{_datadir}/pgsql/extension
+%dir %{_datadir}/pgsql/extension
+%{_datadir}/pgsql/extension/*
+%exclude %{_datadir}/pgsql/extension/pl*
 %{_datadir}/pgsql/*.sql
 %{_datadir}/pgsql/postgres.bki
 %{_datadir}/pgsql/postgres.description
@@ -819,29 +822,30 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libpgport.a
 %{_libdir}/libpgport_shlib.a
 
-%if %tcl
-%files tcl -f tcl.lst
+%if %{with plperl}
+%files plperl -f plperl-%{pgver}.lang
 %defattr(-,root,root)
-%endif
-
-%if %pls
-%files pl -f pl.lst
-%defattr(-,root,root)
-%if %plperl
 %{_libdir}/postgresql/plperl.so
 %{_libdir}/postgresql/hstore_plperl.so
 %{_libdir}/postgresql/jsonb_plperl.so
+%{_datadir}/pgsql/extension/plperl*
 %endif
-%if %pltcl
+
+%if %{with pltcl}
+%files pltcl -f pltcl-%{pgver}.lang
+%defattr(-,root,root)
 %{_libdir}/postgresql/pltcl.so
+%{_datadir}/pgsql/extension/pltcl*
 %endif
-%if %plpython
-#%{_libdir}/postgresql/plpython.so
-%{_libdir}/postgresql/plpython2.so
-%{_libdir}/postgresql/hstore_plpython2.so
-%{_libdir}/postgresql/ltree_plpython2.so
-%{_libdir}/postgresql/jsonb_plpython2.so
-%endif
+
+%if %{with plpython3}
+%files plpython3 -f plpython3.lst
+%defattr(-,root,root)
+%{_libdir}/postgresql/plpython3.so
+%{_libdir}/postgresql/hstore_plpython3.so
+%{_libdir}/postgresql/ltree_plpython3.so
+%{_libdir}/postgresql/jsonb_plpython3.so
+%{_datadir}/pgsql/extension/plpython3*
 %endif
 
 %if %test
@@ -852,6 +856,10 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 %changelog
+* Fri Aug 14 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 12.4-1
+- new upstream release.
+- fixed %%files.
+
 * Fri May 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 12.3-1
 - new upstream release.
 - added systemd support (disabled as default).