Skip to content

Commit

Permalink
add pgkbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
antheas committed Jan 13, 2024
1 parent 1260f20 commit fb3c4c0
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/publish-aur.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish to AUR

on:
workflow_dispatch:

permissions:
contents: read

jobs:
deploy_aur:
runs-on: ubuntu-latest
environment: prod

steps:
- uses: actions/checkout@v3
- name: Create PKGBUILD dir
run: mkdir -p ./pkg/
- name: Build PKGBUILD
run: sed "s/pkgver=VERSION/pkgver=$(cat pyproject.toml | grep -E 'version = "[0-9\.]+"' -o | grep -E "[0-9\.]+" -o)/" PKGBUILD > ./pkg/PKGBUILD
- name: Publish AUR package
uses: KSXGitHub/[email protected]
with:
pkgname: adjustor
pkgbuild: ./pkg/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: manual update from actions
allow_empty_commits: false
ssh_keyscan_types: rsa,dsa,ecdsa,ed25519
24 changes: 24 additions & 0 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Maintainer: Antheas Kapenekakis <aur at antheas dot dev>
pkgname=adjustor
pkgver=VERSION
pkgrel=1
pkgdesc='Adjustor, a userspace program for managing the TDP of handheld devices.'
arch=('x86_64')
url='https://github.com/hhd-dev/adjustor'
license=('MIT')
depends=('python' 'python-rich')
provides=('adjustor')
optdepends=('hhd: adds adjustor to the hhd ui.')
makedepends=('python-'{'build','installer','setuptools','wheel'})
source=("https://pypi.python.org/packages/source/a/adjustor/adjustor-${pkgver}.tar.gz")
sha512sums=('SKIP')

build() {
cd "adjustor-$pkgver"
python -m build --wheel --no-isolation
}

package() {
cd "adjustor-$pkgver"
python -m installer --destdir="$pkgdir" dist/*.whl
}

0 comments on commit fb3c4c0

Please sign in to comment.