summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRhinoceros2020-06-14 18:10:07 +1000
committerRhinoceros2020-06-14 18:10:07 +1000
commite58886ebf7f5638ba757bcdca59b6e8a84d3253e (patch)
tree8e870c199a07f1a0781ec47bc2389c91dff65f54
parent309fc5f8f0892c9ee6d86371bba39033c73a0d8b (diff)
downloadaur-mlink.tar.gz
Update to 1.2.0-2
* Add systemd service * Add install note to start/enable service * Minor PKGBUILD cleanup
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD14
-rw-r--r--mlink.install3
-rw-r--r--mlink.service11
4 files changed, 25 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6a36199db71f..f64df211bb9b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,9 @@
pkgbase = mlink
pkgdesc = A tool connecting mBlock web version to devices
pkgver = 1.2.0
- pkgrel = 1
+ pkgrel = 2
url = https://www.mblock.cc/en-us/download
+ install = mlink.install
arch = x86_64
license = custom
source = https://dl.makeblock.com/mblock5/linux/mLink-1.2.0-1.el7.x86_64.rpm
diff --git a/PKGBUILD b/PKGBUILD
index bef26a61ac24..b85abafc255a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,14 +2,14 @@
pkgname=mlink
pkgver=1.2.0
-pkgrel=1
+pkgrel=2
pkgdesc='A tool connecting mBlock web version to devices'
arch=(x86_64)
url='https://www.mblock.cc/en-us/download'
-# main program licence is unknown, but bundled node_modules are various
-license=(custom)
-# use rpm not deb, because (a) makepkg auto-expands rpms and (b) permissions in rpm are already correct for mlink
-# source=("https://dl.makeblock.com/mblock5/linux/mLink-1.2.0-amd64.deb")
+license=(custom) # main program licence is unknown, but bundled node_modules are various
+install=$pkgname.install
+# source from rpm not deb, because (a) makepkg auto-expands rpms and (b) permissions in rpm are already correct for mlink
+# alternatively source=("https://dl.makeblock.com/mblock5/linux/mLink-1.2.0-amd64.deb")
source=("https://dl.makeblock.com/mblock5/linux/mLink-1.2.0-1.el7.x86_64.rpm")
sha256sums=('1625de43bd7639ce87c3d0b05bac82336df8860351b35f113f93d0140b830c3b')
@@ -19,5 +19,9 @@ prepare() {
}
package() {
+ # install mlink
cp -r usr "${pkgdir}"
+ # install systemd service
+ mkdir -p "${pkgdir}/usr/lib/systemd/system"
+ cp ../$pkgname.service "${pkgdir}/usr/lib/systemd/system"
}
diff --git a/mlink.install b/mlink.install
new file mode 100644
index 000000000000..90e1eac47d42
--- /dev/null
+++ b/mlink.install
@@ -0,0 +1,3 @@
+post_install() {
+ echo 'To use, start/enable the systemd mlink.service'
+}
diff --git a/mlink.service b/mlink.service
new file mode 100644
index 000000000000..2e6ab24b98b5
--- /dev/null
+++ b/mlink.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Start mlink bridge to connect mBlock web version to device
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/mblock-mlink start
+Restart=always
+RestartSec=30
+
+[Install]
+WantedBy=default.target