aboutsummarylogtreecommitdiffstats
path: root/qpi.install
diff options
context:
space:
mode:
authorDonald Carr2016-03-03 18:43:35 -0800
committerDonald Carr2016-03-03 18:43:35 -0800
commitd5ca08aac4f24b71804ce53b6cc7bc941b22265d (patch)
tree0b9559688ccee9d784af46213721a986c8f0181e /qpi.install
parent4e4ef8d615e07897df8be891e0d2e08b34d11df4 (diff)
parent6107af538fba38ac958c4a961c43b940e222eaad (diff)
downloadaur-d5ca08aac4f24b71804ce53b6cc7bc941b22265d.tar.gz
Resolve conflicts
Merge remote-tracking branch 'pi2/master' Change-Id: I41e2643ec4992dd9f9670694a0de19e862d9e270
Diffstat (limited to 'qpi.install')
-rw-r--r--qpi.install120
1 files changed, 118 insertions, 2 deletions
diff --git a/qpi.install b/qpi.install
index b78a688b70ed..cc174752cc28 100644
--- a/qpi.install
+++ b/qpi.install
@@ -1,2 +1,118 @@
-# This is a dummy file; pkgman insists on its existence
-# despite the fact I want it to contain variables defined once, in the PKGBUILD
+_piver="libspiver"
+_qmakepath="libsqmakepath"
+_sysroot="libssysroot"
+
+_sdktool="/usr/libexec/qtcreator/sdktool"
+_devicefamily="raspberrypi"
+_devicename="${_devicefamily}${_piver}"
+_familytext="Raspberry Pi"
+_devicetext="${_familytext} ${_piver}"
+
+setup_toolchain() {
+ echo "Registering toolchain with Qt Creator"
+${_sdktool} addTC \
+ --id "ProjectExplorer.ToolChain.Gcc:${_devicefamily}" \
+ --name "${_familytext} toolchain" \
+ --path /opt/arm-sirspuddarch-linux-gnueabihf/bin/arm-sirspuddarch-linux-gnueabihf-gcc \
+ --abi arm-linux-generic-elf-32bit \
+ --supportedAbis arm-linux-generic-elf-32bit
+
+ echo "Registering debugger with Qt Creator"
+${_sdktool} addDebugger \
+ --id "${_devicefamily}_gdb" \
+ --name "${_familytext} gdb" \
+ --binary /opt/arm-sirspuddarch-linux-gnueabihf/bin/arm-sirspuddarch-linux-gnueabihf-gdb \
+ --abis arm-linux-generic-elf-32bit \
+ --engine 1
+}
+
+remove_toolchain() {
+#TODO: Don't remove if the other pi package is present
+#Not used at present
+${_sdktool} rmTC \
+ --id "ProjectExplorer.ToolChain.Gcc:${_devicefamily}"
+
+${_sdktool} rmDebugger \
+ --id "${_devicefamily}_gdb"
+}
+
+remove_kit() {
+${_sdktool} rmQt \
+ --id "${_devicename}_qt"
+
+${_sdktool} rmKit \
+ --id "${_devicename}_kit"
+
+${_sdktool} rmDev \
+ --id "${_devicename}_device"
+}
+
+setup_kit() {
+ remove_kit
+ setup_toolchain
+
+ echo "Registering device with Qt Creator"
+${_sdktool} addDev \
+ --id "${_devicename}_device" \
+ --name "${_devicetext}" \
+ --host "qpi${_piver}.local" \
+ --uname "root" \
+ --password "root" \
+ --osType "GenericLinuxOsType" \
+ --type 0 \
+ --sshPort 22 \
+ --freePorts "10000-10100"
+
+ echo "Registering Qt install with Qt Creator"
+${_sdktool} addQt \
+ --id "${_devicename}_qt" \
+ --name "${_devicetext} Qt" \
+ --qmake ${_qmakepath} \
+ --type RemoteLinux.EmbeddedLinuxQt
+
+ echo "Creating Qt Creator Kit"
+${_sdktool} addKit \
+ --id "${_devicename}_kit" \
+ --name "${_devicetext} Kit" \
+ --debugger "${_devicefamily}_gdb" \
+ --devicetype GenericLinuxOsType \
+ --device "${_devicename}_device" \
+ --sysroot ${_sysroot} \
+ --toolchain "ProjectExplorer.ToolChain.Gcc:${_devicefamily}" \
+ --qt "${_devicename}_qt" \
+ --mkspec "devices/linux-rpi${_piver}-g++"
+}
+
+## arg 1: the new package version
+pre_install() {
+ echo ""
+}
+
+## arg 1: the new package version
+post_install() {
+ setup_kit
+}
+#post_install
+
+## arg 1: the new package version
+## arg 2: the old package version
+pre_upgrade() {
+ echo ""
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ setup_kit
+}
+
+## arg 1: the old package version
+pre_remove() {
+ echo ""
+}
+#pre_remove
+
+## arg 1: the old package version
+post_remove() {
+ remove_kit
+}