| @@ -1,14 +1,13 @@ |
| 1 | 1 | | # Maintainer: krolyxon <me@krolyxon.com> |
| 2 | | − | pkgname=remage-git |
| 2 | + | pkgname=remage-bin |
| 3 | 3 | | _pkgname=remage |
| 4 | | − | pkgver=0.1.0.r0.g0000000 |
| 4 | + | pkgver=0.1.0 |
| 5 | 5 | | pkgrel=1 |
| 6 | 6 | | pkgdesc='Keyboard-centric, GPU-rendered image viewer with vim keys and wallpaper theming' |
| 7 | | − | arch=('x86_64' 'aarch64') |
| 7 | + | arch=('x86_64') |
| 8 | 8 | | url='https://github.com/krolyxon/remage' |
| 9 | 9 | | license=('AGPL-3.0-only' 'OFL-1.1') |
| 10 | 10 | | depends=('gcc-libs' 'glibc' 'dav1d' 'libheif' 'libxkbcommon' 'wayland' 'vulkan-icd-loader') |
| 11 | | − | makedepends=('cargo' 'git' 'pkgconf') |
| 12 | 11 | | optdepends=( |
| 13 | 12 | | 'libx11: X11 support' |
| 14 | 13 | | 'libxcursor: X11 cursors' |
| @@ -22,51 +21,21 @@ optdepends=( |
| 22 | 21 | | ) |
| 23 | 22 | | provides=("$_pkgname") |
| 24 | 23 | | conflicts=("$_pkgname") |
| 25 | | − | options=('!lto') |
| 26 | | − | source=("git+$url.git") |
| 27 | | − | sha256sums=('SKIP') |
| 28 | | − | |
| 29 | | − | pkgver() { |
| 30 | | − | cd "$_pkgname" |
| 31 | | − | printf '%s.r%s.g%s' \ |
| 32 | | − | "$(grep -m1 '^version' Cargo.toml | cut -d'"' -f2)" \ |
| 33 | | − | "$(git rev-list --count HEAD)" \ |
| 34 | | − | "$(git rev-parse --short HEAD)" |
| 35 | | − | } |
| 36 | | − | |
| 37 | | − | prepare() { |
| 38 | | − | cd "$_pkgname" |
| 39 | | − | export RUSTUP_TOOLCHAIN=stable |
| 40 | | − | cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" |
| 41 | | − | } |
| 42 | | − | |
| 43 | | − | build() { |
| 44 | | − | cd "$_pkgname" |
| 45 | | − | export RUSTUP_TOOLCHAIN=stable |
| 46 | | − | export CARGO_TARGET_DIR=target |
| 47 | | − | cargo build --frozen --release |
| 48 | | − | target/release/remage man > remage.1 |
| 49 | | − | target/release/remage completions zsh > _remage |
| 50 | | − | target/release/remage completions bash > remage.bash |
| 51 | | − | target/release/remage completions fish > remage.fish |
| 52 | | − | } |
| 53 | | − | |
| 54 | | − | check() { |
| 55 | | − | cd "$_pkgname" |
| 56 | | − | export RUSTUP_TOOLCHAIN=stable |
| 57 | | − | cargo test --frozen --release |
| 58 | | − | } |
| 24 | + | options=('!strip' '!debug') |
| 25 | + | _dir="$_pkgname-v$pkgver-x86_64-linux" |
| 26 | + | source=("$url/releases/download/v$pkgver/$_dir.tar.gz") |
| 27 | + | sha256sums=('d9688a8244eacc2aa4daf6b18cea3244fd3aedcf29d142f2efc3c45fa13912dd') |
| 59 | 28 | | |
| 60 | 29 | | package() { |
| 61 | | − | cd "$_pkgname" |
| 62 | | − | install -Dm755 target/release/remage -t "$pkgdir/usr/bin/" |
| 30 | + | cd "$_dir" |
| 31 | + | install -Dm755 remage -t "$pkgdir/usr/bin/" |
| 63 | 32 | | install -Dm644 remage.1 -t "$pkgdir/usr/share/man/man1/" |
| 64 | | − | install -Dm644 _remage -t "$pkgdir/usr/share/zsh/site-functions/" |
| 65 | | − | install -Dm644 remage.bash "$pkgdir/usr/share/bash-completion/completions/remage" |
| 66 | | − | install -Dm644 remage.fish -t "$pkgdir/usr/share/fish/vendor_completions.d/" |
| 33 | + | install -Dm644 completions/_remage -t "$pkgdir/usr/share/zsh/site-functions/" |
| 34 | + | install -Dm644 completions/remage.bash "$pkgdir/usr/share/bash-completion/completions/remage" |
| 35 | + | install -Dm644 completions/remage.fish -t "$pkgdir/usr/share/fish/vendor_completions.d/" |
| 67 | 36 | | install -Dm644 contrib/remage.desktop -t "$pkgdir/usr/share/applications/" |
| 68 | 37 | | install -Dm644 README.md contrib/config.example.toml -t "$pkgdir/usr/share/doc/$_pkgname/" |
| 69 | 38 | | cp -r contrib/matugen contrib/pywal "$pkgdir/usr/share/doc/$_pkgname/" |
| 70 | 39 | | install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/" |
| 71 | | − | install -Dm644 assets/fonts/OFL.txt "$pkgdir/usr/share/licenses/$pkgname/OFL-fonts.txt" |
| 40 | + | install -Dm644 OFL-fonts.txt -t "$pkgdir/usr/share/licenses/$pkgname/" |
| 72 | 41 | | } |