diff options
author | Donald Carr | 2016-01-13 15:33:16 -0800 |
---|---|---|
committer | Donald Carr | 2016-01-13 15:33:16 -0800 |
commit | dd0f96a7ce718cdc2c34d3195b147584df5c28c1 (patch) | |
tree | 124f3584520963cdb640063a9948f6c093d7106f | |
parent | 2b14eadac3c3e0eb0c94346e71087b479e1a16a2 (diff) | |
download | aur-dd0f96a7ce718cdc2c34d3195b147584df5c28c1.tar.gz |
Register Qt for the Raspberry Pi with Qt Creator
Change-Id: Ib3bc5a0d12e67a5f5daee386c17812a173a14450
-rw-r--r-- | PKGBUILD | 1 | ||||
-rw-r--r-- | qpi.install | 89 |
2 files changed, 90 insertions, 0 deletions
@@ -42,6 +42,7 @@ makedepends=("git" "pkgconfig" "gcc") source=("git://github.com/qtproject/qtquickcontrols2.git" "git://github.com/sirspudd/mkspecs.git" "https://download.qt.io/development_releases/qt/5.6/${_pkgver}/single/${_pipkgname}.tar.gz") sha256sums=("SKIP" "SKIP" "d69103ec34b3775edfa47581b14ee9a20789d4b0d7d26220fb92f2cd32eb06f9") options=('!strip') +install=qpi.install build() { local _srcdir="${srcdir}/${_pipkgname}" diff --git a/qpi.install b/qpi.install new file mode 100644 index 000000000000..709f30f84e64 --- /dev/null +++ b/qpi.install @@ -0,0 +1,89 @@ +_sdktool="/usr/libexec/qtcreator/sdktool" + +## arg 1: the new package version +#pre_install() { + # do something here +#} + +## arg 1: the new package version +post_install() { +${_sdktool} addTC \ + --id "ProjectExplorer.ToolChain.Gcc:raspberrypi" \ + --name "Raspberry Pi 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 "raspberrypi_gdb" \ + --name "Raspberry Pi gdb" \ + --binary /opt/arm-sirspuddarch-linux-gnueabihf/bin/arm-sirspuddarch-linux-gnueabihf-gdb \ + --abis arm-linux-generic-elf-32bit \ + --engine 1 + +${_sdktool} addDev \ + --id "raspberrypi2_device" \ + --name "Raspberry Pi 2" \ + --host "qpii.local" \ + --uname "root" \ + --password "root" \ + --osType "GenericLinuxOsType" \ + --type 0 \ + --sshPort 22 \ + --freePorts "10000-10100" + +${_sdktool} addQt \ + --id "raspberrypi2_qt" \ + --name "Raspberry Pi 2 Qt" \ + --qmake /opt/qt-5.6.0-beta-rpi2/bin/qmake \ + --type RemoteLinux.EmbeddedLinuxQt + +${_sdktool} addKit \ + --id "raspberrypi2_kit" \ + --name "Raspberry Pi 2 Kit" \ + --debugger "raspberrypi_gdb" \ + --devicetype GenericLinuxOsType \ + --device "raspberrypi2_device" \ + --sysroot /mnt/pi \ + --toolchain "ProjectExplorer.ToolChain.Gcc:raspberrypi" \ + --qt "raspberrypi2_qt" \ + --mkspec "devices/linux-rpi2-g++" +} +#post_install + +## arg 1: the new package version +## arg 2: the old package version +#pre_upgrade() { + # do something here +#} + +## arg 1: the new package version +## arg 2: the old package version +#post_upgrade() { + # do something here +#} + +## arg 1: the old package version +pre_remove() { +#TODO: Don't remove if the other pi package is present +${_sdktool} rmTC \ + --id "ProjectExplorer.ToolChain.Gcc:raspberrypi" + +${_sdktool} rmDebugger \ + --id "raspberrypi_gdb" + +${_sdktool} rmQt \ + --id "raspberrypi2_qt" + +${_sdktool} rmKit \ + --id "raspberrypi2_kit" + +${_sdktool} rmDev \ + --id "raspberrypi2_device" +} +#pre_remove + +## arg 1: the old package version +#post_remove() { + # do something here +#} |