Ticket #26039: php5-fpm-subport-startup.diff

File php5-fpm-subport-startup.diff, 2.6 KB (added by MailToArlo@…, 12 years ago)
  • Portfile

     
    88# Increment revision of ${php}-eaccelerator when updating version of ${php}.
    99version                 5.4.0RC7
    1010set major               [lindex [split ${version} .] 0]
     11set suffix                              [join [lrange [split ${version} .] 0 1] {}]
    1112categories              lang php www
    1213maintainers             ryandesign jwa
    1314platforms               darwin freebsd
     
    6364   
    6465    configure.args      --mandir=${prefix}/share/man \
    6566                        --infodir=${prefix}/share/info \
    66                         --program-suffix=[join [lrange [split ${version} .] 0 1] {}] \
     67                        --program-suffix=${suffix} \
    6768                        --includedir=${prefix}/include/${php} \
    6869                        --libdir=${prefix}/lib/${php} \
    6970                        --with-config-file-path=${phpinidir} \
     
    251252    build.target            fpm
    252253   
    253254    destroot.target         install-fpm
     255   
     256    startupitem.create      yes
     257    startupitem.start       "${prefix}/share/${php}/php-fpm start"
     258    startupitem.stop        "${prefix}/share/${php}/php-fpm stop"
     259    startupitem.restart     "${prefix}/share/${php}/php-fpm restart"
     260   
     261    post-destroot {
     262        xinstall -m 755 -d ${destroot}${prefix}/var/run
     263
     264        xinstall -m 755 -d ${destroot}${prefix}/share/${php}
     265
     266        xinstall -m 755 -W ${worksrcpath}/sapi/fpm \
     267            init.d.php-fpm.in \
     268            ${destroot}${prefix}/share/${php}/php-fpm
     269           
     270        reinplace "s|@prefix@||g" \
     271                ${destroot}${prefix}/share/${php}/php-fpm
     272       
     273        reinplace "s|@exec_prefix@||g" \
     274                ${destroot}${prefix}/share/${php}/php-fpm
     275       
     276        reinplace "s|@sbindir@/php-fpm|${prefix}/sbin/php-fpm${suffix}|g" \
     277                ${destroot}${prefix}/share/${php}/php-fpm
     278       
     279        reinplace "s|@sysconfdir@|${prefix}/etc|g" \
     280                ${destroot}${prefix}/share/${php}/php-fpm
     281       
     282        reinplace "s|@localstatedir@|${prefix}/var|g" \
     283                ${destroot}${prefix}/share/${php}/php-fpm
     284           
     285            if {![file exists ${prefix}/etc/php-fpm.conf]} {
     286                notes-append "
     287To customize FPM, copy\
     288${prefix}/etc/php-fpm.conf.example to\
     289${prefix}/etc/php-fpm.conf and then make changes.
     290Do not forget to uncomment general.pid.
     291"
     292                } else {
     293           notes-append "
     294You may need to update your php-fpm.conf for any changes that have been made\
     295in this version of ${php}. Compare ${prefix}/etc/php-fpm.conf with\
     296${prefix}/etc/php-fpm.conf.example.
     297Do not forget to uncomment general.pid.
     298"
     299                }
     300    }
    254301}