summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Kröning2019-04-30 17:57:05 +0200
committerMartin Kröning2019-04-30 17:57:05 +0200
commit24c678fd184f25105e2c4a9564256d314c7de2c6 (patch)
tree6109f19ae08b0b52f5415e3df3f71c91b900b8f2
parentb726de74fc33f04a58ab5866e2bdf91325d90bbd (diff)
downloadaur-24c678fd184f25105e2c4a9564256d314c7de2c6.tar.gz
Build package locally
-rw-r--r--.SRCINFO7
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD42
3 files changed, 33 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f207a7661930..c4a57b372b54 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,15 @@
pkgbase = sync-my-l2p
pkgdesc = Sync the L2P and moodle instance of RWTH Aachen University
pkgver = 2.4.1
- pkgrel = 1
- url = https://github.com/RobertKrajewski/Sync-my-L2P
+ pkgrel = 2
+ url = https://syncmyl2p.de/
arch = x86_64
license = LGPL3
depends = hicolor-icon-theme
depends = qt5-base
- options = !strip
+ source = git+https://github.com/RobertKrajewski/Sync-my-L2P.git#commit=b35e60690f68c376bed925dfe0fa605a3c9e9f17
source = https://github.com/RobertKrajewski/Sync-my-L2P/releases/download/v2.4.1/SyncMyL2P-2.4.1-linux.AppImage
+ sha256sums = SKIP
sha256sums = a84527eadedea94144452f300883eef87880ee0608957dc44094cbd66e6d02c1
pkgname = sync-my-l2p
diff --git a/.gitignore b/.gitignore
index c14ab8a56d93..a250676b9565 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/*.AppImage
/pkg
/src
+/Sync-my-L2P
diff --git a/PKGBUILD b/PKGBUILD
index f626d43824a3..5c57ebf8fc58 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,35 +1,49 @@
# Maintainer: Martin Kröning <m dot kroening at hotmail dot de>
# Contributor: Jan-Erik Rediger <badboy at archlinux dot us>
+_realname=Sync-my-L2P
pkgname=sync-my-l2p
pkgver=2.4.1
-pkgrel=1
-pkgdesc="Sync the L2P and moodle instance of RWTH Aachen University"
+pkgrel=2
+pkgdesc='Sync the L2P and moodle instance of RWTH Aachen University'
arch=('x86_64')
-url="https://github.com/RobertKrajewski/Sync-my-L2P"
+url='https://syncmyl2p.de/'
license=('LGPL3')
depends=('hicolor-icon-theme' 'qt5-base')
-options=('!strip')
-source=("$url/releases/download/v$pkgver/SyncMyL2P-$pkgver-linux.AppImage")
-sha256sums=('a84527eadedea94144452f300883eef87880ee0608957dc44094cbd66e6d02c1')
+_commit=b35e60690f68c376bed925dfe0fa605a3c9e9f17 # tags/v2.4.1^0
+source=("git+https://github.com/RobertKrajewski/$_realname.git#commit=$_commit"
+ "https://github.com/RobertKrajewski/$_realname/releases/download/v$pkgver/SyncMyL2P-$pkgver-linux.AppImage")
+sha256sums=('SKIP'
+ 'a84527eadedea94144452f300883eef87880ee0608957dc44094cbd66e6d02c1')
prepare() {
- # Extract binary, desktop entry and icons from the AppImage
+ # Setup client_id
chmod +x SyncMyL2P-$pkgver-linux.AppImage
- for pattern in {usr/bin/Sync-my-L2P,Sync-my-L2P.desktop,hicolor}; do
- ./SyncMyL2P-$pkgver-linux.AppImage --appimage-extract $pattern > /dev/null
- done
+ ./SyncMyL2P-$pkgver-linux.AppImage --appimage-extract usr/bin/$_realname
+ client_id=$(strings squashfs-root/usr/bin/$_realname | grep .apps.rwth-aachen.de)
+ sed --in-place "s/\(#define CLIENTID\) .*/\1 \"$client_id\"/g; /#error ERROR: NO CLIENTID IN CLIENTID.H DEFINED/d" "$srcdir"/$_realname/include/clientId.h
+
+ mkdir -p build
+}
+
+build() {
+ cd build
+
+ qmake ../${_realname}
+ make
}
package() {
- cd squashfs-root
+ cd build
# Binary
- install -Dm755 usr/bin/Sync-my-L2P "$pkgdir"/usr/bin/Sync-my-L2P
+ install -D -m0755 bin/$_realname "$pkgdir"/usr/bin/$_realname
+
+ cd ../${_realname}
# Desktop entry
- install -Dm644 Sync-my-L2P.desktop "$pkgdir"/usr/share/applications/Sync-my-L2P.desktop
+ install -D -m0644 linux/$_realname.desktop "$pkgdir"/usr/share/applications/$_realname.desktop
# Icons
- mkdir --parents "$pkgdir"/usr/share/icons && cp --recursive hicolor "$pkgdir"/usr/share/icons/
+ mkdir --parents "$pkgdir"/usr/share/icons && cp --recursive linux/hicolor "$pkgdir"/usr/share/icons/
chmod --recursive 755 "$pkgdir"/usr/share/icons/hicolor
}