]> git.pld-linux.org Git - packages/Firebird.git/blobdiff - Firebird.spec
- new
[packages/Firebird.git] / Firebird.spec
index 97cf9e0fb5cd2a5ffbe46a88db49aab7f13400c3..deaa6910d747c9543d04bcec2ac82299708cedcb 100644 (file)
@@ -3,12 +3,12 @@ Summary:      Firebird SQL Database Server and Client tools
 Summary(pl):   Firebird - serwer baz danych SQL oraz narzêdzia klienckie
 Name:          Firebird
 # FirebirdCS/FirebirdSS (Classic Server/Super Server)?
-Version:       1.5.1.4500
-Release:       3
+Version:       1.5.2.4731
+Release:       1
 License:       Interbase Public License 1.0
 Group:         Applications/Databases
 Source0:       http://dl.sourceforge.net/firebird/firebird-%{version}.tar.bz2
-# Source0-md5: d4594415a3615dd06192abdad57ae04d
+# Source0-md5: fea53ed5213cff4bd96513fb1a6c0ca2
 Source1:       http://www.ibphoenix.com/downloads/60All.zip
 # Source1-md5: f86a132012361cd4ae88563105741a4c
 Source2:       http://www.ibphoenix.com/downloads/ib_4_0_docs.tar.gz
@@ -168,6 +168,48 @@ ln -sf libfbstatic.a $RPM_BUILD_ROOT%{_libdir}/libgds.a
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+if [ -n "`/usr/bin/getgid firebird`" ]; then
+        if [ "`/usr/bin/getgid firebird`" != "145" ]; then
+                echo "Error: group firebird doesn't have gid=145. Correct this before installing firebird." 1>&2
+                exit 1
+        fi
+else
+        /usr/sbin/groupadd -g 145 firebird
+fi
+if [ -n "`/bin/id -u firebird 2>/dev/null`" ]; then
+        if [ "`/bin/id -u firebird`" != "89" ]; then
+                echo "Error: user firebird doesn't have uid=145. Correct this before installing firebird." 1>&2
+                exit 1
+        fi
+else
+        /usr/sbin/useradd -u 145 \
+                        -d %{ibdir} -s /bin/sh -g firebird \
+                        -c "Firebird Server" firebird 1>&2
+fi
+
+%post
+/sbin/chkconfig --add firebird
+if [ -f /var/lock/subsys/firebird ]; then
+        /etc/rc.d/init.d/firebird restart >&2
+else
+        echo "Run \"/etc/rc.d/init.d/firebird start\" to start firebird." >&2
+fi
+
+%preun
+if [ "$1" = "0" ]; then
+        if [ -f /var/lock/subsys/firebird ]; then
+                /etc/rc.d/init.d/firebird stop
+        fi
+        /sbin/chkconfig --del firebird
+fi
+
+%postun
+if [ "$1" = "0" ]; then
+        %userremove firebird
+        %groupremove firebird
+fi
+
 %post  lib -p /sbin/ldconfig
 %postun        lib -p /sbin/ldconfig
 
@@ -186,6 +228,8 @@ rm -rf $RPM_BUILD_ROOT
 %{ibdir}/security.fdb
 %{ibdir}/aliases.conf
 %{ibdir}/firebird.conf
+%attr(754,root,root) /etc/rc.d/init.d/firebird
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/firebird
 
 %files lib
 %defattr(644,root,root,755)
This page took 0.08226 seconds and 4 git commands to generate.