mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-16 03:40:37 +08:00
Add arch packaging
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
when:
|
||||
- event: pull_request
|
||||
- event: push
|
||||
branch: main
|
||||
- event: manual
|
||||
|
||||
steps:
|
||||
build-arch:
|
||||
image: docker.io/library/archlinux:base-devel
|
||||
when:
|
||||
- path: "arch/*"
|
||||
- event: manual
|
||||
commands:
|
||||
- pacman -Sy --noconfirm git
|
||||
- useradd -m builder
|
||||
- 'echo "builder ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/builder'
|
||||
- chown -R builder:builder /home/builder
|
||||
- su builder
|
||||
- set -e
|
||||
- cd /home/builder
|
||||
- rm -rf radicle-bin && git clone https://aur.archlinux.org/radicle-bin.git --depth=1
|
||||
- makepkg --dir radicle-bin --install --syncdeps --noconfirm
|
||||
- cd $CI_WORKSPACE/arch/radicle-desktop
|
||||
# Ensure .SCRINFO is up-to-date
|
||||
- makepkg --printsrcinfo > .SRCINFO && git diff --exit-code .SRCINFO
|
||||
- |
|
||||
CI=true \
|
||||
BUILDDIR=/home/builder/build \
|
||||
PKGDEST=/home/builder/ \
|
||||
SRCDEST=/home/builder/ \
|
||||
makepkg --syncdeps --noconfirm --force
|
||||
+19
@@ -10,8 +10,26 @@
|
||||
- Build the macOS app locally: `npm run tauri build`.
|
||||
- Make sure to clean any transient dependencies with `cargo clean && rm -rf node_modules` before building.
|
||||
- Upload the macOS build to [MinIO][0] in the same folder as the latest Linux build.
|
||||
- Publish Arch Linux package (See `arch/README.md` for more information)
|
||||
- Update `pkgver` in `arch/PKGBUILD` to match the release version
|
||||
- Update `_commit` in `arch/PKGBUILD` to the release commit created above
|
||||
- Regenerate `.SRCINFO` with
|
||||
|
||||
```bash
|
||||
cd arch && ./generate-srcinfo.sh
|
||||
```
|
||||
|
||||
- Create a patch with the changes and wait for CI to pass
|
||||
|
||||
- Create a patch on [radworks-product][1] to [update the download links][2].
|
||||
- Once merged, publish the website: `git push github main`.
|
||||
- Publish the Arch package by pushing changes to the [Arch User Repository][4]:
|
||||
|
||||
```bash
|
||||
cd arch && ./publish.sh
|
||||
```
|
||||
|
||||
You need to be a maintainer of the AUR package to push.
|
||||
- Announce the release on Zulip, following the [previous announcement format][3].
|
||||
- Resolve the previous release topic on Zulip.
|
||||
|
||||
@@ -19,3 +37,4 @@
|
||||
[1]: https://app.radicle.xyz/nodes/seed.radicle.garden/rad:z4Rxw3J2gX8SJgUYJ3h1KvQCAYoKS
|
||||
[2]: https://app.radicle.xyz/nodes/seed.radicle.garden/rad:z4Rxw3J2gX8SJgUYJ3h1KvQCAYoKS/commits/17c25b85b123d9766c774cc414e3ffdfc7b69771
|
||||
[3]: https://radicle.zulipchat.com/#narrow/channel/409174-announcements/topic/radicle-desktop.20v0.2E2.2E0.20.28early.20preview.29/with/514356912
|
||||
[4]: https://aur.archlinux.org/packages/radicle-desktop
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
radicle-desktop.git
|
||||
@@ -0,0 +1,37 @@
|
||||
# Packaging for Arch Linux
|
||||
|
||||
This folder contains the `PKGBUILD` script for building the `radicle-desktop`
|
||||
Arch Linux package.
|
||||
|
||||
## Arch User Repository
|
||||
|
||||
This folder is mirrored to the Arch User Repository as
|
||||
[`radicle-desktop`][aur-pkg] so user can install it from there.
|
||||
|
||||
Whenever a change is made to the `radicle-desktop` folder it can be synched to
|
||||
the AUR using the `./publish.sh <COMMIT_MSG>` script.
|
||||
|
||||
Before you push any changes, make sure that the package builds properly, see
|
||||
“Build QA” below.
|
||||
|
||||
You need to be a maintainer of the `radicle-desktop` to be allowed to push
|
||||
changes. To become a maintainer ask one of the existing maintainers to add you.
|
||||
|
||||
## Build QA
|
||||
|
||||
There is a [Woodpecker CI workflow][workflow] to ensure that the package builds
|
||||
correctly on Arch Linux.
|
||||
|
||||
You can run the workflow locally.
|
||||
|
||||
```bash
|
||||
woodpecker-cli \
|
||||
exec .woodpecker/build-arch.yaml \
|
||||
--repo-path . \
|
||||
--volumes paccache:/var/cache/pacman,builder:/home/builder
|
||||
```
|
||||
|
||||
Using `--volumes` is optional and improves caching between multiple runs.
|
||||
|
||||
[aur-pkg]: https://aur.archlinux.org/packages/radicle-desktop
|
||||
[workflow]: ../.woodpecker/build-arch.yaml
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
exec docker run \
|
||||
--user 1000 \
|
||||
--rm --volume "$(pwd):/workdir:ro" \
|
||||
--env BUILDDIR=/tmp \
|
||||
--env PKGDEST=/tmp \
|
||||
--env SRCDEST=/tmp \
|
||||
--workdir /workdir \
|
||||
archlinux:base-devel makepkg --printsrcinfo > .SRCINFO
|
||||
|
||||
Executable
+39
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
push=true
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--no-push)
|
||||
push=false
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
commit_message="$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ -z "${commit_message:-}" ]]; then
|
||||
echo "Please provide a commit message as an argument: $0 [--no-push] \"Release vX.Y.Z\""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -d radicle-desktop.git ]]; then
|
||||
git clone ssh://aur.archlinux.org/radicle-desktop.git radicle-desktop.git
|
||||
fi
|
||||
|
||||
pushd radicle-desktop.git >/dev/null
|
||||
export GIT_PAGER=""
|
||||
git checkout master
|
||||
git pull
|
||||
cp --archive ../radicle-desktop/* ../radicle-desktop/.* .
|
||||
git diff
|
||||
git commit --all --message "$commit_message"
|
||||
if [[ "$push" == true ]]; then
|
||||
git push
|
||||
fi
|
||||
popd >/dev/null
|
||||
@@ -0,0 +1,32 @@
|
||||
pkgbase = radicle-desktop
|
||||
pkgdesc = Radicle desktop app
|
||||
pkgver = 0.4.1
|
||||
pkgrel = 1
|
||||
url = https://www.radworks.garden/
|
||||
arch = x86_64
|
||||
license = GPL-3.0-only
|
||||
makedepends = git
|
||||
makedepends = openssl
|
||||
makedepends = appmenu-gtk-module
|
||||
makedepends = libappindicator-gtk3
|
||||
makedepends = librsvg
|
||||
makedepends = rustup
|
||||
makedepends = npm
|
||||
makedepends = nodejs
|
||||
depends = radicle-node-bin
|
||||
depends = cairo
|
||||
depends = desktop-file-utils
|
||||
depends = gdk-pixbuf2
|
||||
depends = glib2
|
||||
depends = gtk3
|
||||
depends = hicolor-icon-theme
|
||||
depends = libsoup
|
||||
depends = pango
|
||||
depends = webkit2gtk-4.1
|
||||
options = !strip
|
||||
options = !emptydirs
|
||||
options = !lto
|
||||
source = radicle-desktop::git+https://seed.radicle.xyz/z4D5UCArafTzTQpDZNQRuqswh3ury.git#commit=33dd37714b7dbf56a11339a4c6f56f11d8b85351
|
||||
sha256sums = SKIP
|
||||
|
||||
pkgname = radicle-desktop
|
||||
@@ -0,0 +1,3 @@
|
||||
/src
|
||||
/pkg
|
||||
/radicle-desktop
|
||||
@@ -0,0 +1,56 @@
|
||||
# Maintainer: Thomas Scholtes <geigerzaehler@axiom.fm>
|
||||
#
|
||||
# shellcheck shell=bash disable=SC2034 disable=SC2154
|
||||
|
||||
_commit=33dd37714b7dbf56a11339a4c6f56f11d8b85351
|
||||
pkgname=radicle-desktop
|
||||
pkgver='0.4.1'
|
||||
pkgrel='1'
|
||||
pkgdesc='Radicle desktop app'
|
||||
arch=('x86_64')
|
||||
url='https://www.radworks.garden/'
|
||||
license=('GPL-3.0-only')
|
||||
depends=(
|
||||
'radicle-node-bin'
|
||||
# See https://v2.tauri.app/distribute/aur/#building-from-source
|
||||
'cairo'
|
||||
'desktop-file-utils'
|
||||
'gdk-pixbuf2'
|
||||
'glib2'
|
||||
'gtk3'
|
||||
'hicolor-icon-theme'
|
||||
'libsoup'
|
||||
'pango'
|
||||
'webkit2gtk-4.1'
|
||||
)
|
||||
makedepends=(
|
||||
# See https://v2.tauri.app/distribute/aur/#building-from-source
|
||||
'git'
|
||||
'openssl'
|
||||
'appmenu-gtk-module'
|
||||
'libappindicator-gtk3'
|
||||
'librsvg'
|
||||
'rustup'
|
||||
'npm'
|
||||
'nodejs'
|
||||
)
|
||||
options=('!strip' '!emptydirs' '!lto')
|
||||
source=("$pkgname::git+https://seed.radicle.xyz/z4D5UCArafTzTQpDZNQRuqswh3ury.git#commit=$_commit")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
prepare() {
|
||||
cd "$pkgname" || return 1
|
||||
|
||||
npm install
|
||||
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$pkgname" || return 1
|
||||
|
||||
npx tauri build --bundles deb
|
||||
}
|
||||
|
||||
package() {
|
||||
cp -a $pkgname/target/release/bundle/deb/${pkgname}_${pkgver}_*/data/* "${pkgdir}"
|
||||
}
|
||||
Reference in New Issue
Block a user