Skip to content

Commit

Permalink
Merge pull request #39 from ifd3f/aur
Browse files Browse the repository at this point in the history
AUR scripts
  • Loading branch information
ifd3f committed Mar 15, 2023
2 parents 50a83f5 + f6fbcb5 commit 820cd69
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
[package]
name = "caligula"
description = "A lightweight, user-friendly disk imaging tool"
homepage = "https://github.com/ifd3f/caligula"
repository = "https://github.com/ifd3f/caligula.git"
authors = ["Astrid Yu <astrid@astrid.tech>"]
version = "0.3.0"
edition = "2021"
license = "GPL-3.0"
Expand Down
2 changes: 2 additions & 0 deletions packaging/aur/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build
/caligula-bin
15 changes: 15 additions & 0 deletions packaging/aur/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
rootdir=$(shell pwd)

.PHONY: main
main: inputs dockerimage build caligula-bin
docker run --rm -it -v $(rootdir)/inputs:/inputs:ro -v $(rootdir)/caligula-bin:/caligula-bin caligula-packaging

caligula-bin:
git clone ssh://aur@aur.archlinux.org/caligula-bin.git

.PHONY: dockerimage
dockerimage: dockerenv
docker build -t caligula-packaging $<

build:
mkdir -p build
1 change: 1 addition & 0 deletions packaging/aur/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Included here are some scripts of questionable quality for making the AUR build go brrrr.
12 changes: 12 additions & 0 deletions packaging/aur/dockerenv/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM archlinux

RUN pacman -Syu --noconfirm \
base-devel \
rust \
sudo

RUN useradd -m user

COPY entrypoint.sh /entrypoint.sh

ENTRYPOINT [ "/entrypoint.sh" ]
11 changes: 11 additions & 0 deletions packaging/aur/dockerenv/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

set -euxo pipefail

chown -R user /caligula-bin

{
cd /caligula-bin
cp /inputs/caligula-bin-PKGBUILD ./PKGBUILD
sudo -u user makepkg --printsrcinfo | tee .SRCINFO
}
16 changes: 16 additions & 0 deletions packaging/aur/inputs/caligula-bin-PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
pkgname=caligula-bin
pkgver=0.3.0
pkgrel=1
pkgdesc="A lightweight, user-friendly disk imaging tool"
url="https://github.com/ifd3f/caligula"
license=("GPL-3.0")
arch=("x86_64")
provides=("caligula")
conflicts=("caligula")
source=("https://github.com/ifd3f/caligula/releases/download/v$pkgver/caligula-$CARCH-linux")
sha256sums=("ae1dda2649d7c9152b032b8ded1623bef8705296ea11d6060471ff3f63aa1046")

package() {
mv caligula-x86_64-linux caligula
install -Dm755 caligula -t "$pkgdir/usr/bin"
}

0 comments on commit 820cd69

Please sign in to comment.