Summary(tr.UTF-8): Veri Tabanı Yönetim Sistemi
Summary(uk.UTF-8): PostgreSQL - система керування базами даних
Summary(zh_CN.UTF-8): PostgreSQL 客户端程序和库文件
-Name: postgresql%{pgversion}
+Name: postgresql-%{pgversion}
Version: %{pgversion}.5
Release: 2
License: BSD
install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
$RPM_BUILD_ROOT/var/{lib/pgsql,log,run/postgresql} \
$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \
- $RPM_BUILD_ROOT%{_mandir}
+ $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
install src/tutorial/*.sql $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
touch $RPM_BUILD_ROOT/var/log/pgsql
-sed -e 's,@pgsqlbindir@,%{pgsqllibdir}/bin,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' %{SOURCE1} >$RPM_BUILD_ROOT/etc/rc.d/init.d/postgresql-%{pgversion}
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/postgresql-%{pgversion}
install -d howto
tar zxf %{SOURCE2} -C howto
cp -p src/pl/plperl/ppport.h $RPM_BUILD_ROOT%{_includedir}/postgresql/%{pgversion}/server/
+%{__mv} $RPM_BUILD_ROOT{%{pgsqllibdir}/bin,%{_bindir}}/pg_config
+%{__mv} $RPM_BUILD_ROOT{%{pgsqldatadir}/man,%{_mandir}}/man1/pg_config.1
+
# package it...? nah, why bother.
%{__rm} -r $RPM_BUILD_ROOT%{pgsqldatadir}/doc/html
%pre
PG_DB_CLUSTERS=""
-if [ -f /etc/sysconfig/postgresql%{pgversion} ]; then
- . /etc/sysconfig/postgresql%{pgversion}
+if [ -f /etc/sysconfig/postgresql-%{pgversion} ]; then
+ . /etc/sysconfig/postgresql-%{pgversion}
if [ -z "$PG_DB_CLUSTERS" -a -n "$POSTGRES_DATA_DIR" ]; then
PG_DB_CLUSTERS="$POSTGRES_DATA_DIR"
fi
echo
%post
-/sbin/chkconfig --add postgresql%{pgversion}
-%service postgresql%{pgversion} restart "postgresql%{pgversion} server"
+/sbin/chkconfig --add postgresql-%{pgversion}
+%service postgresql-%{pgversion} restart "postgresql-%{pgversion} server"
%preun
if [ "$1" = "0" ]; then
- %service postgresql%{pgversion} stop
- /sbin/chkconfig --del postgresql%{pgversion}
+ %service postgresql-%{pgversion} stop
+ /sbin/chkconfig --del postgresql-%{pgversion}
fi
%pre -n postgresql-common
update-alternatives --remove vacuumdb %{pgsqllibdir}/bin/vacuumdb || :
fi
-%posttrans -n postgresql-devel
-update-alternatives \
- --install %{_bindir}/pg_config pg_config %{pgsqllibdir}/bin/pg_config %{pgsuffix} \
- --slave %{_mandir}/man1/pg_config.1 pg_config.1 %{pgsqldatadir}/man/man1/pg_config.1* || :
-
%postun -n postgresql-devel
update-alternatives --remove pg_config %{pgsqllibdir}/bin/pg_config || :
-
%post -n postgresql-libs -p /sbin/ldconfig
%postun -n postgresql-libs -p /sbin/ldconfig
%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-%{pgversion}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/postgresql-%{pgversion}
%attr(755,root,root) %{pgsqllibdir}/bin/initdb
%attr(755,root,root) %{pgsqllibdir}/bin/pg_basebackup
%files -n postgresql-devel -f pg_config-%{pgversion}.lang
%defattr(644,root,root,755)
-%attr(755,root,root) %{pgsqllibdir}/bin/pg_config
+%attr(755,root,root) %{_bindir}/pg_config
%attr(755,root,root) %{_libdir}/libpq.so
%dir %{_includedir}/postgresql
%{_includedir}/libpq-events.h
%{_includedir}/postgresql/internal/libpq
%{_includedir}/libpq
%{_libdir}/pkgconfig/libpq.pc
-%{pgsqldatadir}/man/man1/pg_config.1*
+%{_mandir}/man1/pg_config.1*
%files backend-devel
%defattr(644,root,root,755)