Package Details: xi-core 0.3.0-2

Git Clone URL: https://aur.archlinux.org/xi-core.git (read-only, click to copy)
Package Base: xi-core
Description: A modern editor with a backend written in Rust
Upstream URL: https://github.com/xi-editor/xi-editor
Licenses: Apache
Submitter: flipflop97
Maintainer: flipflop97
Last Packager: flipflop97
Votes: 5
Popularity: 0.106176
First Submitted: 2020-01-03 13:14
Last Updated: 2020-05-17 12:26

Latest Comments

caleb commented on 2020-05-16 12:55

Upstream URL is still not fixed. This also doen't need git to build, and there are a few other improvements that could be made. Please consider adding me as a co-maintainer so I can fix these issues, or at least apply this patch using git am < file.ptach:

From fcaaedf371441a922ca82073ff41f74ed86845c3 Mon Sep 17 00:00:00 2001
From: Caleb Maclennan <caleb@alerque.com>
Date: Sat, 16 May 2020 15:51:05 +0300
Subject: [PATCH] Overhaul packaging: fix upstream URL and dependencies

Signed-off-by: Caleb Maclennan <caleb@alerque.com>
---
 xi-core/.SRCINFO |  9 ++++-----
 xi-core/PKGBUILD | 28 +++++++++++++++++-----------
 2 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/xi-core/.SRCINFO b/xi-core/.SRCINFO
index b13da33..8d7da92 100644
--- a/xi-core/.SRCINFO
+++ b/xi-core/.SRCINFO
@@ -1,15 +1,14 @@
 pkgbase = xi-core
    pkgdesc = A modern editor with a backend written in Rust
    pkgver = 0.3.0
-   pkgrel = 1
-   url = https://github.com/google/xi-editor
+   pkgrel = 2
+   url = https://github.com/xi-editor/xi-editor
    arch = x86_64
    arch = i686
    license = Apache
-   makedepends = git
    makedepends = cargo
-   depends = gcc-libs
-   source = https://github.com/xi-editor/xi-editor/archive/v0.3.0.tar.gz
+   provides = xi-editor
+   source = xi-core-0.3.0.tar.gz::https://github.com/xi-editor/xi-editor/archive/v0.3.0.tar.gz
    sha256sums = e42998ad9b6d6df0f797afd005f9c1286aad24c30a77d0dd380730c248274b8d

 pkgname = xi-core
diff --git a/xi-core/PKGBUILD b/xi-core/PKGBUILD
index 209548f..f5fabf4 100644
--- a/xi-core/PKGBUILD
+++ b/xi-core/PKGBUILD
@@ -1,29 +1,35 @@
 # Maintainer: Philip Goto <philip.goto@gmail.com>
+# Contributor: Caleb Maclennan <caleb@alerque.com>

 pkgname=xi-core
+_project=xi-editor
 pkgver=0.3.0
-pkgrel=1
+pkgrel=2
 pkgdesc='A modern editor with a backend written in Rust'
 arch=('x86_64' 'i686')
-url='https://github.com/google/xi-editor'
+url="https://github.com/$_project/$_project"
 license=('Apache')
-depends=('gcc-libs')
-makedepends=('git' 'cargo')
-source=("https://github.com/xi-editor/xi-editor/archive/v0.3.0.tar.gz")
+makedepends=('cargo')
+provides=('xi-editor')
+source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
 sha256sums=('e42998ad9b6d6df0f797afd005f9c1286aad24c30a77d0dd380730c248274b8d')

+prepare() {
+    cd "$_project-$pkgver/rust"
+    cargo fetch --locked
+}

 build() {
-    cd "xi-editor-${pkgver}/rust"
-    cargo build --release --locked --all-features
+    cd "$_project-$pkgver/rust"
+    cargo build --locked --offline --release --all-features
 }

 check() {
-    cd "xi-editor-${pkgver}/rust"
-    cargo test --release --locked
+    cd "$_project-$pkgver/rust"
+    cargo test --locked --offline --release
 }

 package() {
-    cd "xi-editor-${pkgver}/rust"
-    install -Dm 755 "target/release/xi-core" -t "$pkgdir/usr/bin"
+    cd "$_project-$pkgver/rust"
+    install -Dm0755 -t "$pkgdir/usr/bin" "target/release/$pkgname"
 }
-- 
2.26.2

caleb commented on 2020-03-30 10:23

Github repository namespace has changed. Also why is this package called xi-core instead of xi-editor? I had some trouble finding it in the AUR.