-
Notifications
You must be signed in to change notification settings - Fork 2
/
epm-build-opensource.ksh
executable file
·66 lines (48 loc) · 1.31 KB
/
epm-build-opensource.ksh
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
#!/bin/ksh
scriptName=${0##*/}
# Packaging
if [ `uname -s` = "Linux" ]
then
if [ -f /usr/bin/dpkg ]
then
TARGET_FORMAT="deb"
else
TARGET_FORMAT="rpm"
fi
else
TARGET_FORMAT="depot"
fi
NAME_LIST="core diameter-protocol radius-protocol octcap-protocol synchro-protocol library-java-synchro xcap-protocol h248-protocol msrp-protocol sip-protocol trans-tls crypto trans-sctp external-lib-sctp"
BUILD_VERSION_FILE=build.conf
LIST_DIRECTORY=epm-list
. ./${BUILD_VERSION_FILE}
cd work-${PROJECT_VERSION}
echo "****** ${TARGET_FORMAT}"
echo "****** ${PROJECT_NAME}"
echo "****** ${PROJECT_VERSION}"
case ${TARGET_FORMAT} in
deb | rpm )
TOOL_FORMAT=${TARGET_FORMAT}
TOOL_SYSTEM=linux
;;
depot)
TOOL_FORMAT=swinstall
TOOL_SYSTEM=hpux
;;
*)
echo "Unknown [${TARGET_FORMAT}]"
exit 1
;;
esac
for target_name in ${NAME_LIST}
do
if test ! -f ${PROJECT_NAME}-${target_name}.list
then
cat ../${LIST_DIRECTORY}/${PROJECT_NAME}-${target_name}.list | \
sed -e 's/tool-version/'${PROJECT_VERSION}'/' | \
sed -e 's/tool-format/'${TOOL_FORMAT}'/' | \
sed -e 's/tool-system/'${TOOL_SYSTEM}'/' | \
sed -e 's/build-version/build-'${PROJECT_VERSION}'/g' > ${PROJECT_NAME}-${target_name}.list
fi
epm -vv -f ${TOOL_FORMAT} ${PROJECT_NAME}-${target_name}
done