-
-
Save SebRut/d47e4e8ecc718f34efffe12e7dc29a52 to your computer and use it in GitHub Desktop.
nim 1.6.2 arch linux pkgbuild file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org> | |
# Contributor: Alexander F Rødseth <xyproto@archlinux.org> | |
# Contributor: Dominik Picheta <morfeusz8@gmail.com> | |
# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com> | |
# Contributor: Jesus Alvarez <jeezusjr@gmail.com> | |
pkgname=nim | |
_pkgname=nim | |
pkgver=1.6.2 | |
_csourcesver=0.20.0 | |
pkgrel=1 | |
pkgdesc='Imperative, multi-paradigm, compiled programming language' | |
url='https://nim-lang.org/' | |
arch=('x86_64') | |
license=('MIT') | |
depends=('bash') | |
makedepends=('git') | |
optdepends=('nimble: Nim package manager') | |
options=('!emptydirs') | |
backup=( | |
etc/nim/nim.cfg | |
etc/nim/nimdoc.cfg | |
etc/nim/nimdoc.tex.cfg | |
etc/nim/rename.rules.cfg | |
) | |
source=(https://nim-lang.org/download/nim-${pkgver}.tar.xz) | |
sha256sums=('9ac4714fa6c315d691da7f5d8941c1b190d4d437397d9742e327c2d51893e373') | |
build() { | |
cd "${srcdir}/${_pkgname}-${pkgver}" | |
echo "Building nim" | |
sh build.sh | |
echo "Building koch" | |
bin/nim c koch | |
echo "Building ???" | |
./koch boot -d:release -d:nativeStacktrace -d:useGnuReadline | |
echo "Building tools" | |
./koch tools | |
} | |
package() { | |
cd "${srcdir}/${_pkgname}-${pkgver}" | |
./koch install "${pkgdir}" | |
install -d "${pkgdir}/usr/lib" | |
cp -a lib "${pkgdir}/usr/lib/nim" | |
cp -a compiler "${pkgdir}/usr/lib/nim" | |
install -Dm 644 compiler.nimble "${pkgdir}/usr/lib/nim/compiler" | |
# Fix FS#48118, related to the doc2 command | |
ln -s /usr/share/nim/doc "${pkgdir}/usr/lib/nim/doc" | |
install -Dm 644 config/* -t "${pkgdir}/etc/nim" | |
install -Dm 755 bin/* -t "${pkgdir}/usr/bin" | |
# Fix FS#50252, unusual placement of header files | |
install -d "${pkgdir}/usr/include" | |
cp -a "${pkgdir}/usr/lib/nim/"*.h "${pkgdir}/usr/include" | |
install -d "${pkgdir}/usr/share/nim/doc" | |
install -Dm 644 copying.txt -t "${pkgdir}/usr/share/licenses/${pkgname}" | |
# completions | |
for comp in tools/*.bash-completion; do | |
install -Dm 644 "${comp}" "${pkgdir}/usr/share/bash-completion/completions/$(basename "${comp/.bash-completion}")" | |
done | |
for comp in tools/*.zsh-completion; do | |
install -Dm 644 "${comp}" "${pkgdir}/usr/share/zsh/site-functions/_$(basename "${comp/.zsh-completion}")" | |
done | |
rm -r "${pkgdir}/nim" | |
rm "${pkgdir}/usr/bin/nimble" | |
} | |
# vim: ts=2 sw=2 et: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment