blob: 709f30f84e645e030172146672e1eb1cebfb3382 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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
#}
|