Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
svenrademakers committed Nov 4, 2024
1 parent e00620f commit 79f9a3b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/aur_upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Upload AUR

on: [push]
#on:
# release:
# types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: generate PKGBUILD
run: |
PACKAGE_NAME=$(grep '^name =' ${toml_file} | sed 's/name = "\(.*\)"/\1/')
VERSION=$(grep '^version =' ${toml_file} | sed 's/version = "\(.*\)"/\1/')
MAINTAINER=$(grep '^authors =' ${toml_file} | sed 's/authors = \[\s*"\(.*\)\s*"\]/\1/')
DESCRIPTION=$(grep '^description =' ${toml_file} | sed 's/description = "\(.*\)"/\1/')
sed -i '1i # Maintainer: ${MAINTAINER}' scripts/ci/PKGBUILD
sed -i 's/^pkgname=.*/pkgname=${PACKAGE_NAME}/' scripts/ci/PKGBUILD
sed -i 's/^pkgver=.*/pkgver=${VERSION}/' scripts/ci/PKGBUILD
sed -i 's/^pkgdesc=.*/pkgdesc=${DESCRIPTION}/' scripts/ci/PKGBUILD
- name: Validate package
uses: heyhusen/archlinux-package-action@v2
with:
path: scripts/ci
updpkgsums: true
srcinfo: true
13 changes: 13 additions & 0 deletions scripts/ci/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pkgname=
pkgver=
pkgrel=1
pkgdesc=
url=https://turingpi.com/
license=('Apache')
arch=('x86_64' 'aarch64')
source_x86_64=("https://github.com/turing-machines/tpi/releases/download/v${pkgver}/tpi-x86_64-unknown-linux-gnu.tar.gz")
source_aarch64=("https://github.com/turing-machines/tpi/releases/download/v${pkgver}/tpi-aarch64-unknown-linux-gnu.tar.gz")

package() {
tar -xzf "${srcdir}/tpi-${CARCH}-unknown-linux-gnu.tar.gz" -C "${pkgdir}"
}

0 comments on commit 79f9a3b

Please sign in to comment.