您尚未登录。

楼主 # 2022-02-18 18:28:47

taotieren
会员
注册时间: 2020-05-19
已发帖子: 116
积分: 151

NuTool-USB-to-Serial-Port 打包到 Arch Linux 的 AUR 仓库

编写 nutool-usbtoserialport 的 PKGBUILD 已经上传到 Arch Linux 的 AUR 仓库 [nutool-usbtoserialport-git](https://aur.archlinux.org/packages/nutool-usbtoserialport-git)。
可以通过 AUR 工具下载安装,如:yay

yay -S nutool-usbtoserialport-git

PKGBUILD 源码

# Maintainer: taotieren <admin@taotieren.com>

pkgname=nutool-usbtoserialport-git
_pkgname=NuTool-USBtoSerialPort
pkgver=e7da256
pkgrel=1
epoch=
pkgdesc="NuTool-USB to Serial Port is a host-side software, it passes through and montiors I2C, SPI and CAN data of Nu-Link2-Pro® adapter"
arch=('any')
url="https://gitee.com/OpenNuvoton/NuTool-USB-to-Serial-Port"
license=('GPL3')
groups=()
depends=('qt5-serialport')
makedepends=('qt5-tools' 'git')
checkdepends=()
optdepends=()
provides=('NuTool-USBtoSerialPort')
conflicts=(${pkgname%-git})
replaces=()
backup=()
options=('!strip')
install=
changelog=
source=("${_pkgname}::git+${url}.git")
noextract=()
sha256sums=('SKIP')
#validpgpkeys=()

pkgver() {
    cd "${srcdir}/${_pkgname}/"
#     git describe --long --tags | sed 's/V//g;s/\([^-]*-g\)/r\1/;s/-/./g'
    git describe --always | sed 's|-|.|g'
}

build() {
    cd "${srcdir}/${_pkgname}"
    qmake
    make
}

package() {
    cd "${srcdir}/${_pkgname}"
    install -Dm0755 ${_pkgname} "${pkgdir}/usr/bin/${_pkgname}"

    install -Dm0644 /dev/stdin "${pkgdir}/usr/share/metainfo/io.gitee.opennuvoton.nutool-usb-to-serial-port.metainfo.xml" << EOF
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
  <id>io.gitee.opennuvoton.nutool-usb-to-serial-port</id>

  <name>${_pkgname}</name>
  <summary>${_pkgname}</summary>

  <metadata_license>MIT</metadata_license>
  <project_license>GPL-2.0-or-later</project_license>

  <description>
    <p>
      NuTool-USB to Serial Port is a host-side software, it passes through and montiors I2C, SPI and CAN data of Nu-Link2-Pro® adapter
    </p>
  </description>

  <launchable type="desktop-id">io.gitee.opennuvoton.nutool-usb-to-serial-port.desktop</launchable>
</component>
EOF

    install -Dm0644 /dev/stdin "${pkgdir}/usr/share/applications/io.gitee.opennuvoton.nutool-usb-to-serial-port.desktop" << EOF
[Desktop Entry]
Version=1.0
Type=Application

Name=${_pkgname}
Comment=${_pkgname}
Categories=Development;Electronics;

Icon=${_pkgname}
Exec=${_pkgname}
Terminal=false
EOF
    install -dm0755 "${pkgdir}/usr/share/licenses/${pkgname%-git}/"
    cp -ra "${srcdir}/${_pkgname}/Licenses" "${pkgdir}/usr/share/licenses/${pkgname%-git}/"
}

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn