-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathbuild-libs-tools-apps
More file actions
executable file
·75 lines (62 loc) · 1.5 KB
/
build-libs-tools-apps
File metadata and controls
executable file
·75 lines (62 loc) · 1.5 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
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
74
75
#!/bin/sh
# Libraries/Apps/Tools
LIBS_FILES="libs-xcode libs-ppd libs-steptalk libs-ucsdata libs-renaissance apps-gorm libs-gdl2 libs-gsweb libs-java"
TOOLS_FILES="tools-charsets"
APPS_FILES="apps-systempreferences apps-gworkspace apps-projectcenter apps-thematic apps-easydiff"
# export
export GNUSTEP_MAKEFILES
if [ "$GNUSTEP_MAKEFILES" = "" ]; then
echo "\$GNUSTEP_MAKEFILES not set"
exit -1
fi
echo $GNUSTEP_MAKEFILES
# OS
OS=`uname -s`
# OpenBSD?
# number of processes
if [ "$OS" = "OpenBSD" ]; then
CPUS=`sysctl hw.ncpu | sed 's/hw.ncpu\=//g'`
MAKE="gmake"
else
CPUS=`nproc`
MAKE="make"
fi
# func..
build_and_install()
{
echo "***** Building ${1}..."
cd ${1}
if [ -f configure ]; then
./configure
fi
if [ -f GNUmakefile ]; then
$MAKE -j${CPUS} debug=yes
if [ "$OS" = "MINGW64_NT*" ]; then
. ${GNUSTEP_MAKEFILES}/GNUstep.sh && ${MAKE} GNUSTEP_INSTALLATION_DOMAIN=SYSTEM debug=yes install
else
sudo -E -- sh -c ". ${GNUSTEP_MAKEFILES}/GNUstep.sh && ${MAKE} GNUSTEP_INSTALLATION_DOMAIN=SYSTEM debug=yes install"
fi
fi
cd ..
echo "***** Done"
echo " "
}
install_files()
{
for file in ${1}
do
build_and_install $file
done
}
do_install()
{
. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
echo "======= Building libraries."
install_files "${LIBS_FILES}"
echo "======= Building tools."
install_files "${TOOLS_FILES}"
echo "======= Building applications."
install_files "${APPS_FILES}"
}
do_install
exit 0