博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Nginx RPM包SPEC文件
阅读量:7022 次
发布时间:2019-06-28

本文共 5777 字,大约阅读时间需要 19 分钟。

  hot3.png

...

%define realname nginx%define realver  1.4.2%define srcext   tar.gz%define page_speed_commit cd80e92%define psolver           1.6.29.3%if 0%{?suse_version}%define USER   wwwrun%define GROUP  www%define PREFIX /srv/www%define WEB_USER_HOME /var/lib/lighttpd%else%define USER   apache%define GROUP  apache%define PREFIX /var/www%define WEB_USER_HOME /var/www%endif%define CONF_FILE %{_sysconfdir}/%{name}/%{name}.conf# Common infoName:          %{realname}Version:       %{realver}Release:       16.1License:       BSD-2-ClauseGroup:         Productivity/Networking/Web/ServersURL:           http://nginx.org/Summary:       HTTP and reverse proxy server, as well as a mail proxy server# Install-time parametersProvides:      httpd http_daemon webserver %{?suse_version:suse_help_viewer}Requires:      logrotate# Build-time parametersBuildRequires: gcc-c++ libstdc++-develBuildRequires: dos2unixBuildRequires: zlib-devel openssl-devel pcre-develBuildRequires: libxml2-devel libxslt-devel gd-devel libGeoIP-devel%if 0%{?suse_version} || 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} >= 600BuildRequires: libaio-devel%endifBuildRoot:     %{_tmppath}/%{name}-rootSource0:       http://nginx.org/download/%{realname}-%{realver}%{?extraver}.%{srcext}Source1:       nginx.logrotateSource2:       nginx.initSource3:       nginx.sysconfigSource91:      https://github.com/pagespeed/ngx_pagespeed/tarball/%{page_speed_commit}/pagespeed-ngx_pagespeed-%{page_speed_commit}.tar.gzSource92:      https://dl.google.com/dl/page-speed/psol/%{psolver}.tar.gzPatch:         nginx-memset_zero.patch#!BuildIgnore: freetype2%descriptionnginx [engine x] is a HTTP and reverse proxy server, as well as a mail proxy serverThis nginx package built with Google PageSpeed# Preparation step (unpackung and patching if necessary)%prep%setup -q -n %{realname}-%{realver}%{?extraver} -a91%{__tar} -zxf %{S:92} -C pagespeed-ngx_pagespeed-%{page_speed_commit}%patch -p1%build./configure \ --prefix=%{PREFIX} \ --sbin-path=%{_sbindir}/%{name} \ --conf-path=%{CONF_FILE} \ --error-log-path=%{_localstatedir}/log/%{name}/error.log \ --http-log-path=%{_localstatedir}/log/%{name}/access.log \ --pid-path=%{_localstatedir}/run/%{name}.pid \ --lock-path=%{_localstatedir}/lock/%{name}.lock \ --user=%{USER} \ --group=%{GROUP} \ \ --http-client-body-temp-path=%{_localstatedir}/cache/%{name}/client_body_temp \ --http-proxy-temp-path=%{_localstatedir}/cache/%{name}/proxy_temp \ --http-fastcgi-temp-path=%{_localstatedir}/cache/%{name}/fastcgi_temp \ --http-uwsgi-temp-path=%{_localstatedir}/cache/%{name}/uwsgi_temp \ --http-scgi-temp-path=%{_localstatedir}/cache/%{name}/scgi_temp \%if 0%{?suse_version} || 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} >= 600 --with-file-aio \%endif --with-ipv6 \ \ --with-http_ssl_module \ --with-http_spdy_module \ --with-http_realip_module \ --with-http_addition_module \ --with-http_xslt_module \ --with-http_image_filter_module \ --with-http_geoip_module \ --with-http_sub_module \ --with-http_dav_module \ --with-http_flv_module \ --with-http_mp4_module \ --with-http_gzip_static_module \ --with-http_random_index_module \ --with-http_secure_link_module \ --with-http_degradation_module \ --with-http_stub_status_module \ \ --with-mail \ --with-mail_ssl_module \ \ --with-cc-opt="%{optflags}" \ --with-ld-opt="-Wl,--as-needed -Wl,--strip-all" \ \ --with-pcre \ --with-pcre-jit \ --add-module=%{_builddir}/%{realname}-%{realver}%{?extraver}/pagespeed-ngx_pagespeed-%{page_speed_commit}%__make %{?_smp_mflags}%install%__make install DESTDIR=%{buildroot}iconv -f koi8-r CHANGES.ru > c && %__mv -f c CHANGES.ru%__install -D -m644 man/nginx.8 %{buildroot}%{_mandir}/man8/nginx.8%__install -D -m644 %{S:1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}%__install -d -m755 %{buildroot}%{_initrddir}sed -r 's|##PREFIX##|%{PREFIX}|; s|##CONF_FILE##|%{CONF_FILE}|' %{S:2} > %{buildroot}%{_initrddir}/%{name}%__rm -f %{buildroot}%{PREFIX}/html/index.html%if %{expand:%_vendor == "suse"}%__mv %{buildroot}%{PREFIX}/html %{buildroot}%{PREFIX}/htdocs%__install -d -m755 %{buildroot}/var/adm/fillup-templatessed -r 's|##PREFIX##|%{PREFIX}|; s|##CONF_FILE##|%{CONF_FILE}|' %{S:3} > %{buildroot}/var/adm/fillup-templates/sysconfig.%{name}%__ln_s -f %{_initrddir}/%{name} %{buildroot}%{_sbindir}/rc%{name}dos2unix contrib/geo2nginx.pl%__install -D -m755 contrib/geo2nginx.pl %{buildroot}%{_bindir}/geo2nginx.pl%else%__install -d -m755 %{buildroot}/%{_sysconfdir}/sysconfigsed -r 's|##PREFIX##|%{PREFIX}|; s|##CONF_FILE##|%{CONF_FILE}|' %{S:3} > %{buildroot}/%{_sysconfdir}/sysconfig/%{name}%endif%__install -d -m755 %{buildroot}%{_localstatedir}/cache/%{name}%clean[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}%files%defattr(-,root,root)%doc CHANGES CHANGES.ru LICENSE README%dir %{_sysconfdir}/%{name}%config(noreplace) %{_sysconfdir}/%{name}/*%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}%{_sbindir}/nginx%attr(0755,root,root) %{_initrddir}/%{name}%dir %attr(0755,%{USER},%{GROUP}) %{_localstatedir}/log/%{name}%if %{expand:%_vendor == "suse"}%{_bindir}/geo2nginx.pl%{_sbindir}/rcnginx%{PREFIX}/htdocs/*/var/adm/fillup-templates/sysconfig.%{name}%else%{PREFIX}/html/*%config(noreplace) %{_sysconfdir}/sysconfig/%{name}%endif%doc %{_mandir}/man8/*%dir %attr(0755,%{USER},%{GROUP}) %{_localstatedir}/cache/%{name}%pre/usr/sbin/groupadd -r %{GROUP} &>/dev/null ||:/usr/sbin/useradd  -g %{GROUP} -s /bin/false -r -c "Web-server" -d %{WEB_USER_HOME} %{USER} &>/dev/null ||:%if 0%{?suse_version}%post%{fillup_and_insserv %{name}}%preun%{stop_on_removal %{name}}rm -rf %{_localstatedir}/cache/%{name}/*%postun%{restart_on_update %{name}}%{insserv_cleanup}%else%preunrm -rf %{_localstatedir}/cache/%{name}/*%endif%changelog

转载于:https://my.oschina.net/guol/blog/309955

你可能感兴趣的文章
深入探讨Java类加载器
查看>>
springmvc hello-servlet.xml配置文件
查看>>
kindeditor + syntaxhighlighter 使文章内的插入代码高亮显示
查看>>
angular2 学习二 [property] - 绑定属性
查看>>
iostat 实例分析
查看>>
php学习日记
查看>>
Qt新建项目
查看>>
虚拟机的克隆并更改主机名
查看>>
分享一波Android面试题
查看>>
python入门系列:文件操作
查看>>
适合练习的10个Python项目,每个项目都不到500行代码
查看>>
iOS宏定义的使用与规范
查看>>
Cisco ASA 应用NAT
查看>>
微信环境中不支持APP(APK)文件下载的解决方案---使用augpush实现跳转
查看>>
Python进阶之路 3.4.4 比较运算符
查看>>
数据库系统学习二
查看>>
extmail一个正常收发邮件log(内网测试)
查看>>
深入探索spring技术内幕(五): 剖析spring AOP工作原理
查看>>
利用内容提供者来操作联系人数据库
查看>>
UNIX网络编程书中源代码测试环境搭建 (centos中取时间问题)
查看>>