]> git.pld-linux.org Git - packages/boa.git/blobdiff - boa.spec
- reverting last change: removing new macros from %p{re,ost}{,un}
[packages/boa.git] / boa.spec
index 4144b57ec73fba9fb99e6cb8ea5fb628e466118e..19f398971b51abc3033232667e1d5440c038e468 100644 (file)
--- a/boa.spec
+++ b/boa.spec
@@ -2,7 +2,7 @@ Summary:        Boa high speed HTTP server
 Summary(pl):   Boa - szybki serwer HTTP
 Name:          boa
 Version:       0.94.8.3
-Release:       1
+Release:       2
 License:       GPL
 Group:         Networking/Daemons
 Group(de):     Netzwerkwesen/Server
@@ -19,7 +19,7 @@ Prereq:               %{_sbindir}/useradd
 Prereq:                %{_sbindir}/userdel
 BuildRequires: flex
 BuildRequires: sgml-tools
-Requires:      rc-scripts
+Prereq:                rc-scripts
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Obsoletes:     apache
 
@@ -44,7 +44,7 @@ systemowych.
 
 %build
 cd src
-CFLAGS="%{?debug:-O0 -g}%{!?debug:$RPM_OPT_FLAGS} -DINET6"
+CFLAGS="%{rpmcflags} -DINET6"
 %configure
 %{__make}
 (cd ../docs; make boa.html )
@@ -73,8 +73,23 @@ gzip -9nf README
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-%{_sbindir}/groupadd -g 51 -f http > /dev/null 2>&1
-%{_sbindir}/useradd -u 51 -f http -g http > /dev/null 2>&1
+if [ -n "`getgid http`" ]; then
+        if [ "`getgid http`" != "51" ]; then
+                echo "Warning:group http haven't gid=51. Correct this before install boa" 1>&2
+                exit 1
+        fi
+else
+        /usr/sbin/groupadd -g 51 -r -f http
+fi
+if [ -n "`id -u http 2>/dev/null`" ]; then
+        if [ "`id -u http`" != "51" ]; then
+                echo "Warning:user http haven't uid=51. Correct this before install boa" 1>&2
+                exit 1
+        fi
+else
+        /usr/sbin/useradd -u 51 -r -d /home/httpd -s /bin/false -c "HTTP User" -g http http 1>&2
+fi
+
 
 %postun
 if [ "$1" = "0" ]; then
@@ -83,7 +98,14 @@ if [ "$1" = "0" ]; then
 fi
 
 %post
-/sbin/chkconfig -add %{name}
+/sbin/chkconfig --add %{name}
+
+if [ -f /var/lock/subsys/httpd ]; then
+        /etc/rc.d/init.d/httpd restart 1>&2
+else
+        echo "Run \"/etc/rc.d/init.d/boa start\" to start boa http daemon."
+fi
+
 
 %preun
 if [ "$1" = "0" ]; then
This page took 0.036253 seconds and 4 git commands to generate.