Browse Source

Improves packaging for v0.0.4

master
Nemo 4 months ago
parent
commit
a986b76ee6
2 changed files with 20 additions and 14 deletions
  1. 1
    1
      .SRCINFO
  2. 19
    13
      PKGBUILD

+ 1
- 1
.SRCINFO View File

@@ -1,7 +1,7 @@
1 1
 pkgbase = karn
2 2
 	pkgdesc = Manage multiple Git identities with ease
3 3
 	pkgver = 0.0.4
4
-	pkgrel = 1
4
+	pkgrel = 2
5 5
 	url = https://github.com/prydonius/karn
6 6
 	arch = x86_64
7 7
 	arch = i686

+ 19
- 13
PKGBUILD View File

@@ -2,29 +2,35 @@
2 2
 
3 3
 pkgname=karn
4 4
 pkgver=0.0.4
5
-pkgrel=1
5
+pkgrel=2
6 6
 pkgdesc="Manage multiple Git identities with ease"
7 7
 arch=('x86_64' 'i686')
8 8
 url="https://github.com/prydonius/karn"
9 9
 license=('MIT')
10 10
 makedepends=('go')
11 11
 options=('!strip' '!emptydirs')
12
+
12 13
 source=("https://github.com/prydonius/karn/archive/v$pkgver.tar.gz")
13 14
 sha256sums=('68d244558ef62cf1da2b87927a0a2fbf907247cdd770fc8c84bf72057195a6cb')
14 15
 
15
-prepare() {
16
-  GOPATH=`pwd`
17
-  cd "$pkgname-$pkgver"
18
-  go get github.com/urfave/cli
19
-}
20
-
21 16
 build() {
22
-  GOPATH=`pwd`
23
-  cd "$pkgname-$pkgver"
24
-  go build cmd/karn/karn.go
17
+	cd "$srcdir/$pkgname-$pkgver"
18
+
19
+	rm -rf "$srcdir/go/src"
20
+
21
+	mkdir -p "$srcdir/go/src"
22
+
23
+	export GOPATH="$srcdir/go"
24
+
25
+	mv "$srcdir/$pkgname-$pkgver" "$srcdir/go/src/$pkgname"
26
+
27
+	cd "$srcdir/go/src/$pkgname/"
28
+
29
+	go get
30
+
31
+	go build cmd/karn/karn.go
25 32
 }
26 33
 
27 34
 package() {
28
-  ls -la
29
-  install -Dm755 "$pkgname-$pkgver/karn" "$pkgdir/usr/bin/$pkgname"
30
-}
35
+	install -DT "$srcdir/go/src/$pkgname/$pkgname" "$pkgdir/usr/bin/karn"
36
+}

Loading…
Cancel
Save