summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorM0Rf302020-04-11 13:21:41 +0200
committerM0Rf302020-04-11 13:21:41 +0200
commite3e66b740cba3a3cce491e1ca5b78dc4bab72a1c (patch)
tree251ab8c96ed11a5fb5e831fb7a51a7e7256c20f4
parenta47b658b885119ddfee6c8b12c934e571a35fc38 (diff)
downloadaur-e3e66b740cba3a3cce491e1ca5b78dc4bab72a1c.tar.gz
google-music-manager-uploader: preliminary systemd support
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD15
-rw-r--r--google-music-manager-uploader.conf6
-rw-r--r--google-music-manager-uploader.service14
-rw-r--r--google-music-manager-uploader.sysuser.conf2
5 files changed, 41 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d049cdb33c7..018118d8602 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = google-music-manager-uploader
pkgdesc = Google Music Manager Uploader Daemon
pkgver = 1.6.2
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/jaymoulin/google-music-manager-uploader
arch = any
license = MIT
@@ -12,7 +12,13 @@ pkgbase = google-music-manager-uploader
depends = python-netifaces
depends = python-watchdog
source = https://github.com/jaymoulin/google-music-manager-uploader/archive/1.6.2.tar.gz
+ source = google-music-manager-uploader.conf
+ source = google-music-manager-uploader.service
+ source = google-music-manager-uploader.sysuser.conf
md5sums = 93214c9e81aeb076c34eae2cd62dece3
+ md5sums = ba5e0e2aa8094880a7788ec7a45bde86
+ md5sums = 701a80da141fcb99429daf9bdfbf59e3
+ md5sums = 8cf4bd4d72a08faffbf23b2a0fcf82ac
pkgname = google-music-manager-uploader
diff --git a/PKGBUILD b/PKGBUILD
index 53cdd551ece..b4180f6d66c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,14 +1,17 @@
# Maintainer: robertfoster
pkgname=google-music-manager-uploader
pkgver=1.6.2
-pkgrel=1
+pkgrel=2
pkgdesc="Google Music Manager Uploader Daemon"
arch=('any')
url="https://github.com/jaymoulin/google-music-manager-uploader"
license=('MIT')
depends=('google-music-manager-auth' 'python-beautifulsoup4' 'python-gmusicapi' 'python-netifaces' 'python-watchdog')
makedepends=('python-setuptools')
-source=("https://github.com/jaymoulin/google-music-manager-uploader/archive/$pkgver.tar.gz")
+source=("https://github.com/jaymoulin/google-music-manager-uploader/archive/$pkgver.tar.gz"
+ $pkgname.conf
+ $pkgname.service
+ $pkgname.sysuser.conf)
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
@@ -18,5 +21,11 @@ prepare() {
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
python setup.py install --root="$pkgdir" --optimize=1
+ install -Dm644 $srcdir/$pkgname.service $pkgdir/usr/lib/systemd/system/$pkgname.service
+ install -Dm644 $srcdir/$pkgname.conf $pkgdir/etc/conf.d/$pkgname
+ install -Dm755 $srcdir/$pkgname.sysuser.conf $pkgdir/usr/lib/sysusers.d/$pkgname.conf
}
-md5sums=('93214c9e81aeb076c34eae2cd62dece3')
+md5sums=('93214c9e81aeb076c34eae2cd62dece3'
+ 'ba5e0e2aa8094880a7788ec7a45bde86'
+ '701a80da141fcb99429daf9bdfbf59e3'
+ '8cf4bd4d72a08faffbf23b2a0fcf82ac')
diff --git a/google-music-manager-uploader.conf b/google-music-manager-uploader.conf
new file mode 100644
index 00000000000..44b4112a8b6
--- /dev/null
+++ b/google-music-manager-uploader.conf
@@ -0,0 +1,6 @@
+# Specify the path to monitor
+DIRECTORY=""
+# Specify the path of OAuth .cred file
+OAUTH=""
+# Optional
+#UPLOADER_ID=""
diff --git a/google-music-manager-uploader.service b/google-music-manager-uploader.service
new file mode 100644
index 00000000000..23ab562233d
--- /dev/null
+++ b/google-music-manager-uploader.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Google Music Manager Uploader Daemon
+After=network.target
+
+[Service]
+Type=simple
+User=gmusic-uploader
+DynamicUser=yes
+EnvironmentFile=/etc/conf.d/google-music-manager-uploader
+StateDirectory=google-music-manager-uploader
+ExecStart=/usr/bin/google-music-upload --directory $DIRECTORY --oauth $OAUTH
+
+[Install]
+WantedBy=multi-user.target
diff --git a/google-music-manager-uploader.sysuser.conf b/google-music-manager-uploader.sysuser.conf
new file mode 100644
index 00000000000..ac41408d1c6
--- /dev/null
+++ b/google-music-manager-uploader.sysuser.conf
@@ -0,0 +1,2 @@
+u gmusic-uploader - -
+g gmusic-uploader - -