Changeset 99050


Ignore:
Timestamp:
Oct 25, 2012, 2:56:54 AM (12 years ago)
Author:
nicos@…
Message:

kdelibs4: adding agent for automatic refreshment of cache (ticket #36552, maintainer timeout)

Location:
trunk/dports/kde/kdelibs4
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/kde/kdelibs4/Portfile

    r97738 r99050  
    7777}
    7878
     79set startup_root ""
     80
    7981pre-activate {
    8082    if {![catch {set vers [lindex [registry_active kde4-runtime] 0]}]
     
    9294    eval xinstall -m 644 [glob ${worksrcpath}/nepomuk/core/*.h] \
    9395        ${destroot}${prefix}/include/nepomuk
     96   
     97    xinstall -d -m 755 ${destroot}${prefix}/Library/LaunchAgents
     98    xinstall -m 644 ${filespath}/org.macports.kdecache.plist \
     99        ${destroot}${prefix}/Library/LaunchAgents
     100    reinplace "s|%PREFIX%|${prefix}|g" \
     101        ${destroot}${prefix}/Library/LaunchAgents/org.macports.kdecache.plist
     102    reinplace "s|%APPLICATIONS_DIR%|${applications_dir}|g" \
     103        ${destroot}${prefix}/Library/LaunchAgents/org.macports.kdecache.plist
     104   
     105    xinstall -d -m 755 ${destroot}${startup_root}/Library/LaunchAgents
     106    ln -s ${prefix}/Library/LaunchAgents/org.macports.kdecache.plist ${destroot}${startup_root}/Library/LaunchAgents
     107}
     108
     109post-activate {
     110    if { ![variant_isset no_root] } {
     111        file attributes ${prefix}/Library/LaunchAgents/org.macports.kdecache.plist -owner root -group wheel
     112    }
     113}
     114
     115notes " ##########################################################################
     116 # An agent to provide communication between KDE programs must be started.
     117 # To start it run the following command:
     118 # launchctl load -w ${startup_root}/Library/LaunchAgents/org.macports.kdecache.plist
     119 ##########################################################################"
     120
     121variant no_root description {Run the kde case agent as MacPorts install user.} {
     122    pre-fetch {
     123        if { ${install.user}=="root" || ${install.group}=="wheel" } {
     124            ui_error "The kde cache agent should not be run as root with no_root variant."
     125            error "Please do not use this variant with your MacPorts configuration."
     126        }
     127    }
     128
     129    set startup_root  [join [lrange [exec /usr/bin/dscl . -read Users/${install.user} NFSHomeDirectory] 1 end]]
     130    # Files are installed into user's startup directory.
     131    destroot.violate_mtree  yes
    94132}
    95133
Note: See TracChangeset for help on using the changeset viewer.