From: Marcin Krol <hawk@tld-linux.org>
Date: Thu, 23 Aug 2018 10:36:01 +0000 (+0000)
Subject: - versioning cosmetics
X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=816502c06555f626f9ab617caaa7e138cb011e72;p=packages%2Fpostgresql.git

- versioning cosmetics
---

diff --git a/postgresql.spec b/postgresql.spec
index f391bb6..c3d930f 100644
--- a/postgresql.spec
+++ b/postgresql.spec
@@ -571,8 +571,8 @@ done
 
 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
@@ -620,8 +620,8 @@ rm -rf $RPM_BUILD_ROOT
 
 %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
@@ -649,13 +649,13 @@ if [ "$foundold" = "1" ]; then
 fi
 
 %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
 
 %posttrans	clients
@@ -719,8 +719,8 @@ fi
 %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