diff options
author | taotieren | 2023-09-26 23:39:14 +0800 |
---|---|---|
committer | taotieren | 2023-09-26 23:39:14 +0800 |
commit | 579450cbf033c68a36636e17a087ddb1bd9857db (patch) | |
tree | 89a92ffde859e34a866b6c7f453fd7a5de01cd94 | |
download | aur-579450cbf033c68a36636e17a087ddb1bd9857db.tar.gz |
Update PKGBUILD
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | PKGBUILD | 102 |
2 files changed, 131 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..3ce44672b977 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,29 @@ +pkgbase = hbdsamples-git + pkgdesc = Samples for HybridOS 2.0 + pkgver = r91.880b127 + pkgrel = 1 + url = https://github.com/HybridOS2/HBDSamples + arch = any + groups = hybridos2-git + license = GPL-3.0 + depends = hbdbus + depends = hbdinetd + depends = purc + depends = xguipro + options = !strip + source = hbdsamples::git+https://github.com/HybridOS2/HBDSamples.git + sha256sums = SKIP + +pkgname = hbdsamples-git + depends = hbdsamples-instrument-git + depends = hbdsamples-smart-panel-git + depends = hbdsamples-smartbox-git + +pkgname = hbdsamples-instrument-git + pkgdesc = Samples for HybridOS 2.0 () + +pkgname = hbdsamples-smart-panel-git + pkgdesc = Samples for HybridOS 2.0 () + +pkgname = hbdsamples-smartbox-git + pkgdesc = Samples for HybridOS 2.0 () diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c72a57796c35 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,102 @@ +# Maintainer: taotieren <admin@taotieren.com> + +pkgbase=hbdsamples-git +pkgname=(hbdsamples{,-{instrument,smart-panel,smartbox}}-git) +pkgver=r91.880b127 +pkgrel=1 +pkgdesc="Samples for HybridOS 2.0" +arch=(any) +url="https://github.com/HybridOS2/HBDSamples" +license=('GPL-3.0') +groups=(hybridos2-git) +replaces=() +depends=( + hbdbus + hbdinetd + purc + xguipro) +makedepends=() +checkdepends=() +optdepends=() +source=("${pkgbase%-git}::git+${url}.git") +sha256sums=('SKIP') +options=('!strip') + +pkgver() { + cd "${srcdir}/${pkgbase%-git}/" +# git describe --long --tags | sed 's/ver.//g;s/\([^-]*-g\)/r\1/;s/-/./g' + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)" +} + +package_hbdsamples-git() { + depends=(hbdsamples-{instrument,smart-panel,smartbox}-git) +} + +package_hbdsamples-instrument-git() { + cd "${srcdir}/${pkgbase%-git}/" + + local _pname=${pkgname#*-} + local _pname=${_pname%-*} + + pkgdesc+=" (${_pname%-*})" + + install -dm0755 ${pkgdir}/app + cp -rv ${_pname} ${pkgdir}/app/ + install -Dm0755 /dev/stdin ${pkgdir}/usr/bin/${pkgname%-git} << EOF +#!/usr/bin/env bash + +# Please run run-xguipro manually before running this script. +# 请先手动运行 run-xguipro 后再运行此脚本 + +cd /app/${_pname}/ + +purc -c socket -v index.hvml +EOF +} + +package_hbdsamples-smart-panel-git() { + cd "${srcdir}/${pkgbase%-git}/" + + local _pname=${pkgname#*-} + local _pname=${_pname%-*} + + pkgdesc+=" (${_pname%-*})" + + install -dm0755 ${pkgdir}/app + cp -rv ${_pname} ${pkgdir}/app/ + install -Dm0755 /dev/stdin ${pkgdir}/usr/bin/${pkgname%-git} << EOF +#!/usr/bin/env bash + +# Please run run-xguipro manually before running this script. +# 请先手动运行 run-xguipro 后再运行此脚本 + +cd /app/${_pname}/ + +purc -c socket -v index.hvml +EOF +} + +package_hbdsamples-smartbox-git() { + cd "${srcdir}/${pkgbase%-git}/" + + local _pname=${pkgname#*-} + local _pname=${_pname%-*} + + pkgdesc+=" (${_pname%-*})" + + install -dm0755 ${pkgdir}/app + cp -rv ${_pname} ${pkgdir}/app/ + install -Dm0755 /dev/stdin ${pkgdir}/usr/bin/${pkgname%-git} << EOF +#!/usr/bin/env bash + +# Please run run-xguipro manually before running this script. +# 请先手动运行 run-xguipro 后再运行此脚本 + +hbdbusd & +hbdinetd & + +cd /app/${_pname}/ + +purc -c socket -d remote -a cn.fmsoft.hybridos.settings -r radio -v index.hvml +EOF +} |