summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlberto Salvia Novella2019-10-03 00:49:07 +0200
committerAlberto Salvia Novella2019-10-03 00:49:07 +0200
commit4add87ddc6ac6027c0016f362443ad1ada7c2fd2 (patch)
tree27310eacd7c6fb208527ff988a68f8377fbec63e
parentc536660604a8cb07630f02491b36332765ba04d1 (diff)
downloadaur-4add87ddc6ac6027c0016f362443ad1ada7c2fd2.tar.gz
2019-10-03 1570056546
-rw-r--r--.SRCINFO2
-rwxr-xr-xBUILD30
-rwxr-xr-xPKGBUILD26
-rwxr-xr-xPUBLISH28
4 files changed, 49 insertions, 37 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9925b4c5083e..4ac0a8e5415d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = qsyncthingtray-git
pkgdesc = Syncs files among devices, and shows the sync status on a tray icon. Version with the latest unreleased improvements.
pkgver = r421.11936bc
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/sieren/QSyncthingTray
arch = i686
arch = x86_64
diff --git a/BUILD b/BUILD
index cab06cc91765..2487916b2d24 100755
--- a/BUILD
+++ b/BUILD
@@ -10,7 +10,7 @@ mainFunction () {
buildPackage () {
removeBuildFiles
- echoOnError "buildPackage" "makepkg --force"
+ makePackage
removeBuildFiles
}
@@ -20,27 +20,35 @@ changeToThisProgramDir () {
}
-echoOnError () {
- function="${1}"
- command="${2}"
- error=$(eval "${command}" 2>&1 >"/dev/null")
+makePackage () {
+ nice="nice --adjustment=19"
+ ionice="ionice -c2 -n7"
- if [ ${?} -ne 0 ]; then
- echo "${function}: ${error}" >&2
- exit 1
- fi
+ silently "makePackage" "PKGEXT='.pkg.tar.gz' ${nice} ${ionice} makepkg --force"
}
removeBuildFiles () {
name=$(variableInFile "Name" "PKGBUILD")
folders="pkg src ${name}"
- echoOnError "removeBuildFiles" "rm --recursive --force ${folders}"
+ silently "removeBuildFiles" "rm --recursive --force ${folders}"
+}
+
+
+silently () {
+ function="${1}"
+ command="${2}"
+ error=$(eval "${command}" 2>&1 >"/dev/null")
+
+ if [ ${?} -ne 0 ]; then
+ echo "${function}: ${error}" >&2
+ exit 1
+ fi
}
updateInfoFile () {
- echoOnError "updateInfoFile" "makepkg --printsrcinfo > .SRCINFO"
+ silently "updateInfoFile" "makepkg --printsrcinfo > .SRCINFO"
}
diff --git a/PKGBUILD b/PKGBUILD
index c865e125ffd5..e5cc8b042953 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,27 +1,29 @@
#! /bin/bash
-# (GPL3+) Alberto Salvia Novella (es20490446e.wordpress.com)
Name="QSyncthingTray"
LowercaseName=$(echo "${Name,,}")
pkgname="${LowercaseName}-git"
+
pkgver=r421.11936bc
-pkgrel=1
-pkgdesc="Syncs files among devices, and shows the sync status on a tray icon. Version with the latest unreleased improvements."
+pkgrel=2
arch=("i686" "x86_64")
-url="https://github.com/sieren/QSyncthingTray"
+
+pkgdesc="Syncs files among devices, and shows the sync status on a tray icon. Version with the latest unreleased improvements."
license=("LGPL3")
+
+url="https://github.com/sieren/QSyncthingTray"
+source=("git+${url}.git" "${LowercaseName}.desktop")
+md5sums=("SKIP" "SKIP")
+
makedepends=("cmake" "git")
depends=("qt5-location" "qt5-webengine" "startup-settings-git" "syncthing")
provides=("${LowercaseName}")
conflicts=("${LowercaseName}")
-source=("git+${url}.git" "${LowercaseName}.desktop")
-md5sums=("SKIP" "SKIP")
pkgver() {
- cd "${srcdir}/${Name}"
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
- echo
+ cd "${Name}"
+ printf "r%s.%s\n" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
@@ -42,9 +44,11 @@ package() {
mkdir --parents "${pkgdir}/usr/share/applications"
mv "${srcdir}/${Name}/build/${Name}" "${pkgdir}/usr/bin/${LowercaseName}"
- mv "${srcdir}/${Name}/resources/images/Icon1024.png" "${pkgdir}/usr/share/pixmaps/${LowercaseName}.png"
- mv "${srcdir}/${LowercaseName}.desktop" "${pkgdir}/usr/share/applications/${LowercaseName}.desktop"
+ cp "${srcdir}/${Name}/resources/images/Icon1024.png" "${pkgdir}/usr/share/pixmaps/${LowercaseName}.png"
+ cp "${srcdir}/${LowercaseName}.desktop" "${pkgdir}/usr/share/applications/${LowercaseName}.desktop"
+ find "${pkgdir}" -type d -exec chmod u=rwx,g=rx,o=rx {} \;
+ find "${pkgdir}" -type f -exec chmod u=rw,g=r,o=r {} \;
chmod +x "${pkgdir}/usr/bin/${LowercaseName}"
}
diff --git a/PUBLISH b/PUBLISH
index 836b826cd781..e606dfd7f694 100755
--- a/PUBLISH
+++ b/PUBLISH
@@ -15,24 +15,24 @@ changeToThisProgramDir () {
}
-echoOnError () {
- function="${1}"
- command="${2}"
- error=$(eval "${command}" 2>&1 >"/dev/null")
+publish () {
+ summary="${1}"
- if [ ${?} -ne 0 ]; then
- echo "${function}: ${error}" >&2
- exit 1
- fi
+ silently "publish: add" "git add ."
+ git commit --message="${summary}" 2>&1 >"/dev/null"
+ silently "publish: push" "git push"
}
-publish () {
- summary="${1}"
+silently () {
+ function="${1}"
+ command="${2}"
+ error=$(eval "${command}" 2>&1 >"/dev/null")
- echoOnError "publish: add" "git add ."
- git commit --message="${summary}" 2>&1 >"/dev/null"
- echoOnError "publish: push" "git push"
+ if [ ${?} -ne 0 ]; then
+ echo "${function}: ${error}" >&2
+ exit 1
+ fi
}
@@ -46,7 +46,7 @@ summary () {
updateInfoFile () {
- echoOnError "updateInfoFile" "makepkg --printsrcinfo > .SRCINFO"
+ silently "updateInfoFile" "makepkg --printsrcinfo > .SRCINFO"
}