Automate build on Debian
authorKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 12 Feb 2018 16:26:56 +0000 (09:26 -0700)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 12 Feb 2018 16:26:56 +0000 (09:26 -0700)
INSTALL.kmr [deleted file]
install-debian.sh [new file with mode: 0644]

diff --git a/INSTALL.kmr b/INSTALL.kmr
deleted file mode 100644 (file)
index cd35978..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-1. apt install libxerces-c-dev
-2. build qt-x11-free-3.3.8b.tar.gz into /usr/local/qt3
-3. Add
-      #include <stddef.h>
-   wherever ptrdiff_t is referenced in include/*.h
-   
diff --git a/install-debian.sh b/install-debian.sh
new file mode 100644 (file)
index 0000000..0b6950e
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+echo "SNARK14m Debian/Ubuntu build"
+echo "Kevin Rosenberg <kevin@rosenberg.net>"
+
+echo "Install required packages"
+sudo apt install build-essential libxerces-c-dev wget
+     
+echo "Download and patch QT3"
+wget https://download.qt.io/archive/qt/3/qt-x11-free-3.3.8b.tar.gz
+tar xzf qt-x11-free-3.3.8b.tar.gz
+cd qt-x11-free-3.3.8b
+
+# Add missing '#include <stddef.h>' to files using ptrdiff_h
+cd include
+for i in `grep -l ptrdiff_t *.h`; do
+      echo "#include <stddef.h>" > tmp
+      cat $i >> tmp
+      mv tmp $i
+done
+cd ..
+
+echo "Build QT3"
+echo "yes" | ./configure && make
+cd ..
+
+echo "Make shared libraries findable"
+sudo mv qt-x11-free-3.3.8b /usr/local/qt3
+echo "/usr/local/qt3/lib" > qt3.conf
+sudo mv qt3.conf /etc/ld.so.conf.d/.
+sudo ldconfig
+
+