aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ.R. Hill2023-08-14 04:28:51 -0700
committerJ.R. Hill2023-08-14 04:38:51 -0700
commit43018ed4a063417494e5846eb3289dadc63985c5 (patch)
treedf374bf6b8e7f99b675eba61d8ae706a828c2a3b
parent1da9283296842c2c57f5028f68cdd7f4bf01f30f (diff)
downloadaur-43018ed4a063417494e5846eb3289dadc63985c5.tar.gz
Replace abandoned package with dt 1.2.3
-rw-r--r--.SRCINFO23
-rw-r--r--.gitignore16
-rw-r--r--PKGBUILD57
-rw-r--r--README.md17
-rwxr-xr-xbuild.sh78
5 files changed, 128 insertions, 63 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 61cd88cc672d..37a354ac45db 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,14 @@
pkgbase = dt
- pkgdesc = Syncing dotfiles and more
- pkgver = 0.1.0
+ pkgdesc = It's duct tape for your unix pipes
+ pkgver = 1.2.3
pkgrel = 1
- url = https://github.com/blurgyy/dt
- arch = any
- license = MIT OR Apache 2.0
- makedepends = curl
- makedepends = rustup
- depends = cargo
- provides = dt-cli
- conflicts = dt-git
- conflicts = dt-bin
- source = https://github.com/blurgyy/dt/archive/refs/tags/v0.1.0.tar.gz
- sha256sums = 9b4cea5f092194793a624ebc3ece43f84fb0daaeba0b7e9200b9982e32679f81
+ url = https://github.com/so-dang-cool/dt
+ arch = x86_64
+ arch = aarch64
+ license = BSD-3-Clause
+ makedepends = zig-bin
+ makedepends = git
+ source = dt-1.2.3.tar.gz::https://github.com/so-dang-cool/dt/archive/refs/tags/v1.2.3.tar.gz
+ sha256sums = 5b0fc09eca856d7558ff08315d6ef344a58ab8fac4a27c9e0b7e77989c6a8325
pkgname = dt
diff --git a/.gitignore b/.gitignore
index 469ea89b09b2..656aaf6a66c4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,10 +1,8 @@
-*.tar
-*.gz
-*.zip
-*.zst
-*.log
-/pkg/
-/src/
+# Output of makepkg
+/pkg
+
+# Downloaded artifacts
+/src
+dt-*.tar.gz
+dt-*.tar.zst
-# Author: Blurgy <gy@blurgy.xyz>
-# Date: Oct 07 2021, 15:58 [CST]
diff --git a/PKGBUILD b/PKGBUILD
index 56a30f31ad6c..331f3be9058f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,49 +1,24 @@
-# This is an example PKGBUILD file. Use this as a start to creating your own,
-# and remove these comments. For more information, see 'man PKGBUILD'.
-# NOTE: Please fill out the license field for your package! If it is unknown,
-# then please put 'unknown'.
-
-# Maintainer: Gaoyang Zhang <gy@blurgy.xyz>
-pkgname=dt
-pkgver=0.1.0
+# Maintainer: J.R. Hill <justin@so.dang.cool>
+pkgname="dt"
+pkgver="1.2.3"
pkgrel=1
-epoch=
-pkgdesc="Syncing dotfiles and more"
-arch=("any")
-url="https://github.com/blurgyy/dt"
-license=('MIT OR Apache 2.0')
-groups=()
-depends=(cargo)
-makedepends=(
- curl
- rustup
-)
-checkdepends=()
-optdepends=()
-provides=("dt-cli")
-conflicts=("dt-git" "dt-bin")
-replaces=()
-backup=()
-options=()
-install=
-changelog=
-source=("https://github.com/blurgyy/dt/archive/refs/tags/v${pkgver}.tar.gz")
-sha256sums=("9b4cea5f092194793a624ebc3ece43f84fb0daaeba0b7e9200b9982e32679f81")
-noextract=()
-validpgpkeys=()
+pkgdesc="It's duct tape for your unix pipes"
+arch=('x86_64' 'aarch64')
+url="https://github.com/so-dang-cool/dt"
+license=('BSD-3-Clause')
+makedepends=('zig-bin' 'git')
+source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
+sha256sums=('5b0fc09eca856d7558ff08315d6ef344a58ab8fac4a27c9e0b7e77989c6a8325')
build() {
- cd "$pkgname-$pkgver"
- cargo build --bin=dt-cli --release --all-features
-}
+ cd "${srcdir}/${pkgname}-${pkgver}"
-check() {
- cd "$pkgname-$pkgver"
- cargo test --release --all-features
+ zig build -Doptimize=ReleaseSafe
}
package() {
- cd "$pkgname-$pkgver"
- install -Dm755 "target/release/dt-cli" "$pkgdir/usr/bin/dt-cli"
- install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/dt/LICENSE"
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ install -Dm755 "zig-out/bin/dt" "${pkgdir}/usr/bin/dt"
}
+
diff --git a/README.md b/README.md
new file mode 100644
index 000000000000..9e9c979d5f42
--- /dev/null
+++ b/README.md
@@ -0,0 +1,17 @@
+[dt](https://github.com/so-dang-cool/dt) as packaged for AUR.
+
+# Maintaining
+
+Packaging references:
+
+- https://wiki.archlinux.org/title/AUR_submission_guidelines
+- https://wiki.archlinux.org/title/Arch_package_guidelines
+- https://man.archlinux.org/man/PKGBUILD.5
+- https://man.archlinux.org/man/makepkg.8
+
+tl;dr: these are probably the steps for a simple version bump
+
+1. Update the version/sha256sum in PKGBUILD
+2. Run `./build.sh clean install check`
+3. Commit and push
+
diff --git a/build.sh b/build.sh
new file mode 100755
index 000000000000..32d956228197
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+set -euo pipefail
+
+clean() {
+ rm -f ./dt-*.tar.gz ./dt-*.tar.zst
+ rm -rf ./pkg ./src
+}
+
+install() {
+ # Assumes you are on Arch, btw.
+ if ! makepkg
+ then
+ sha256sum ./dt-*.tar.gz
+ exit 1
+ fi
+ makepkg --printsrcinfo > .SRCINFO
+}
+
+check() {
+ pkgdir="./pkg/dt"
+ if [ ! -x "$pkgdir/usr/bin/dt" ]
+ then
+ >&2 echo "dt binary was not installed and executable"
+ exit 1
+ fi
+
+ "$pkgdir"/usr/bin/dt --help
+}
+
+push() {
+ git push
+
+ local branch="packaging/arch-aur"
+ git branch -d $branch || true
+ git checkout -b $branch
+ git push mirror $branch
+ git checkout master
+ git branch -d $branch
+}
+
+bootstrap() {
+ # TODO: Add zig once zig in Arch is 0.11
+ pacman -S git base-devel
+}
+
+help() {
+ echo "Usage: $0 [bootstrap|clean|install|check]..."
+}
+
+run() {
+ case "$1" in
+ bootstrap) bootstrap ;;
+ clean) clean ;;
+ install) install ;;
+ check) check ;;
+ push) push ;;
+ *) >&2 help
+ >&2 echo "Unknown target: $1"
+ exit 1 ;;
+ esac
+}
+
+# Exit with help message if no input.
+if [ "$@unset" = unset ]
+then
+ help && exit
+fi
+
+set -x
+
+# Handle all args as run commands.
+for cmd in "$@"
+do
+ run "$cmd"
+done
+
+# vim: set expandtab ts=4 sw=4