source: trunk/dports/_resources/port1.0/group/select-1.0.tcl @ 96776

Last change on this file since 96776 was 96776, checked in by blair@…, 7 years ago

group/*: trim trailing whitespace.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1# et:ts=4
2# select-1.0.tcl
3#
4# $Id: select-1.0.tcl 96776 2012-08-19 05:52:01Z blair@macports.org $
5#
6# Copyright (c) 2009 The MacPorts Project
7# Copyright (c) 2009 Rainer Mueller <raimue@macports.org>
8# All rights reserved.
9#
10# Redistribution and use in source and binary forms, with or without
11# modification, are permitted provided that the following conditions are
12# met:
13#
14# 1. Redistributions of source code must retain the above copyright
15#    notice, this list of conditions and the following disclaimer.
16# 2. Redistributions in binary form must reproduce the above copyright
17#    notice, this list of conditions and the following disclaimer in the
18#    documentation and/or other materials provided with the distribution.
19# 3. Neither the name of Apple Computer, Inc. nor the names of its
20#    contributors may be used to endorse or promote products derived from
21#    this software without specific prior written permission.
22#
23# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34#
35
36options select.group select.file
37
38default select.group ""
39default select.file ""
40
41namespace eval select {}
42
43proc select::install {group file} {
44    global prefix destroot frameworks_dir applications_dir developer_dir
45
46    xinstall -m 755 -d ${destroot}${prefix}/etc/select/${group}
47    xinstall -m 644 ${file} ${destroot}${prefix}/etc/select/${group}
48
49    reinplace s|\${prefix}|${prefix}|g ${destroot}${prefix}/etc/select/${group}/[file tail ${file}]
50    reinplace s|\${frameworks_dir}|${frameworks_dir}|g ${destroot}${prefix}/etc/select/${group}/[file tail ${file}]
51    reinplace s|\${applications_dir}|${applications_dir}|g ${destroot}${prefix}/etc/select/${group}/[file tail ${file}]
52    reinplace s|\${developer_dir}|${developer_dir}|g ${destroot}${prefix}/etc/select/${group}/[file tail ${file}]
53}
54
55post-destroot {
56    if {${select.file} != "" && ${select.group} != ""} {
57        select::install ${select.group} ${select.file}
58    } else {
59        ui_debug "PortGroup select: select.group or select.file not set"
60    }
61}
Note: See TracBrowser for help on using the repository browser.