aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PKGBUILD29
-rw-r--r--PKGBUILD.libs11
-rw-r--r--_qpi.install119
-rw-r--r--qpi.install120
4 files changed, 138 insertions, 141 deletions
diff --git a/PKGBUILD b/PKGBUILD
index e86a1952bf5f..5ef452623ee0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,5 +1,7 @@
# Contributer: Donald Carr <sirspudd@gmail.com>
+# set -x
+
# Documentation
# Set up the pi for Qt compilation.
@@ -23,7 +25,7 @@ _local_qt5_repo="/opt/dev/src/qtproject/qt5"
_wayland_compositor=true
pkgver=5.6.0
-pkgrel=5
+pkgrel=6
# PKGBUILD
_piver=2
@@ -46,7 +48,7 @@ _libspkgname="${pkgname}-target-libs"
_mkspec="linux-rpi${_piver}-g++"
_pkgver=${pkgver}-beta
_baseprefix=/opt
-_installprefix=${_baseprefix}/${pkgname}-${_pkgver}
+_installprefix=${_baseprefix}/${pkgname}
_source_package_name=qt-everywhere-opensource-src-${_pkgver}
pkgdesc="Qt SDK for the Raspberry Pi${_piver}"
arch=("x86_64")
@@ -187,16 +189,11 @@ fi
create_install_script()
{
- local _fully_qualified_install_script_template="${startdir}/_${install}"
-
- rm ${_fully_qualified_install_script}
+ local _install_script_location="${startdir}/${install}"
- # populate vars
- echo "_piver=\"${_piver}\"" >> ${_fully_qualified_install_script}
- echo "_qmakepath=\"${_installprefix}/bin/qmake\"" >> ${_fully_qualified_install_script}
- echo "_sysroot=\"${_sysroot}\"" >> ${_fully_qualified_install_script}
-
- cat ${_fully_qualified_install_script_template} >> ${_fully_qualified_install_script}
+ sed -i "s/libspiver/${_piver}/" ${_install_script_location} || exit 1
+ sed -i "s,libsqmakepath,${_installprefix}/bin/qmake," ${_install_script_location} || exit 1
+ sed -i "s,libssysroot,${_sysroot}," ${_install_script_location} || exit 1
}
package() {
@@ -230,10 +227,10 @@ fi
cp ${startdir}/PKGBUILD.libs ${_libspkgbuild}
mv "${pkgdir}/${_sysroot}/${_baseprefix}" ${_libspkgdir}
# set correct libs version
- sed -i "s/libspackagename/${_libspkgname}/" ${_libspkgbuild} || exit 1
- sed -i "s/libspiversion/${_piver}/" ${_libspkgbuild} || exit 1
-
- sed -i "s/6.6.6/${pkgver}/" ${_libspkgbuild} || exit 1
+ sed -i "s/libspkgrel/${pkgrel}/" ${_libspkgbuild} || exit 1
+ sed -i "s/libspkgver/${pkgver}/" ${_libspkgbuild} || exit 1
+ sed -i "s/libspkgname/${_libspkgname}/" ${_libspkgbuild} || exit 1
+ sed -i "s/libspiver/${_piver}/" ${_libspkgbuild} || exit 1
mkdir -p ${_pkgprofiled}
cp ${startdir}/qpi.sh ${_pkgprofiled} || exit 1
@@ -244,5 +241,5 @@ fi
echo "the libs package for the Raspberry Pi${_piver} is in the ${_packaginguser} home directory awaiting deployment"
- mv ${_libsdir}/${_libspkgname}-${pkgver}-1-any.pkg.tar.xz ${HOME}
+ mv ${_libsdir}/${_libspkgname}-${pkgver}-${pkgrel}-any.pkg.tar.xz ${startdir}
}
diff --git a/PKGBUILD.libs b/PKGBUILD.libs
index f6240f53016a..06fefddc0167 100644
--- a/PKGBUILD.libs
+++ b/PKGBUILD.libs
@@ -1,13 +1,16 @@
# Maintainer: Donald Carr <sirspudd@gmail.com>
-pkgname=libspackagename
-pkgver=6.6.6
-pkgrel=1
+pkgname=libspkgname
+provides=("${pkgname}")
+conflicts=("${pkgname}")
+replaces=("${pkgname}")
+pkgver=libspkgver
+pkgrel=libspkgrel
pkgdesc="Qt ${pkgver} libs cross compiled for the Raspberry Pi libspiversion"
# I don't know how to set this correct for cross architecture builds
arch=("any")
url="http://www.qt.io"
-license=("LGPL3")
+license=("LGPL3" "GPL3")
source=()
sha256sums=()
options=('!strip')
diff --git a/_qpi.install b/_qpi.install
deleted file mode 100644
index ce73b32cf718..000000000000
--- a/_qpi.install
+++ /dev/null
@@ -1,119 +0,0 @@
-# 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() {
- 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
-}
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
+}