LINUX.ORG.RU

Ответ на: комментарий от anonymous

Summary: apache httpd web server
Name: apache
Version: 1.3.33
Release: 1
Copyright: Apache License
Source0: %{name}_%{version}.tar.gz
URL: http://www.apache.org
Group: System Environment/Daemons
Requires: perl
BuildRoot: /var/tmp/%{name}-%{version}-root
%description
apache httpd web server

%package devel
Summary: development files
Group: Development/Libraries
Requires: apache
%description devel
development files

%prep
%setup -n %{name}_%{version}

%build
./configure \
    --prefix=/usr \
    --bindir=/usr/bin \
    --sbindir=/usr/sbin \
    --includedir=/usr/include/apache \
    --mandir=/usr/share/man \
    --sysconfdir=/etc/httpd \
    --iconsdir=/var/www/icons \
    --htdocsdir=/var/www/htdocs \
    --manualdir=/var/www/manual \
    --cgidir=/var/www/cgi-bin \
    --logfiledir=/var/log/apache \
    --runtimedir=/var/run \
    --server-uid=httpd \
    --server-gid=httpd \
    --enable-module=so
make

%install
mkdir -p "$RPM_BUILD_ROOT"/etc/rc.d/init.d
make root="$RPM_BUILD_ROOT" install
cat > "$RPM_BUILD_ROOT"/etc/rc.d/init.d/httpd << EOF
#!/bin/sh
#
# Startup script for the Apache Web Server
#
# chkconfig: 345 85 15
# description: Apache is a World Wide Web server.  It is used to serve \\
#	       HTML files and CGI.
# processname: httpd
# pidfile: /var/run/httpd.pid
# config: /etc/httpd/conf/httpd.conf


# Source function library.
. /etc/rc.d/init.d/functions

# See how we were called.
case "\$1" in
  start)
	echo -n "Starting httpd: "
	daemon /usr/sbin/httpd
	echo
	touch /var/lock/subsys/httpd
	;;
  stop)
	echo -n "Shutting down http: "
	killproc httpd
	echo
	rm -f /var/lock/subsys/httpd
	rm -f /var/run/httpd.pid
	;;
  status)
	status httpd
	;;
  restart)
	\$0 stop
	\$0 start
	;;
  reload)
	echo -n "Reloading httpd: "
	killproc httpd -HUP
	echo
	;;
  *)
	echo "Usage: \$0 {start|stop|restart|reload|status}"
	exit 1
esac

exit 0
EOF

%pre
(grep httpd /etc/group || groupadd -g 80 httpd)>/dev/null 2>&1
(grep httpd /etc/passwd || useradd -u 80 -g httpd -d /var/www -s /bin/false -r httpd)>/dev/null 2>&1

%post
chkconfig --level 345 httpd on

%files
%defattr(0664,root,root,0755)

%config(noreplace) %attr(0644,root,root) /etc/httpd/access.conf
%config(noreplace) %attr(0644,root,root) /etc/httpd/httpd.conf
%config(noreplace) %attr(0644,root,root) /etc/httpd/magic
%config(noreplace) %attr(0644,root,root) /etc/httpd/mime.types
%config(noreplace) %attr(0644,root,root) /etc/httpd/srm.conf

%attr(0755,root,root) /usr/bin/*
%attr(0755,root,root) /usr/sbin/*
%attr(-,root,root) /etc/httpd/*.default
%attr(0755,root,root) /etc/rc.d/init.d/httpd
%attr(0644,root,root) /usr/libexec/*
%attr(-,root,root) /var/www/*
%attr(0644,root,root) /usr/share/man/man1/*
%attr(0644,root,root) /usr/share/man/man8/*

%dir %attr(0755,root,root) /var/www
%dir %attr(0755,root,root) /var/log/apache

%doc ABOUT_APACHE Announcement INSTALL LICENSE README README-WIN.TXT WARNING-WIN.TXT src/BUILD.NOTES src/CHANGES src/PORTING 

%files devel
%defattr(0664,root,root,0755)

%attr(-,root,root) /usr/include/apache/*

anonymous2 ★★★★★
()

A pkg_version |grep "<" ниче не кажет ((((((((

Foster
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.