• php-7.1.0 rpm包制作


    nginx-1.8.0 rpm包制作见上篇文章:http://www.cnblogs.com/xiaoming279/p/6251149.html

    spec文件

    Name:            php    
    Version:         7.1.0    
    Release:        1%{?dist}
    Summary:         php
    
    Group:            Applications/Server    
    License:         GPLv2    
    URL:            http://www.51.com
    Source0:        %{name}-%{version}.tar.gz    
    Source1:        php.ini-production
    Source2:        php-fpm.conf
    
    BuildRequires:        gcc,make    
    Requires:        zlib libpng-devel libjpeg-turbo-devel libcurl-devel  libjpeg freetype libgpg-error-devel libxslt libxslt-devel libpng gd curl libmcrypt libmcrypt-devel zlib-devel libxml2-devel libjpeg-devel freetype-devel libpng-devel gd-devel curl-devel
    BuildRoot:        %{_topdir}/BUILDROOT 
    
    %description
    It's a php compile by hexm@51.com.
    
    %prep
    %setup -q
    
    %build
    echo $RPM_BUILD_ROOT
    
    ./configure 
     --prefix=%{_prefix} 
     --enable-fpm 
     --with-fpm-user=nobody 
     --with-config-file-path=%{_prefix}/lib 
     --with-fpm-group=nobody 
     --with-mysqli 
     --with-pdo-mysql 
     --with-freetype-dir 
     --with-jpeg-dir 
     --with-png-dir 
     --with-zlib 
     --with-libxml-dir=/usr 
     --enable-xml 
     --disable-rpath 
     --enable-bcmath 
     --enable-shmop 
     --enable-sysvsem 
     --enable-inline-optimization 
     --with-curl 
     --enable-mbregex 
     --enable-mbstring 
     --with-mcrypt 
     --enable-ftp 
     --with-gd 
     --enable-gd-native-ttf 
     --with-openssl 
     --with-mhash 
     --enable-pcntl 
     --enable-sockets 
     --with-xmlrpc 
     --enable-zip 
     --enable-soap 
     --without-pear 
     --disable-phar 
     --with-gettext 
     --disable-fileinfo 
     --enable-maintainer-zts
    
    make %{?_smp_mflags}
    
    %install
    [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
    make INSTALL_ROOT=$RPM_BUILD_ROOT install
    %{__install} -p -D %{SOURCE1} $RPM_BUILD_ROOT/%{_prefix}/lib/php.ini
    %{__install} -p -D %{SOURCE2} $RPM_BUILD_ROOT/%{_prefix}/etc/php-fpm.conf
    
    %pre
    
    %post
    ln -sv %{_prefix} /usr/local/%{name}  &> /dev/null
    [ ! -d /data/logs/%{name} ] && mkdir -p /data/logs/%{name}  &> /dev/null
    
    %preun
    
    %postun
    rm -rf /usr/local/%{name}
    rm -rf %{_prefix}
    
    %clean
    [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
    
    %files
    %defattr (-,root,root,0755)
    %{_prefix}
    
    %changelog
  • 相关阅读:
    如何很“礼貌”的避免抛出空指针异常
    如何优雅的使用第三方插件写实体类
    IntelliJ IDEA(2019.03)破解教程(亲测实用)
    vue.js 中使用(...)运算符报错的解决方法
    44个Java性能优化
    Spring MVC原理及配置
    Intellij IDEA 从入门到上瘾 图文教程
    JVM系列二 GC策略&内存申请、对象衰老
    Spring MVC国际化配置
    Java性能优化的50个细节(珍藏版)
  • 原文地址:https://www.cnblogs.com/xiaoming279/p/6253063.html
Copyright © 2020-2023  润新知