⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 httpd.spec.in

📁 最新apache的源代码
💻 IN
📖 第 1 页 / 共 2 页
字号:
%define contentdir /var/www%define suexec_caller apache%define mmn APACHE_MMN%ifarch ia64# disable debuginfo on IA64%define debug_package %{nil}%endifSummary: Apache HTTP ServerName: httpdVersion: APACHE_VERSIONRelease: APACHE_RELEASEURL: http://httpd.apache.org/Vendor: Apache Software FoundationSource0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.gzLicense: Apache License, Version 2.0Group: System Environment/DaemonsBuildRoot: %{_tmppath}/%{name}-rootBuildPrereq: apr-devel, apr-util-devel, openldap-devel, db4-devel, expat-devel, findutils, perl, pkgconfigBuildPrereq: /usr/bin/apr-config, /usr/bin/apu-configRequires: apr >= 0.9.5, apr-util >= 0.9.5, gawk, /usr/share/magic.mime, /usr/bin/find, openldapPrereq: /sbin/chkconfig, /bin/mktemp, /bin/rm, /bin/mvPrereq: sh-utils, textutils, /usr/sbin/useraddProvides: webserverProvides: httpd-mmn = %{mmn}Conflicts: thttpdObsoletes: apache, secureweb, mod_dav%descriptionApache is a powerful, full-featured, efficient, and freely-availableWeb server. Apache is also the most popular Web server on theInternet.%package develGroup: Development/LibrariesSummary: Development tools for the Apache HTTP server.Obsoletes: secureweb-devel, apache-develRequires: libtool, httpd = %{version}Requires: apr-devel >= 0.9.5, apr-util-devel >= 0.9.5%description develThe httpd-devel package contains the APXS binary and other filesthat you need to build Dynamic Shared Objects (DSOs) for Apache.If you are installing the Apache HTTP server and you want to beable to compile or develop additional modules for Apache, you needto install this package.%package manualGroup: DocumentationSummary: Documentation for the Apache HTTP server.Obsoletes: secureweb-manual, apache-manual%description manualThe httpd-manual package contains the complete manual andreference guide for the Apache HTTP server. The information canalso be found at http://httpd.apache.org/docs/.%package -n mod_sslGroup: System Environment/DaemonsSummary: SSL/TLS module for the Apache HTTP serverSerial: 1BuildPrereq: openssl-develPrereq: openssl, dev, /bin/catRequires: httpd, make, httpd-mmn = %{mmn}%description -n mod_sslThe mod_ssl module provides strong cryptography for the Apache Webserver via the Secure Sockets Layer (SSL) and Transport LayerSecurity (TLS) protocols.%prep%setup -q# Safety check: prevent build if defined MMN does not equal upstream MMN.vmmn=`echo MODULE_MAGIC_NUMBER_MAJOR | cpp -include \`pwd\`/include/ap_mmn.h | grep -e '^[0-9]'`if test x${vmmn} != x%{mmn}; then   : Error: Upstream MMN is now ${vmmn}, packaged MMN is %{mmn}.   : Update the mmn macro and rebuild.   exit 1fi# regenerate configure scripts./buildconf# Before configure; fix location of build dir in generated apxs%{__perl} -pi -e "s:\@exp_installbuilddir\@:%{_libdir}/httpd/build:g" \	support/apxs.in%buildif pkg-config openssl ; then	# configure -C barfs with trailing spaces in CFLAGS	CFLAGS="$RPM_OPT_FLAGS `pkg-config --cflags openssl | sed 's/ *$//'`"	AP_LIBS="$AP_LIBS `pkg-config --libs openssl`"else	CFLAGS="$RPM_OPT_FLAGS"	AP_LIBS="-lssl -lcrypto"fiexport CFLAGSexport AP_LIBSfunction mpmbuild(){mpm=$1; shiftmkdir $mpm; pushd $mpmcat > config.cache <<EOFac_cv_func_pthread_mutexattr_setpshared=noac_cv_func_sem_open=noEOF../configure -C \ 	--prefix=%{_sysconfdir}/httpd \ 	--with-apr=/usr/bin/apr-config \	--with-apr-util=/usr/bin/apu-config \	--exec-prefix=%{_prefix} \ 	--bindir=%{_bindir} \ 	--sbindir=%{_sbindir} \ 	--mandir=%{_mandir} \	--libdir=%{_libdir} \	--sysconfdir=%{_sysconfdir}/httpd/conf \	--includedir=%{_includedir}/httpd \	--libexecdir=%{_libdir}/httpd/modules \	--datadir=%{contentdir} \	--with-mpm=$mpm \	--enable-suexec --with-suexec \	--with-suexec-caller=%{suexec_caller} \	--with-suexec-docroot=%{contentdir} \	--with-suexec-logfile=%{_localstatedir}/log/httpd/suexec.log \	--with-suexec-bin=%{_sbindir}/suexec \	--with-suexec-uidmin=500 --with-suexec-gidmin=500 \        --with-devrandom \        --with-ldap --enable-ldap --enable-auth-ldap \        --enable-cache --enable-disk-cache --enable-mem-cache \	--enable-ssl --with-ssl \	--enable-deflate --enable-cgid \	--enable-proxy --enable-proxy-connect \	--enable-proxy-http --enable-proxy-ftp \	$*make %{?_smp_mflags}popd}# Only bother enabling optional modules for main build.mpmbuild prefork --enable-mods-shared=all# To prevent most modules being built statically into httpd.worker, # easiest way seems to be enable them shared.mpmbuild worker --enable-mods-shared=all# Verify that the same modules were built into the two httpd binaries./prefork/httpd -l | grep -v prefork > prefork.mods./worker/httpd -l | grep -v worker > worker.modsif ! diff -u prefork.mods worker.mods; then  : Different modules built into httpd binaries, will not proceed  exit 1fi%installrm -rf $RPM_BUILD_ROOTpushd preforkmake DESTDIR=$RPM_BUILD_ROOT installpopd# install worker binaryinstall -m 755 worker/httpd $RPM_BUILD_ROOT%{_sbindir}/httpd.worker# mod_ssl bitsfor suffix in crl crt csr key prm; do   mkdir $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf/ssl.${suffix}done# Makefiles for certificate management#for ext in crt crl; do #  install -m 644 ./build/rpm/mod_ssl-Makefile.${ext} \#	$RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf/ssl.${ext}/Makefile.${ext}#done#ln -s ../../../usr/share/ssl/certs/Makefile $RPM_BUILD_ROOT/etc/httpd/conf# for holding mod_dav lock databasemkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav# create a prototype session cachemkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/mod_ssltouch $RPM_BUILD_ROOT%{_localstatedir}/cache/mod_ssl/scache.{dir,pag,sem}# move the build directory to within the library directorymv $RPM_BUILD_ROOT%{contentdir}/build $RPM_BUILD_ROOT%{_libdir}/httpd/build# fix up config_vars file: relocate the build directory into libdir;# reference correct libtool from apr; remove references to RPM build root.sed -e "s|%{contentdir}/build|%{_libdir}/httpd/build|g" \    -e "/AP_LIBS/d" -e "/abs_srcdir/d" \    -e "/^LIBTOOL/s|/[^ ]*/libtool|`apr-config --apr-libtool`|" \    -e "/^EXTRA_INCLUDES/s|-I$RPM_BUILD_DIR[^ ]* ||g" \  < prefork/build/config_vars.mk \  > $RPM_BUILD_ROOT%{_libdir}/httpd/build/config_vars.mk# Make the MMN accessible to module packagesecho %{mmn} > $RPM_BUILD_ROOT%{_includedir}/httpd/.mmn# docrootmkdir $RPM_BUILD_ROOT%{contentdir}/htmlrm -r $RPM_BUILD_ROOT%{contentdir}/manual/stylerm $RPM_BUILD_ROOT%{contentdir}/manual/*/*.xml# logsrmdir $RPM_BUILD_ROOT%{_sysconfdir}/httpd/logsmkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/httpd# symlinks for /etc/httpdln -s ../..%{_localstatedir}/log/httpd $RPM_BUILD_ROOT/etc/httpd/logsln -s ../..%{_localstatedir}/run $RPM_BUILD_ROOT/etc/httpd/runln -s ../..%{_libdir}/httpd/modules $RPM_BUILD_ROOT/etc/httpd/modulesln -s ../..%{_libdir}/httpd/build $RPM_BUILD_ROOT/etc/httpd/build# install SYSV init stuffmkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.dinstall -m755 ./build/rpm/httpd.init \	$RPM_BUILD_ROOT/etc/rc.d/init.d/httpd%{__perl} -pi -e "s:\@docdir\@:%{_docdir}/%{name}-%{version}:g" \	$RPM_BUILD_ROOT/etc/rc.d/init.d/httpd	# install log rotation stuffmkdir -p $RPM_BUILD_ROOT/etc/logrotate.dinstall -m644 ./build/rpm/httpd.logrotate \	$RPM_BUILD_ROOT/etc/logrotate.d/httpd# Remove unpackaged filesrm -rf $RPM_BUILD_ROOT%{_libdir}/httpd/modules/*.exp \       $RPM_BUILD_ROOT%{contentdir}/htdocs/* \       $RPM_BUILD_ROOT%{contentdir}/cgi-bin/* %pre# Add the "apache" user/usr/sbin/useradd -c "Apache" -u 48 \	-s /sbin/nologin -r -d %{contentdir} apache 2> /dev/null || :%triggerpostun -- apache < 2.0/sbin/chkconfig --add httpd%post# Register the httpd service/sbin/chkconfig --add httpd%preunif [ $1 = 0 ]; then	/sbin/service httpd stop > /dev/null 2>&1	/sbin/chkconfig --del httpdfi%post -n mod_ssl/sbin/ldconfig ### is this needed?

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -