]> git.pld-linux.org Git - packages/postgresql.git/commitdiff
- added support fo /etc/sysconfig/postgresql
authorwaszi <waszi@pld-linux.org>
Sun, 5 Dec 1999 17:56:59 +0000 (17:56 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- fixed %%post

Changed files:
    postgresql.spec -> 1.27

postgresql.spec

index 4b76f7ac3a77c4110604a1beabd4c4c366a2f8a9..4db5d9b2ffc8d88ef82546087659b4f1ba97e5a9 100644 (file)
@@ -11,8 +11,9 @@ Copyright:    BSD
 Group:         Applications/Databases
 Group(pl):     Aplikacje/Bazy Danych
 Source0:       ftp://ftp.postgresql.org/pub/%{name}-%{version}.tar.gz
-Source1:       postgresql.init
+Source1:       %{name}.init
 Source2:       pgsql-Database-HOWTO-html.tar.gz
+Source3:       %{name}.sysconfig
 Patch0:                postgresql-opt.patch
 Patch1:                postgresql-DESTDIR.patch
 Patch2:                postgresql-perl.patch
@@ -396,7 +397,7 @@ make all PGDOCS=unpacked -C doc
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/rc.d/init.d \
+install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
         $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/pgsql,%{_mandir},%{_includedir}/pgsql} \
         $RPM_BUILD_ROOT/var/state/pgsql
                
@@ -445,6 +446,7 @@ install -d $RPM_BUILD_ROOT/etc/rc.d/init.d \
 mv -f $RPM_BUILD_ROOT/usr/*.ini $RPM_BUILD_ROOT/etc
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/postgresql
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/postgresql
 
 install -d howto
 ( cd howto
@@ -480,10 +482,11 @@ chmod +x $RPM_BUILD_ROOT%{_libdir}/*.so*
 /sbin/chkconfig --add postgresql
 
 # Create sample database
-su postgres -c "LD_LIBRARY_PATH=%{_libdir} \
-    %{_bindir}/initdb --pgdata=/var/state/pgsql \
-    --pglib=%{_libdir}/pgsql"
-
+if [ ! -f /var/state/psql/PG_VERSION ]; then
+    su postgres -c "LD_LIBRARY_PATH=%{_libdir} \
+       %{_bindir}/initdb --pgdata=/var/state/pgsql \
+       --pglib=%{_libdir}/pgsql"
+fi
 
 %preun
 if [ $1 = 0 ]; then
@@ -534,6 +537,7 @@ rm -f /tmp/tmp_perl_info
 %doc doc/*.ps.gz
 
 %attr(754,root,root) /etc/rc.d/init.d/*
+%attr(640,root,root) /etc/sysconfig/*
 
 %attr(755,root,root) %{_bindir}/cleardbdir
 %attr(755,root,root) %{_bindir}/createdb
This page took 0.146243 seconds and 4 git commands to generate.