PG_INIT_LOCALE=C
# Get service config
-if [ -f /etc/sysconfig/postgresql9.6 ]; then
- . /etc/sysconfig/postgresql9.6
+if [ -f /etc/sysconfig/postgresql-@pgsqlversion@ ]; then
+ . /etc/sysconfig/postgresql-@pgsqlversion@
else
- nls "Error: %s not found" /etc/sysconfig/postgresql9.6
+ nls "Error: %s not found" /etc/sysconfig/postgresql-@pgsqlversion@
nls " PostgreSQL can't be run."
exit 1
fi
for pgdir in $PG_DB_CLUSTERS; do
pgstatus "$pgdir"
if [ "$PG_STATUS" = "running" ]; then
- touch /var/lock/subsys/postgresql9.6
+ touch /var/lock/subsys/postgresql-@pgsqlversion@
return
fi
done
- rm -f /var/lock/subsys/postgresql9.6
+ rm -f /var/lock/subsys/postgresql-@pgsqlversion@
}
#
Summary(tr.UTF-8): Veri Tabanı Yönetim Sistemi
Summary(uk.UTF-8): PostgreSQL - система керування базами даних
Summary(zh_CN.UTF-8): PostgreSQL 客户端程序和库文件
-Name: postgresql%{pgsuffix}
-Version: 9.6.10
+Name: postgresql-%{pgversion}
+Version: %{pgversion}.10
Release: 1
License: BSD
Group: Applications/Databases
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}
+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}
install -d howto