summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b85abafc255a22fba7217ad64b7fe624f8ad2c2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Maintainer: Rhinoceros <https://aur.archlinux.org/account/rhinoceros>

pkgname=mlink
pkgver=1.2.0
pkgrel=2
pkgdesc='A tool connecting mBlock web version to devices'
arch=(x86_64)
url='https://www.mblock.cc/en-us/download'
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')

prepare() {
  mkdir usr/bin
  ln -s /usr/local/makeblock/mLink/mlink usr/bin/mblock-mlink
}

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"
}