Fri, 07 Sep 2012 19:08:07 +0200
Correct build configuration in Solaris subdir, correct english grammar,
remove irrelevant strip notice, introduce custom CFLAG logic, facilitate
use of Solaris Studio compiler with needed build configuration
adjustments, conditionally build 64 bit position independent code,
and accommodate tun(7) in newer Solaris releases by renaming driver
and module from conflicting 'tun' to 'vtun'. These changes include
some nonstandard 'I give up' logic causing out of tree builds by
manipulating the PATH, for example.
1 ##
2 ## curl.sh -- OpenPKG Tools "curl" command
3 ## Copyright (c) 2000-2012 OpenPKG GmbH <http://openpkg.com/>
4 ##
5 ## This software is property of the OpenPKG GmbH, DE MUC HRB 160208.
6 ## All rights reserved. Licenses which grant limited permission to use,
7 ## copy, modify and distribute this software are available from the
8 ## OpenPKG GmbH.
9 ##
10 ## THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21 ## SUCH DAMAGE.
22 ##
24 # determine path to OpenPKG instance
25 PREFIX="${OPENPKG_PREFIX}"
27 # determine curl and config
28 curl="$PREFIX/lib/openpkg/curl"
29 conf="$PREFIX/etc/openpkg/curlrc"
31 # remove user supplied -q option (ignore ~/.curlrc)
32 [ ".$1" = .-q ] && shift
34 # force -q option (ignore ~/.curlrc) and -f option (error checking)
35 set -- "-q" "-f" "$@"
37 # prepend --config <file> option if conf file is readable
38 declare -a a;
39 [ -r "$conf" ] && set -- "--config" "$conf" "$@"
41 # execute underlying application
42 exec $curl "$@"