• 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
  • 相关阅读:
    c# 与 winform 界面开发
    文件大小的友好输出及其 Python 实现
    bookhub -- 扁平化本地电子书管理与分享工具
    阶段性放弃 wxPython 前的总结
    数据挖掘环境下的个人信息安全
    精益阅读 -- 科技图书的阅读过程管理工具
    wxPython Modal Dialog 模式对话框
    wxPython 基本框架与运行原理 -- App 与 Frame
    JAVA向,二叉查找树
    线性表实践-选票算法
  • 原文地址:https://www.cnblogs.com/xiaoming279/p/6253063.html
Copyright © 2020-2023  润新知