-
Notifications
You must be signed in to change notification settings - Fork 27
/
xorg-utils-X11R7.7_install
executable file
·194 lines (159 loc) · 5.79 KB
/
xorg-utils-X11R7.7_install
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
#!/usr/bin/env bash
###############################################
# Installing xorg-utils
#
# by Heather Kelly, 2015
#
NAME=${NAME:-xorg}
VERSION=${VERSION:-X11R7.7}
INSTALL_PREFIX=${INSTALL_PREFIX:-/shared/ucl/apps/xorg/utils/$VERSION/$COMPILER_TAG}
XUTILMACROS_NAME=${XUTILMACROS_NAME:-util-macros-1.17}
XUTILMACROS_SRC_ARCHIVE=${XUTILMACROS_SRC_ARCHIVE:-http://www.x.org/releases/X11R7.7/src/util/${XUTILMACROS_NAME}.tar.gz}
XUTILMACROS_MD5=${XUTILMACROS_MD5:-e162e8921cd08c50bf17b9de5131b3f1}
MAKEDEPEND_NAME=${MAKEDEPEND_NAME:-makedepend-1.0.5}
MAKEDEPEND_SRC_ARCHIVE=${MAKEDEPEND_SRC_ARCHIVE:-http://www.x.org/releases/individual/util/${MAKEDEPEND_NAME}.tar.bz2}
MAKEDEPEND_MD5=${MAKEDEPEND_MD5:-0475638eb40a3920d0d3f14482c924a4}
XDMCP_NAME=${XDMCP_NAME:-libXdmcp-1.1.1}
XDMCP_SRC_ARCHIVE=${XDMCP_SRC_ARCHIVE:-ftp://ftp.x.org/pub/X11R7.7/src/lib/${XDMCP_NAME}.tar.bz2}
XDMCP_MD5=${XDMCP_MD5:-b94af6cef211cf3ee256f7e81f70fcd9}
# may want to build only the first or last three support packages at once
BUILD_UTILS=${BUILD_UTILS:-yes}
BUILD_XKB=${BUILD_XKB:-yes}
# these are needed for xkeyboard-config
LIBXKBFILE_NAME=${LIBXKBFILE_NAME:-libxkbfile-1.0.8}
LIBXKBFILE_SRC_ARCHIVE=${LIBXKBFILE_SRC_ARCHIVE:-https://www.x.org/releases/X11R7.7/src/everything/${LIBXKBFILE_NAME}.tar.bz2}
LIBXKBFILE_SHA256=${LIBXKBFILE_SHA256:-8aa94e19c537c43558f30906650cea6e15fa012591445d9f927658c3b32a8f3a}
XKBCOMP_NAME=${XKBCOMP_NAME:-xkbcomp-1.2.4}
XKBCOMP_SRC_ARCHIVE=${XKBCOMP_SRC_ARCHIVE:-https://www.x.org/releases/X11R7.7/src/everything/${XKBCOMP_NAME}.tar.bz2}
XKBCOMP_SHA256=${XKBCOMP_SHA256:-91d0c9ab445d21dfe1892dbae5ae5264f39bae68223dd092ffc547c9450b5a2d}
XKEYBOARD_CONFIG_NAME=${XKEYBOARD_CONFIG_NAME:-xkeyboard-config-2.6}
XKEYBOARD_CONFIG_SRC_ARCHIVE=${XKEYBOARD_CONFIG_SRC_ARCHIVE:-https://www.x.org/releases/X11R7.7/src/everything/${XKEYBOARD_CONFIG_NAME}.tar.bz2}
XKEYBOARD_CONFIG_SHA256=${XKEYBOARD_CONFIG_SHA256:-22a1594116bf0ee3165f48487bdca4e5f25b2a1436e35e188b3ee38c543dabda}
set -e
# module prereqs for building
if [ $BUILD_XKB == "yes" ]
then
dirname=$(dirname $0 2>/dev/null)
INCLUDES_DIR=${INCLUDES_DIR:-${dirname}/includes}
source ${INCLUDES_DIR}/require_inc.sh
prereq intltool # needed for xkeyboard-config
fi
mkdir -p /dev/shm/$NAME
temp_dir=`mktemp -d -p /dev/shm/$NAME`
cd $temp_dir
if [ $BUILD_UTILS == "yes" ]
then
wget $XUTILMACROS_SRC_ARCHIVE
xutilmacros_archive=$(basename "${XUTILMACROS_SRC_ARCHIVE}")
XUTILMACROS_CHECKSUM=`md5sum $xutilmacros_archive| awk '{print $1}'`
if [ "$XUTILMACROS_MD5" != "$XUTILMACROS_CHECKSUM" ]
then
echo "Hash mismatch for $xutilmacros_archive."
echo "Expected: $XUTILMACROS_MD5"
echo "Got: $XUTILMACROS_CHECKSUM"
exit 1;
fi
wget $MAKEDEPEND_SRC_ARCHIVE
makedepend_archive=$(basename "${MAKEDEPEND_SRC_ARCHIVE}")
MAKEDEPEND_CHECKSUM=`md5sum $makedepend_archive| awk '{print $1}'`
if [ "$MAKEDEPEND_MD5" != "$MAKEDEPEND_CHECKSUM" ]
then
echo "Hash mismatch for $makedepend_archive."
echo "Expected: $MAKEDEPEND_MD5"
echo "Got: $MAKEDEPEND_CHECKSUM"
exit 1;
fi
wget $XDMCP_SRC_ARCHIVE
xdmcp_archive=$(basename "${XDMCP_SRC_ARCHIVE}")
XDMCP_CHECKSUM=`md5sum $xdmcp_archive| awk '{print $1}'`
if [ "$XDMCP_MD5" != "$XDMCP_CHECKSUM" ]
then
echo "Hash mismatch for $xdmcp_archive."
echo "Expected: $XDMCP_MD5"
echo "Got: $XDMCP_CHECKSUM"
exit 1;
fi
fi
if [ $BUILD_XKB == "yes" ]
then
wget $LIBXKBFILE_SRC_ARCHIVE
libxkbfile_archive=$(basename "${LIBXKBFILE_SRC_ARCHIVE}")
LIBXKBFILE_CHECKSUM=$(sha256sum $libxkbfile_archive| awk '{print $1}')
if [ "$LIBXKBFILE_SHA256" != "$LIBXKBFILE_CHECKSUM" ]
then
echo "Hash mismatch for $libxkbfile_archive."
echo "Expected: $LIBXKBFILE_SHA256"
echo "Got: $LIBXKBFILE_CHECKSUM"
exit 1;
fi
wget $XKBCOMP_SRC_ARCHIVE
xkbcomp_archive=$(basename "${XKBCOMP_SRC_ARCHIVE}")
XKBCOMP_CHECKSUM=$(sha256sum $xkbcomp_archive| awk '{print $1}')
if [ "$XKBCOMP_SHA256" != "$XKBCOMP_CHECKSUM" ]
then
echo "Hash mismatch for $xkbcomp_archive."
echo "Expected: $XKBCOMP_SHA256"
echo "Got: $XKBCOMP_CHECKSUM"
exit 1;
fi
wget $XKEYBOARD_CONFIG_SRC_ARCHIVE
xkeyboard_config_archive=$(basename "${XKEYBOARD_CONFIG_SRC_ARCHIVE}")
XKEYBOARD_CONFIG_CHECKSUM=$(sha256sum $xkeyboard_config_archive| awk '{print $1}')
if [ "$XKEYBOARD_CONFIG_SHA256" != "$XKEYBOARD_CONFIG_CHECKSUM" ]
then
echo "Hash mismatch for $xkeyboard_config_archive."
echo "Expected: $XKEYBOARD_CONFIG_SHA256"
echo "Got: $XKEYBOARD_CONFIG_CHECKSUM"
exit 1;
fi
fi
if [ $BUILD_UTILS == "yes" ]
then
# install xorg/util/macros
tar -xvf $xutilmacros_archive
cd $XUTILMACROS_NAME
./configure --prefix=$INSTALL_PREFIX
make 2>&1 | tee make.log
make install
export PKG_CONFIG_PATH=$INSTALL_PREFIX/share/pkgconfig:$PKG_CONFIG_PATH
# install xorg/util/makedepend
cd $temp_dir
tar -xvf $makedepend_archive
cd $MAKEDEPEND_NAME
./configure --prefix=$INSTALL_PREFIX
make 2>&1 | tee make.log
make install
# install xdmcp
cd $temp_dir
tar -xvf $xdmcp_archive
cd $XDMCP_NAME
./configure --prefix=$INSTALL_PREFIX
make 2>&1 | tee make.log
make install
fi
if [ $BUILD_XKB == "yes" ]
then
# install libxkbfile
cd $temp_dir
tar -xvf $libxkbfile_archive
cd $LIBXKBFILE_NAME
./configure --prefix=$INSTALL_PREFIX
make 2>&1 | tee make.log
make install
export PKG_CONFIG_PATH=$INSTALL_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
# install xkbcomp
cd $temp_dir
tar -xvf $xkbcomp_archive
cd $XKBCOMP_NAME
./configure --prefix=$INSTALL_PREFIX
make 2>&1 | tee make.log
make install
export PATH=$INSTALL_PREFIX/bin:$PATH
# install xkeyboard-config
cd $temp_dir
tar -xvf $xkeyboard_config_archive
cd $XKEYBOARD_CONFIG_NAME
./configure --prefix=$INSTALL_PREFIX --with-xkb-rules-symlink=xorg
make 2>&1 | tee make.log
make install
fi