Package Details: misspell v0.3.4-1

Git Clone URL: https://aur.archlinux.org/misspell.git (read-only, click to copy)
Package Base: misspell
Description: Correct commonly misspelled English words in source files
Upstream URL: https://github.com/client9/misspell/
Licenses: MIT
Submitter: maowtm
Maintainer: maowtm
Last Packager: maowtm
Votes: 2
Popularity: 0.000000
First Submitted: 2019-05-01 02:38 (UTC)
Last Updated: 2019-05-01 02:38 (UTC)

Dependencies (1)

Required by (0)

Sources (1)

Latest Comments

niksingh710 commented on 2023-06-26 07:09 (UTC)

is this package yet maintained?

maowtm commented on 2021-06-23 16:37 (UTC)

@axolotl Thanks for the patch! However it's missing go.mod and go.sum. I'm not very familiar with how modern Go modules works due to not using it for a long time, so I don't know how to generate them. Can you add those to the patch (or just post a new patch), and I will apply it.

arnottcr commented on 2021-06-23 03:10 (UTC) (edited on 2021-06-23 04:37 (UTC) by arnottcr)

this does not build on recent versions of go, since modules are assumed when outside GOPATH. also, you are building from source, so either this package should be renamed to misspell-git or you should build from verified source, e.g. https://github.com/client9/misspell/archive/v0.3.4.tar.gz. finally, the version number should not include the "v" prefix. all these changes collectively can be applied with the following patch:

From 229879a1e2772d92862328fad29226b850fea63c Mon Sep 17 00:00:00 2001
From: Colin Arnott <colin@urandom.co.uk>
Date: Wed, 23 Jun 2021 04:37:37 +0000
Subject: [PATCH] 0.3.4-1

---
 .SRCINFO   | 13 ++++++++-----
 .gitignore |  4 ++++
 PKGBUILD   | 36 ++++++++++++++++++------------------
 3 files changed, 30 insertions(+), 23 deletions(-)
 create mode 100644 .gitignore

diff --git a/.SRCINFO b/.SRCINFO
index 70a9882..483fd33 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,16 @@
 pkgbase = misspell
    pkgdesc = Correct commonly misspelled English words in source files
-   pkgver = v0.3.4
+   pkgver = 0.3.4
    pkgrel = 1
-   url = https://github.com/client9/misspell/
+   url = https://github.com/client9/misspell
    arch = any
    license = MIT
    makedepends = go
-   source = misspell-src::git+https://github.com/client9/misspell.git#tag=v0.3.4
-   sha256sums = SKIP
+   source = https://github.com/client9/misspell/archive/v0.3.4.tar.gz
+   source = go.mod
+   source = go.sum
+   sha512sums = 6dfbc4aef932f18b8908efe75b6464cf444522ef0625f4abc1e9d40c5bb31238699634494cb24a0d3869336304df695ac6143784f53ca9e0d2d441b2e08eebcb
+   sha512sums = cea3d1e0966d5eb19abd8ddcffb95d53736b72b7af9791eebfc10f3a2417e8b6ada323a2eb84f74b685ebea85f44809866dc36c98fec8acbe2853eaae5adc773
+   sha512sums = e7a7a2e37af9e59486dc5bce7110170bf145490df599a9016227c13eb5a1516fc783bf538e5637695fed55a552a4d29ced23133868a583c7de2b405fe233fa09

 pkgname = misspell
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f71c635
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*
+!.gitignore
+!PKGBUILD
+!.SRCINFO
diff --git a/PKGBUILD b/PKGBUILD
index 53c4abf..efc5e88 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,30 +1,30 @@
 # Maintainer: Mao Wtm <m@maowtm.org>
 pkgname=misspell
-pkgver=v0.3.4
-pkgver() {
-  cd "$pkgname-src"
-  git describe | cut -d- -f1
-}
+pkgver=0.3.4
 pkgrel=1
-pkgdesc="Correct commonly misspelled English words in source files"
+pkgdesc='Correct commonly misspelled English words in source files'
 arch=(any)
-url="https://github.com/client9/misspell/"
+url='https://github.com/client9/misspell'
 license=('MIT')
 makedepends=('go')
-source=("$pkgname-src::git+https://github.com/client9/misspell.git#tag=$pkgver")
-sha256sums=("SKIP")
+source=("${url}/archive/v${pkgver}.tar.gz" "go.mod" "go.sum")
+sha512sums=('6dfbc4aef932f18b8908efe75b6464cf444522ef0625f4abc1e9d40c5bb31238699634494cb24a0d3869336304df695ac6143784f53ca9e0d2d441b2e08eebcb'
+   'cea3d1e0966d5eb19abd8ddcffb95d53736b72b7af9791eebfc10f3a2417e8b6ada323a2eb84f74b685ebea85f44809866dc36c98fec8acbe2853eaae5adc773'
+   'e7a7a2e37af9e59486dc5bce7110170bf145490df599a9016227c13eb5a1516fc783bf538e5637695fed55a552a4d29ced23133868a583c7de2b405fe233fa09')

 build() {
-  mkdir -p go/src/github.com/client9/
-  cp -r $pkgname-src go/src/github.com/client9/$pkgname
-  cd go
-  export GOPATH=$(pwd)
-  cd src/github.com/client9/$pkgname
-  go get -v
-  make install
+   cd "${pkgname}-${pkgver}"
+   mv ../go.mod ../go.sum .
+        go build \
+                -trimpath \
+                -buildmode=pie \
+                -mod=readonly \
+                ./cmd/...
 }

 package() {
-  install -s -DT go/bin/misspell $pkgdir/usr/bin/misspell
+        cd "${pkgname}-${pkgver}"
+        install -Dm755 ${pkgname} -t "$pkgdir/usr/bin"
+        install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
+        install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
 }
-
-- 
2.32.0