-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample.module
More file actions
42 lines (33 loc) · 1.32 KB
/
sample.module
File metadata and controls
42 lines (33 loc) · 1.32 KB
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
# A module definition sample. Use it to add your specific software to the build
# Remove all the echoes except two last functions last ones!
# Пример файла определения модуля. Используйте его для добавления специфического ПО для Ваших нужд в сборку
# Не забудьте убрать ВСЕ эхо-выводы кроме последних в двух последних функциях!
sample_DEPENDENCIES=""
function sample_init {
echo "[$1] module initalizer called"
}
function sample_fetch {
echo "[$1] module fetcher called"
}
function sample_extract {
echo "[$1] module exracter called"
}
function sample_build {
local ADDENDUM=""
if [ $USE_TOOLCHAIN -gt 0 ]; then
$ADDENDUM="CC=$CC CXX=$CXX CPP=$CPP CFLAGS=\"$CFLAGS\" CPPFLAGS=\"$CPPFLAGS\" CXXFLAGS=\"$CXXFLAGS\" LD=$LD LDFLAGS=\"$LDFLAGS\" "
fi
cd $WORK_ROOT/build/$1
if [ $TRACE_RUN -eq 0 ]; then
./bootstrap &> ${WORK_ROOT}/logs/$1-bootstrap.log
./configure --prefix=$INSTALL_PREFIX $ADDENDUM > ${WORK_ROOT}/logs/$1-configure.log
make -j4 &> ${WORK_ROOT}/logs/$1.log && make install clean &> /dev/null
fi
DEP_BUILT="$1 $DEP_BUILT"
}
function sample_actual {
echo "2"
}
function sample_getactualdependency {
echo $sample_DEPENDENCIES
}