[MacPorts] #52277: apache2: packaging support

MacPorts noreply at macports.org
Mon Sep 19 22:00:50 CEST 2016


#52277: apache2: packaging support
--------------------------+--------------------------
 Reporter:  ctreleaven@…  |      Owner:  ryandesign@…
     Type:  enhancement   |     Status:  new
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.3.4
 Keywords:  haspatch      |       Port:  apache2
--------------------------+--------------------------
 I'm working on building an installer for mythtv.28.  Myth includes a MAMP
 application (MythWeb) which relies on apache2.  However, a MacPorts-
 produced mpkg or mdmg that includes apache2 will not run properly as
 daemondo will not be included.  Ideally, the following snippet of code
 should be included in apache2 to fix this issue:

 {{{
 if {[info exists pkg.asroot]} {
         pkg.asroot              yes
 }

 pre-pkg {
     if {![info exists pkg.asroot]} {
         ui_error "Packaging ${name} ${version} requires MacPorts 2.3.5 or
 greater (pkg.asroot support)"
         return -code error "Incompatible MacPorts version"
     }

     # at this point the destroot has been pruned and bin doesn't exist
     xinstall -d -m 0755 ${destroot}${prefix}/bin
     # apache2 needs daemondo; ram a copy into the destroot so it will be
 packaged
     xinstall -m 0755 ${prefix}/bin/daemondo ${destroot}${prefix}/bin/
 }
 }}}

 Note that this relies on 'pkg.asroot yes' which is an unreleased feature
 of MacPorts base.  (Scheduled for 2.3.5.)  Packaging will fail if this is
 run on 2.3.4 or earlier but that is preferable to creating an incomplete
 pkg.

 The above only impacts the 'pkg' phase; there is no change to the files
 that apache2 normally installs.  As such, a rev bump is not even
 necessary.

-- 
Ticket URL: <https://trac.macports.org/ticket/52277>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list