#
%define beta %{nil}
-%define pgversion 10
-%define pgpriority 100
+%define pgsqlversion 10
+%define pgsqlpriority 100
Summary: PostgreSQL Data Base Management System
Summary(de.UTF-8): PostgreSQL Datenbankverwaltungssystem
Summary(tr.UTF-8): Veri Tabanı Yönetim Sistemi
Summary(uk.UTF-8): PostgreSQL - система керування базами даних
Summary(zh_CN.UTF-8): PostgreSQL 客户端程序和库文件
-Name: postgresql-%{pgversion}
-Version: %{pgversion}.5
+Name: postgresql-%{pgsqlversion}
+Version: %{pgsqlversion}.5
Release: 2
License: BSD
Group: Applications/Databases
Obsoletes: postgresql-test
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define pgsqldatadir %{_datadir}/postgresql/%{pgversion}
-%define pgsqllibdir %{_libdir}/postgresql/%{pgversion}
+%define pgsqldatadir %{_datadir}/postgresql/%{pgsqlversion}
+%define pgsqllibdir %{_libdir}/postgresql/%{pgsqlversion}
%define moduledir %{pgsqllibdir}/lib
%define extensiondir %{pgsqldatadir}/extension
PostgreSQL - wspólne pliki i katalogi.
%package dirs
-Summary: Common directories for PostgresSQL %{pgversion}
-Summary(pl.UTF-8): Wspólne pliki i katalogi dla PostgreSQL %{pgversion}
+Summary: Common directories for PostgresSQL %{pgsqlversion}
+Summary(pl.UTF-8): Wspólne pliki i katalogi dla PostgreSQL %{pgsqlversion}
Group: Applicataion/Databases
%description dirs
-Common directories for PostgresSQL %{pgversion}
+Common directories for PostgresSQL %{pgsqlversion}
%description dirs -l pl.UTF-8
-Wspólne pliki i katalogi dla PostgreSQL %{pgversion}
+Wspólne pliki i katalogi dla PostgreSQL %{pgsqlversion}
%package -n postgresql-devel
Summary: PostgreSQL development header files and libraries
touch $RPM_BUILD_ROOT/var/log/pgsql
-sed -e 's,@pgsqlbindir@,%{pgsqllibdir}/bin,g; s,@pgsqlversion@,%{pgversion},g;' %{SOURCE1} >$RPM_BUILD_ROOT/etc/rc.d/init.d/postgresql-%{pgversion}
-install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/postgresql-%{pgversion}
+sed -e 's,@pgsqlbindir@,%{pgsqllibdir}/bin,g; s,@pgsqlversion@,%{pgsqlversion},g;' %{SOURCE1} >$RPM_BUILD_ROOT/etc/rc.d/init.d/postgresql-%{pgsqlversion}
+sed -e 's,@pgsqlversion@,%{pgsqlversion},g;' %{SOURCE3} >$RPM_BUILD_ROOT/etc/sysconfig/postgresql-%{pgsqlversion}
install -d howto
tar zxf %{SOURCE2} -C howto
for f in libpq5 pgscripts postgres psql initdb ecpg ecpglib6 \
plpgsql %{?with_perl:plperl} %{?with_python:plpython} \
pg_archivecleanup pg_basebackup pg_config pg_controldata pg_ctl pg_dump pg_resetwal pg_rewind pg_test_fsync pg_test_timing pg_upgrade pg_waldump; do
- %find_lang $f-%{pgversion}
+ %find_lang $f-%{pgsqlversion}
done
# merge locales
merge_lang() {
- cat $(for f in $@; do echo ${f}-%{pgversion}.lang ; done)
+ cat $(for f in $@; do echo ${f}-%{pgsqlversion}.lang ; done)
}
merge_lang pgscripts postgres plpgsql \
pg_basebackup pg_controldata pg_resetwal pg_rewind pg_upgrade pg_test_fsync pg_test_timing pg_waldump > main.lang
pg_archivecleanup pg_ctl pg_dump > clients.lang
%if %{with tcl}
-%find_lang pltcl-%{pgversion}
+%find_lang pltcl-%{pgsqlversion}
%endif
%if %{with selinux}
%{__mv} $RPM_BUILD_ROOT{%{pgsqldatadir}/contrib,%{extensiondir}}/sepgsql.sql
%endif
-cp -p src/pl/plperl/ppport.h $RPM_BUILD_ROOT%{_includedir}/postgresql/%{pgversion}/server/
+cp -p src/pl/plperl/ppport.h $RPM_BUILD_ROOT%{_includedir}/postgresql/%{pgsqlversion}/server/
%{__mv} $RPM_BUILD_ROOT{%{pgsqllibdir}/bin,%{_bindir}}/pg_config
%{__mv} $RPM_BUILD_ROOT{%{pgsqldatadir}/man,%{_mandir}}/man1/pg_config.1
%pre
PG_DB_CLUSTERS=""
-if [ -f /etc/sysconfig/postgresql-%{pgversion} ]; then
- . /etc/sysconfig/postgresql-%{pgversion}
+if [ -f /etc/sysconfig/postgresql-%{pgsqlversion} ]; then
+ . /etc/sysconfig/postgresql-%{pgsqlversion}
if [ -z "$PG_DB_CLUSTERS" -a -n "$POSTGRES_DATA_DIR" ]; then
PG_DB_CLUSTERS="$POSTGRES_DATA_DIR"
fi
foundold=0
for pgdir in $PG_DB_CLUSTERS; do
if [ -f $pgdir/PG_VERSION ]; then
- if [ $(cat $pgdir/PG_VERSION) != '%{pgversion}' ]; then
+ if [ $(cat $pgdir/PG_VERSION) != '%{pgsqlversion}' ]; then
echo "Found database(s) in older, incompatible format in cluster $pgdir."
foundold=1
fi
echo
%post
-/sbin/chkconfig --add postgresql-%{pgversion}
-%service postgresql-%{pgversion} restart "postgresql-%{pgversion} server"
+/sbin/chkconfig --add postgresql-%{pgsqlversion}
+%service postgresql-%{pgsqlversion} restart "postgresql-%{pgsqlversion} server"
%preun
if [ "$1" = "0" ]; then
- %service postgresql-%{pgversion} stop
- /sbin/chkconfig --del postgresql-%{pgversion}
+ %service postgresql-%{pgsqlversion} stop
+ /sbin/chkconfig --del postgresql-%{pgsqlversion}
fi
%pre -n postgresql-common
%posttrans clients
update-alternatives \
- --install %{_bindir}/clusterdb clusterdb %{pgsqllibdir}/bin/clusterdb %{pgpriority} \
+ --install %{_bindir}/clusterdb clusterdb %{pgsqllibdir}/bin/clusterdb %{pgsqlpriority} \
--slave %{_mandir}/man1/clusterdb.1 clusterdb.1 %{pgsqldatadir}/man/man1/clusterdb.1* || :
update-alternatives \
- --install %{_bindir}/createdb createdb %{pgsqllibdir}/bin/createdb %{pgpriority} \
+ --install %{_bindir}/createdb createdb %{pgsqllibdir}/bin/createdb %{pgsqlpriority} \
--slave %{_mandir}/man1/createdb.1 createdb.1 %{pgsqldatadir}/man/man1/createdb.1* || :
update-alternatives \
- --install %{_bindir}/createuser createuser %{pgsqllibdir}/bin/createuser %{pgpriority} \
+ --install %{_bindir}/createuser createuser %{pgsqllibdir}/bin/createuser %{pgsqlpriority} \
--slave %{_mandir}/man1/createuser.1 createuser.1 %{pgsqldatadir}/man/man1/createuser.1* || :
update-alternatives \
- --install %{_bindir}/dropdb dropdb %{pgsqllibdir}/bin/dropdb %{pgpriority} \
+ --install %{_bindir}/dropdb dropdb %{pgsqllibdir}/bin/dropdb %{pgsqlpriority} \
--slave %{_mandir}/man1/dropdb.1 dropdb.1 %{pgsqldatadir}/man/man1/dropdb.1* || :
update-alternatives \
- --install %{_bindir}/dropuser dropuser %{pgsqllibdir}/bin/dropuser %{pgpriority} \
+ --install %{_bindir}/dropuser dropuser %{pgsqllibdir}/bin/dropuser %{pgsqlpriority} \
--slave %{_mandir}/man1/dropuser.1 dropuser.1 %{pgsqldatadir}/man/man1/dropuser.1* || :
update-alternatives \
- --install %{_bindir}/pg_archivecleanup pg_archivecleanup %{pgsqllibdir}/bin/pg_archivecleanup %{pgpriority} \
+ --install %{_bindir}/pg_archivecleanup pg_archivecleanup %{pgsqllibdir}/bin/pg_archivecleanup %{pgsqlpriority} \
--slave %{_mandir}/man1/pg_archivecleanup.1 pg_archivecleanup.1 %{pgsqldatadir}/man/man1/pg_archivecleanup.1* || :
update-alternatives \
- --install %{_bindir}/pg_dump pg_dump %{pgsqllibdir}/bin/pg_dump %{pgpriority} \
+ --install %{_bindir}/pg_dump pg_dump %{pgsqllibdir}/bin/pg_dump %{pgsqlpriority} \
--slave %{_mandir}/man1/pg_dump.1 pg_dump.1 %{pgsqldatadir}/man/man1/pg_dump.1* || :
update-alternatives \
- --install %{_bindir}/pg_dumpall pg_dumpall %{pgsqllibdir}/bin/pg_dumpall %{pgpriority} \
+ --install %{_bindir}/pg_dumpall pg_dumpall %{pgsqllibdir}/bin/pg_dumpall %{pgsqlpriority} \
--slave %{_mandir}/man1/pg_dumpall.1 pg_dumpall.1 %{pgsqldatadir}/man/man1/pg_dumpall.1* || :
update-alternatives \
- --install %{_bindir}/pg_isready pg_isready %{pgsqllibdir}/bin/pg_isready %{pgpriority} \
+ --install %{_bindir}/pg_isready pg_isready %{pgsqllibdir}/bin/pg_isready %{pgsqlpriority} \
--slave %{_mandir}/man1/pg_isready.1 pg_isready.1 %{pgsqldatadir}/man/man1/pg_isready.1* || :
update-alternatives \
- --install %{_bindir}/pg_restore pg_restore %{pgsqllibdir}/bin/pg_restore %{pgpriority} \
+ --install %{_bindir}/pg_restore pg_restore %{pgsqllibdir}/bin/pg_restore %{pgsqlpriority} \
--slave %{_mandir}/man1/pg_restore.1 pg_restore.1 %{pgsqldatadir}/man/man1/pg_restore.1* || :
update-alternatives \
- --install %{_bindir}/psql psql %{pgsqllibdir}/bin/psql %{pgpriority} \
+ --install %{_bindir}/psql psql %{pgsqllibdir}/bin/psql %{pgsqlpriority} \
--slave %{_mandir}/man1/psql.1 pgsql.1 %{pgsqldatadir}/man/man1/psql.1* || :
update-alternatives \
- --install %{_bindir}/reindexdb reindexdb %{pgsqllibdir}/bin/reindexdb %{pgpriority} \
+ --install %{_bindir}/reindexdb reindexdb %{pgsqllibdir}/bin/reindexdb %{pgsqlpriority} \
--slave %{_mandir}/man1/reindexdb.1 reindexdb.1 %{pgsqldatadir}/man/man1/reindexdb.1* || :
update-alternatives \
- --install %{_bindir}/vacuumdb vacuumdb %{pgsqllibdir}/bin/vacuumdb %{pgpriority} \
+ --install %{_bindir}/vacuumdb vacuumdb %{pgsqllibdir}/bin/vacuumdb %{pgsqlpriority} \
--slave %{_mandir}/man1/vacuumdb.1 vacuumdb.1 %{pgsqldatadir}/man/man1/vacuumdb.1* || :
%postun clients
%files -f main.lang
%defattr(644,root,root,755)
%doc COPYRIGHT README HISTORY doc/{bug.template,KNOWN_BUGS,MISSING_FEATURES,TODO}
-%attr(754,root,root) /etc/rc.d/init.d/postgresql-%{pgversion}
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/postgresql-%{pgversion}
+%attr(754,root,root) /etc/rc.d/init.d/postgresql-%{pgsqlversion}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/postgresql-%{pgsqlversion}
%attr(755,root,root) %{pgsqllibdir}/bin/initdb
%attr(755,root,root) %{pgsqllibdir}/bin/pg_basebackup
%doc doc/src/sgml/html howto
%{_examplesdir}/%{name}-%{version}
-%files -n postgresql-libs -f libpq5-%{pgversion}.lang
+%files -n postgresql-libs -f libpq5-%{pgsqlversion}.lang
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libpq.so.*.*
%attr(755,root,root) %ghost %{_libdir}/libpq.so.5
-%files ecpg -f ecpg-%{pgversion}.lang
+%files ecpg -f ecpg-%{pgsqlversion}.lang
%defattr(644,root,root,755)
%attr(755,root,root) %{pgsqllibdir}/bin/ecpg
%{pgsqldatadir}/man/man1/ecpg.1*
-%files -n postgresql-ecpg-libs -f ecpglib6-%{pgversion}.lang
+%files -n postgresql-ecpg-libs -f ecpglib6-%{pgsqlversion}.lang
%attr(755,root,root) %{_libdir}/libecpg.so.*.*
%attr(755,root,root) %ghost %{_libdir}/libecpg.so.6
%attr(755,root,root) %{_libdir}/libecpg_compat.so.*.*
%{_libdir}/libecpg_compat.a
%{_libdir}/libpgtypes.a
-%files -n postgresql-devel -f pg_config-%{pgversion}.lang
+%files -n postgresql-devel -f pg_config-%{pgsqlversion}.lang
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/pg_config
%attr(755,root,root) %{_libdir}/libpq.so
%files backend-devel
%defattr(644,root,root,755)
-%dir %{_includedir}/postgresql/%{pgversion}
-%{_includedir}/postgresql/%{pgversion}/server
+%dir %{_includedir}/postgresql/%{pgsqlversion}
+%{_includedir}/postgresql/%{pgsqlversion}/server
%dir %{moduledir}/pgxs
%attr(755,root,root) %{moduledir}/pgxs/config
%{moduledir}/pgxs/src
%{pgsqldatadir}/man/man7/*.7*
%if %{with perl}
-%files module-plperl -f plperl-%{pgversion}.lang
+%files module-plperl -f plperl-%{pgsqlversion}.lang
%defattr(644,root,root,755)
%attr(755,root,root) %{moduledir}/plperl.so
%{extensiondir}/plperl--*.sql
%endif
%if %{with python}
-%files module-plpython -f plpython-%{pgversion}.lang
+%files module-plpython -f plpython-%{pgsqlversion}.lang
%defattr(644,root,root,755)
%attr(755,root,root) %{moduledir}/plpython2.so
%{extensiondir}/plpython*--*.sql
%endif
%if %{with tcl}
-%files module-pltcl -f pltcl-%{pgversion}.lang
+%files module-pltcl -f pltcl-%{pgsqlversion}.lang
%defattr(644,root,root,755)
%attr(755,root,root) %{moduledir}/pltcl.so
%{extensiondir}/pltcl*--*.sql