summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Elkouby2017-03-12 23:56:48 +0200
committerDan Elkouby2017-03-12 23:56:48 +0200
commit80af9f31df97c0647b7bb482ad73ef274f8b4923 (patch)
treefdb93b2acd76fe1ac49306710fbeb804c66eb090
downloadaur-80af9f31df97c0647b7bb482ad73ef274f8b4923.tar.gz
Initial import
-rw-r--r--.SRCINFO22
-rw-r--r--.gitignore5
-rw-r--r--0001-Dont-install-thirdparty-libs.patch26
-rw-r--r--0002-Dont-rely-on-applicationDirPath.patch27
-rw-r--r--PKGBUILD57
5 files changed, 137 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a54345dd3141
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+# Generated by mksrcinfo v8
+# Sun Mar 12 21:56:37 UTC 2017
+pkgbase = sam-ba
+ pkgdesc = Atmel SAM Boot Assistant
+ pkgver = 3.1.4
+ pkgrel = 1
+ url = https://github.com/atmelcorp/sam-ba
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ depends = qt5-base
+ depends = qt5-serialport
+ depends = qt5-declarative
+ source = https://github.com/atmelcorp/sam-ba/archive/v3.1.4.tar.gz
+ source = 0001-Dont-install-thirdparty-libs.patch
+ source = 0002-Dont-rely-on-applicationDirPath.patch
+ md5sums = 54d7332f4463e0ca9cf7fa83864f9fe7
+ md5sums = 6b29a65bbc96b608d7628e8a25ae1f50
+ md5sums = 41b845c88f5c389b01690baeb78ad9e1
+
+pkgname = sam-ba
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..fe732bfcf1d9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*.tar.gz
+
+/src
+/pkg
+*.pkg.tar.xz
diff --git a/0001-Dont-install-thirdparty-libs.patch b/0001-Dont-install-thirdparty-libs.patch
new file mode 100644
index 000000000000..93798952e0c6
--- /dev/null
+++ b/0001-Dont-install-thirdparty-libs.patch
@@ -0,0 +1,26 @@
+diff --git a/dist/dist.pro b/dist/dist.pro
+index da853b2..b7e4b32 100644
+--- a/dist/dist.pro
++++ b/dist/dist.pro
+@@ -33,18 +33,18 @@ unix:{
+ $$[QT_INSTALL_LIBS]/libQt5Qml.so.5 \
+ $$[QT_INSTALL_LIBS]/libQt5Quick.so.5 \
+ $$[QT_INSTALL_LIBS]/libQt5SerialPort.so.5
+- INSTALLS += qtlibs
++ #INSTALLS += qtlibs
+
+ otherlibs.path = /lib
+ otherlibs.files = \
+ $$[QT_INSTALL_LIBS]/libicudata.so.$$ICU_VERSION \
+ $$[QT_INSTALL_LIBS]/libicui18n.so.$$ICU_VERSION \
+ $$[QT_INSTALL_LIBS]/libicuuc.so.$$ICU_VERSION
+- INSTALLS += otherlibs
++ #INSTALLS += otherlibs
+
+ qmlmodules.path = /qml
+ qmlmodules.files = $$[QT_INSTALL_LIBS]/../qml/QtQuick.2
+- INSTALLS += qmlmodules
++ #INSTALLS += qmlmodules
+ }
+ else:win32:{
+ qtlibs.path = /
diff --git a/0002-Dont-rely-on-applicationDirPath.patch b/0002-Dont-rely-on-applicationDirPath.patch
new file mode 100644
index 000000000000..c16b761949ac
--- /dev/null
+++ b/0002-Dont-rely-on-applicationDirPath.patch
@@ -0,0 +1,27 @@
+diff --git a/src/sambacommon/sambaengine.cpp b/src/sambacommon/sambaengine.cpp
+index fb5b48c..d831490 100644
+--- a/src/sambacommon/sambaengine.cpp
++++ b/src/sambacommon/sambaengine.cpp
+@@ -25,9 +25,6 @@ SambaEngine::SambaEngine(QObject *parent)
+ this, &SambaEngine::engineQuit, Qt::QueuedConnection);
+ QObject::connect(&m_qmlEngine, &QQmlEngine::warnings,
+ this, &SambaEngine::engineWarnings);
+-
+- // add import path
+- m_qmlEngine.addImportPath(QCoreApplication::applicationDirPath() + "/qml");
+ }
+
+ void SambaEngine::engineQuit()
+diff --git a/src/tools/sam-ba/sambatool.cpp b/src/tools/sam-ba/sambatool.cpp
+index fb359ce..51dff52 100644
+--- a/src/tools/sam-ba/sambatool.cpp
++++ b/src/tools/sam-ba/sambatool.cpp
+@@ -71,7 +71,7 @@ static bool portCompare(const SambaConnection* p1, const SambaConnection* p2)
+
+ bool SambaTool::loadAllMetadata()
+ {
+- QDir metadataDir(applicationDirPath() + "/metadata");
++ QDir metadataDir("/usr/share/sam-ba/metadata");
+ foreach (QString fileName, metadataDir.entryList(QStringList() << "*.json",
+ QDir::Files))
+ {
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f3f3335505ff
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,57 @@
+# Maintainer: Streetwalrus <streetwalrus@codewalr.us>
+pkgname=sam-ba
+pkgver=3.1.4
+pkgrel=1
+pkgdesc="Atmel SAM Boot Assistant"
+arch=('i686' 'x86_64')
+url="https://github.com/atmelcorp/sam-ba"
+license=('GPL2')
+depends=('qt5-base' 'qt5-serialport' 'qt5-declarative')
+source=("https://github.com/atmelcorp/sam-ba/archive/v$pkgver.tar.gz"
+ "0001-Dont-install-thirdparty-libs.patch"
+ "0002-Dont-rely-on-applicationDirPath.patch")
+md5sums=('54d7332f4463e0ca9cf7fa83864f9fe7'
+ '6b29a65bbc96b608d7628e8a25ae1f50'
+ '41b845c88f5c389b01690baeb78ad9e1')
+
+prepare() {
+ cd "${srcdir}/sam-ba-$pkgver"
+
+ patch -Np1 -i ../0001-Dont-install-thirdparty-libs.patch
+ patch -Np1 -i ../0002-Dont-rely-on-applicationDirPath.patch
+ sed -i -e "s/ jlink//" src/plugins/connection/connection.pro
+}
+
+build() {
+ cd "${srcdir}/sam-ba-$pkgver"
+
+ mkdir -p build
+ cd build
+
+ qmake ../sam-ba.pro
+ make -j1
+}
+
+package() {
+ cd "${srcdir}/sam-ba-$pkgver/build"
+
+ make install INSTALL_ROOT="$PWD/install"
+
+ cd install
+
+ mkdir -p ${pkgdir}/usr/bin
+ cp sam-ba ${pkgdir}/usr/bin
+
+ mkdir -p ${pkgdir}/usr/lib/qt/qml
+ cp lib/* ${pkgdir}/usr/lib
+ cp -r qml/SAMBA ${pkgdir}/usr/lib/qt/qml
+
+ mkdir -p ${pkgdir}/usr/share/doc/sam-ba
+ rm doc/sam-ba.index
+ cp -r doc/* examples ${pkgdir}/usr/share/doc/sam-ba
+
+ mkdir -p ${pkgdir}/usr/share/sam-ba
+ cp -r metadata ${pkgdir}/usr/share/sam-ba
+}
+
+# vim:set ts=2 sw=2 et: