Automate build on Debian
[snark14.git] / install-debian.sh
1 #!/bin/bash
2
3 echo "SNARK14m Debian/Ubuntu build"
4 echo "Kevin Rosenberg <kevin@rosenberg.net>"
5
6 echo "Install required packages"
7 sudo apt install build-essential libxerces-c-dev wget
8      
9 echo "Download and patch QT3"
10 wget https://download.qt.io/archive/qt/3/qt-x11-free-3.3.8b.tar.gz
11 tar xzf qt-x11-free-3.3.8b.tar.gz
12 cd qt-x11-free-3.3.8b
13
14 # Add missing '#include <stddef.h>' to files using ptrdiff_h
15 cd include
16 for i in `grep -l ptrdiff_t *.h`; do
17       echo "#include <stddef.h>" > tmp
18       cat $i >> tmp
19       mv tmp $i
20 done
21 cd ..
22
23 echo "Build QT3"
24 echo "yes" | ./configure && make
25 cd ..
26
27 echo "Make shared libraries findable"
28 sudo mv qt-x11-free-3.3.8b /usr/local/qt3
29 echo "/usr/local/qt3/lib" > qt3.conf
30 sudo mv qt3.conf /etc/ld.so.conf.d/.
31 sudo ldconfig
32
33