diff options
author | Donald Carr | 2016-01-25 16:58:13 -0800 |
---|---|---|
committer | Donald Carr | 2016-01-25 19:02:42 -0800 |
commit | 21746b5b43bc5cf58bb8c9ff9c14cf0f9ca720c8 (patch) | |
tree | d393ca5f53d6a9ed88e810fb3b43ff4ac836a041 /_qpi.install | |
parent | 82fc4ab3145422692fc5cb021f052a6d72f030a8 (diff) | |
download | aur-21746b5b43bc5cf58bb8c9ff9c14cf0f9ca720c8.tar.gz |
Move hard coded vars out of qpi.install and into PKGBUILD
Diffstat (limited to '_qpi.install')
-rw-r--r-- | _qpi.install | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/_qpi.install b/_qpi.install new file mode 100644 index 000000000000..be6aff9347e4 --- /dev/null +++ b/_qpi.install @@ -0,0 +1,114 @@ +# will be injected by toplevel PKGBUILD +#_piver="1" +#_qmakepath="/opt/qt-5.6.0-beta-rpi${_piver}/bin/qmake" +#_sysroot="/mnt/pi" + +_sdktool="/usr/libexec/qtcreator/sdktool" +_devicefamily="raspberrypi" +_devicename="${_devicefamily}${_piver}" +_familytext="Raspberry Pi" +_devicetext="${_familytext} ${_piver}" + +setup_toolchain() { +${_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 + +${_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 + +${_sdktool} addDev \ + --id "${_devicename}_device" \ + --name "${_devicetext}" \ + --host "qpi${_piver}.local" \ + --uname "root" \ + --password "root" \ + --osType "GenericLinuxOsType" \ + --type 0 \ + --sshPort 22 \ + --freePorts "10000-10100" + +${_sdktool} addQt \ + --id "${_devicename}_qt" \ + --name "${_devicetext} Qt" \ + --qmake ${_qmakepath} \ + --type RemoteLinux.EmbeddedLinuxQt + +${_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 +} |