Debian Codegraph @

misc/kore-build/helpers.sh

raw symbols SCIP
1 if [scip-shell system . . `[`. -z "$ROOT" ]; then
2 echoscip-shell system . . echo. "No ROOT set"
3 exit 1
4 fi
5
6 SOURCES=sources
7 BUILD=$ROOT/build
8 FAKEROOT=$ROOT/fakeroot
9
10 LASTDIR=`pwdscip-shell system . . pwd.`
11
12 pushdscip-shell shell shell-project 0.0.0 pushd().() {
13 LASTDIR=`pwdscip-shell system . . pwd.`
14 cd $1
15 }
16
17 popdscip-shell shell shell-project 0.0.0 popd().() {
18 cd $LASTDIR
19 }
20
21 fetchscip-shell shell shell-project 0.0.0 fetch().() {
22 url=$1
23 name=$2
24
25 if [scip-shell system . . `[`. -f $SOURCES/$name.tar.gz ]; then
26 return
27 fi
28
29 curlscip-shell system . . curl. -L "$url" > $SOURCES/$name.tar.gz
30 }
31
32 default_buildscip-shell shell shell-project 0.0.0 default_build().() {
33 name=$1
34 shift
35 config=$*
36
37 buildscip-shell shell shell-project 0.0.0 build(). $name ./configure --prefix=$FAKEROOT/$NAME $config
38 }
39
40 buildscip-shell shell shell-project 0.0.0 build().() {
41 name=$1
42 shift
43 configcmd=$*
44
45 if [scip-shell system . . `[`. -f $BUILD/$name/.built ]; then
46 return
47 fi
48
49 rmscip-shell system . . rm. -rf $BUILD/$name
50 rmscip-shell system . . rm. -rf $FAKEROOT/$name
51
52 tarscip-shell system . . tar. -zvxf $SOURCES/$name.tar.gz -C $BUILD
53
54 pushdscip-shell shell shell-project 0.0.0 pushd(). $BUILD/$name
55 mkdirscip-shell system . . mkdir. -p $FAKEROOT/$name
56
57 $configcmd
58
59 makescip-shell system . . make. -j
60 makescip-shell system . . make. install
61 popdscip-shell shell shell-project 0.0.0 popd().
62
63 touchscip-shell system . . touch. $BUILD/$name/.built
64 }
65
66 setupscip-shell shell shell-project 0.0.0 setup().() {
67 mkdirscip-shell system . . mkdir. -p $BUILD
68 mkdirscip-shell system . . mkdir. -p $SOURCES
69 mkdirscip-shell system . . mkdir. -p $FAKEROOT
70 }
71
72 setupscip-shell shell shell-project 0.0.0 setup().