[root@DB SPECS]# cat tengine-2.1.0.specName: tengineVersion: 2.1.0Release: 1%{?dist}Summary: tengine rmp package productionGroup: Applications/ArchivingLicense: GPLv2URL: http://tengine.taobao.orgSource: http://tengine.taobao.org/download/tengine-2.1.0.tar.gzBuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)BuildRequires: gccRequires: gcc gcc-c++ autoconf automake%descriptionCustom tengine rpm package%preprm -rf $RPM_BUILD_DIR/tengine-2.1.0tar fx $RPM_SOURCE_DIR/tengine-2.1.0.tar.gz%buildcd tengine-2.1.0./configure --prefix=/apps/tengine-2.1.0 \ --user=www --group=www \ --with-pcre=/data/tengin安装包/pcre-8.38 \ --with-openssl=/data/tengin安装包/openssl-1.0.2j \ --with-jemalloc=/data/tengin安装包/jemalloc-3.6.0 \ --with-http_realip_module \ --with-http_concat_module \ --with-zlib=/data/tengin安装包/zlib-1.2.8 \ --add-module=/data/tengin安装包/ngx_cache_purge-2.1make %{?_smp_mflags}%installrm -rf %{buildroot}cd tengine-2.1.0make install DESTDIR=%{buildroot}%cleanrm -rf %{buildroot}%files%defattr(-,root,root,-)/apps/tengine-2.1.0