forked from OpenModelica/OMLibraries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-common.sh
32 lines (30 loc) · 945 Bytes
/
build-common.sh
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
#!/bin/sh
LIB=`echo $1 | sed "s,build/*\(.*\).ok,\1,"`
VERSION=`echo $LIB | grep " " | cut -d" " -f2-`
LIB=`echo $LIB | cut -d" " -f1`
NAME="$LIB`test -z "$VERSION" || echo " "`$VERSION"
LICENSE=`cat "build/$NAME.license"`
if test -f "build/$NAME.mo"; then
EXT=".mo"
fi
DEBNAME=`./debian-name.sh "$LIB" $VERSION`
DEBREV=`cat "build/$NAME.last_change" | tr '-' '~'`
RPMREV=`echo $DEBREV | tr '-' '~'`
FULLNAME="${DEBNAME}_${DEBREV}"
FULLRPMNAME="${DEBNAME}_${FULLNAME}"
DIR="debian-build/$FULLNAME"
DEBIAN="$DIR/debian/"
DEPENDS=`test -f "build/$NAME.depends" && cat "build/$NAME.depends"`
ORIGURL=`cat "build/$NAME.url"`
if test -f "build/$NAME.breaks"; then
BREAKS=`cat "build/$NAME.breaks"`
BREAKCMD="s/@BREAKS@/Breaks: ${BREAKS}/"
else
BREAKCMD="/@BREAKS@/d"
fi
if test -f "build/$NAME.provides"; then
PROVIDES=`cat "build/$NAME.provides"`
PROVIDESCMD="s/@PROVIDES@/Provides: ${PROVIDES}/"
else
PROVIDESCMD="/@PROVIDES@/d"
fi