Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COMTool 打包到 Arch Linux AUR 仓库 #44

Open
taotieren opened this issue Feb 19, 2022 · 4 comments
Open

COMTool 打包到 Arch Linux AUR 仓库 #44

taotieren opened this issue Feb 19, 2022 · 4 comments

Comments

@taotieren
Copy link
Contributor

taotieren commented Feb 19, 2022

补充了依赖包,进行了一些删改,python-comtool
python-comtool-git
python-comtool 发行版

# Maintainer: taotieren <admin@taotieren.com>

pkgname=python-comtool
pkgver=2.2.0
pkgrel=1
epoch=
pkgdesc="A cross platform serial debug tools written by python"
arch=('any')
url="https://github.com/Neutree/COMTool"
license=('LGPL3.0')
groups=()
depends=('python' 'python-pyqt5' 'python-pyserial' 'python-requests' 'python-babel' )
makedepends=('python-build' 'python-installer' 'python-wheel')
checkdepends=()
optdepends=()
provides=('COMTool')
conflicts=('comtool' 'python-comtool-git')
replaces=()
backup=()
options=('!strip')
install=
changelog=
source=("${pkgname#python-}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
noextract=()
sha256sums=('ecddf7b8c96803eab5739d948160f08ba4ef203c8d271f186a5e9c532ae1aec6')
#validpgpkeys=()

build() {
    cd "${srcdir}/COMTool-${pkgver}"
    python -m build --wheel --no-isolation
}

package() {
    cd "${srcdir}/COMTool-${pkgver}"
    python -m installer --destdir="${pkgdir}" dist/*.whl
    rm -rf "${pkgdir}/usr/LICENSE"
    rm -rf "${pkgdir}/usr/README.MD"
    install -Dm0644 "${srcdir}/COMTool-${pkgver}/COMTool/assets/logo.png" "${pkgdir}/usr/share/pixmaps/${pkgname#python-}.png"
    install -Dm0644 /dev/stdin "${pkgdir}/usr/share/applications/io.github.neutree.${pkgname#python-}.desktop" << EOF
[Desktop Entry]
Version=1.0
Type=Application
Name=ComTool
Comment=comtool serial communication debug tool
Exec=${pkgname#python-} %U
Icon=${pkgname#python-}.png
Categories=Development;
Terminal=false
StartupNotify=true
MimeType=application/x-executable;
EOF
}

python-comtool-git 开发版

# Maintainer: taotieren <admin@taotieren.com>

pkgname=python-comtool-git
pkgver=2.2.1.r4.g9f2e897
pkgrel=1
epoch=
pkgdesc="A cross platform serial debug tools written by python"
arch=('any')
url="https://github.com/Neutree/COMTool"
license=('LGPL3.0')
groups=()
depends=('python' 'python-pyqt5' 'python-pyserial' 'python-requests' 'python-babel' )
makedepends=('python-build' 'python-installer' 'python-wheel' 'git')
checkdepends=()
optdepends=()
provides=('COMTool')
conflicts=('comtool' 'python-comtool')
replaces=()
backup=()
options=('!strip')
install=
changelog=
source=("git+${url}.git")
noextract=()
sha256sums=('SKIP')
#validpgpkeys=()

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

build() {
    cd "${srcdir}/COMTool"
    python -m build --wheel --no-isolation
}

package() {
    cd "${srcdir}/COMTool"
    python -m installer --destdir="${pkgdir}" dist/*.whl
    rm -rf "${pkgdir}/usr/LICENSE"
    rm -rf "${pkgdir}/usr/README.MD"
    install -Dm0644 "${srcdir}/COMTool/COMTool/assets/logo.png" "${pkgdir}/usr/share/pixmaps/comtool.png"
    install -Dm0644 /dev/stdin "${pkgdir}/usr/share/applications/io.github.neutree.comtool.desktop" << EOF
[Desktop Entry]
Version=1.0
Type=Application
Name=ComTool
Comment=comtool serial communication debug tool
Exec=comtool %U
Icon=comtool.png
Categories=Development;
Terminal=false
StartupNotify=true
MimeType=application/x-executable;
EOF
}

image
image

@taotieren
Copy link
Contributor Author

@Neutree 如果你有 Arch 账户的话,可以邀请共同维护这两个软件包,仓库配置 Github Action 可以做到和 AUR 仓库同步更新。

@Neutree
Copy link
Owner

Neutree commented Feb 19, 2022

干得漂亮!非常感谢
目前我还没贡献过AUR,有时间我体验下

@Neutree
Copy link
Owner

Neutree commented Feb 21, 2022

image

虽然写了 makepkg 依赖,但是貌似 python的build包和installer包都没有自动安装,我手动安装后在装就ok了

@taotieren
Copy link
Contributor Author

taotieren commented Feb 22, 2022

image

虽然写了 makepkg 依赖,但是貌似 python的build包和installer包都没有自动安装,我手动安装后在装就ok了

你用 makepkg -si 编译或者用 devtools 里面的 extra-x86_64-build 来干净的编译

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy