summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorChengrui Chen2023-05-20 23:59:17 +0800
committerChengrui Chen2023-05-20 23:59:17 +0800
commit629b59baa6c27796a372ac17b2127bceaa75d6df (patch)
tree13faa7b97f7f1abf14ac3db5e5cc201a7ecdd4e9 /PKGBUILD
parent2f1c74fc131c0b8511ebd2781185360a2bc74f7b (diff)
downloadaur-629b59baa6c27796a372ac17b2127bceaa75d6df.tar.gz
update PKGBUILD.
use the install.sh script provided by `koch distrohelper` in the way of `env sh DESTDIR=${pkgdir} ./install.sh /usr/bin` so that everything should be the right place according to nim's official document
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD27
1 files changed, 6 insertions, 21 deletions
diff --git a/PKGBUILD b/PKGBUILD
index e2c65efb675a..016b48d04018 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,7 +11,7 @@ pkgbase='nim-git'
pkgname=('nim-git' 'nimble-git' 'nimsuggest-git' 'nimpretty-git' 'nim-gdb-git')
pkgdesc='Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).'
epoch=1
-pkgver=1.6.8.r1070.9afb466d73
+pkgver=1.6.8.r1359.a852b2e9cf
pkgrel=1
arch=('x86_64')
groups=('nim')
@@ -86,6 +86,9 @@ build() {
cd Nim
/usr/bin/env sh build_all.sh
+
+ # for install.sh and deinstall.sh
+ ./koch distrohelper
}
package_nim-git() {
@@ -100,26 +103,9 @@ package_nim-git() {
# License
install -dm 755 "${pkgdir}/usr/share/licenses/nim"
install -m 644 "copying.txt" "${pkgdir}/usr/share/licenses/nim/LICENSE"
-
- # Docs
- install -dm 755 "${pkgdir}/usr/share/doc/nim"
- cp -dpr --no-preserve=ownership \
- doc/* \
- -t "${pkgdir}/usr/share/doc/nim"
-
+
# Nim
- ./koch install "${pkgdir}"
- install -Dm 755 bin/{nim,nimgrep} -t "$pkgdir/usr/bin"
-
- cd "${pkgdir}/nim"
- install -dm 755 "${pkgdir}"/{etc/nim,usr/lib/nim}
- find lib -mindepth 1 -maxdepth 1 -exec \
- cp -dpr --no-preserve=ownership '{}' -t "$pkgdir/usr/lib/nim" \;
- find config -mindepth 1 -maxdepth 1 -exec \
- cp -dpr --no-preserve=ownership '{}' -t "$pkgdir/etc/nim" \;
- cp -dpr --no-preserve=ownership \
- "$srcdir/Nim/lib/packages" \
- -t "$pkgdir/usr/lib/nim"
+ env DESTDIR=${pkgdir} sh ./install.sh /usr/bin
# Workaround Nim's nonstandard header file placement
# (https://bugs.archlinux.org/task/50252):
@@ -132,7 +118,6 @@ package_nim-git() {
ln -s "/usr/lib/nim/libnimrtl.so" "$pkgdir/usr/lib/libnimrtl.so"
# Clean up $pkgdir
- rm -rf "$pkgdir/nim"
find "$pkgdir" -type d -name .git -exec rm -r '{}' +
find "$pkgdir" -type f -name .gitignore -exec rm -r '{}' +
}