| 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 | |
| 109 | post-activate { |
| 110 | if { ![variant_isset no_root] } { |
| 111 | file attributes ${prefix}/Library/LaunchAgents/org.macports.kdecache.plist -owner root -group wheel |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | notes " ########################################################################## |
| 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 | |
| 121 | variant 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." |
| 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 |