-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathportz_invoke
executable file
·74 lines (59 loc) · 1.61 KB
/
portz_invoke
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
#
# This file is part of 'portz'
#
# Copyright (C) Zbigniew Zagorski <z.zagorski@gmail.com> and others,
# licensed to the public under the terms of the GNU GPL (>= 2)
# see the file COPYING for details
#
# I.e., do what you like, but keep copyright and there's NO WARRANTY.
#
PNAME=portz-invoke
export PNAME
set -e
#set -x
portz_libdir=${portz_libdir-`pwd`}
. ${portz_libdir}/scripts/runtime.sh
. ${portz_scripts}/functions.sh
. ${portz_scripts}/build_defs.sh
. ${portz_scripts}/package_defs.sh
load_package $1
shift
build_command="$0 $package_path"
export build_command
PNAME="$PNAME[$package_name]"
SCRIPT_NAME="$PNAME"
parent_src_dir="${TMP}/portz/${package_name}/src"
src_dir=$(portz_step ${TMP}/portz/${package_name}/src find_src_dir || true)
if [ -n "${src_dir}" ] ; then
inform src_dir="$src_dir"
bld_dir=$(portz_step ${src_dir} find_bld_dir)
inform bld_dir="$bld_dir"
fi
maybe_detect_stereotype
setup_package_build_defs
while [ -n "$1" ] ; do
action="$1"
case "$action" in
fetch_src):
. ${portz_scripts}/fetch_src.sh "${parent_src_dir}"
;;
build|configure|install_staging)
portz_step ${bld_dir} $action
;;
patch|patch_after_conf)
portz_step ${src_dir} $action
;;
dist)
portz_step $(pwd) $action
;;
deploy|make_manifest|make_pkginfo)
portz_step ${staging_dir} $action
;;
*)
fail "unknown action '$action'"
;;
esac
shift
done
# jedit: :tabSize=8:indentSize=4:noTabs=true:mode=shellscript: