Last active
December 21, 2016 00:03
-
-
Save jonathonf/01f36615c2494b17c67b5380d3ec014e to your computer and use it in GitHub Desktop.
Tweaked PKGBUILD for nim 0.15.2
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
# $Id: PKGBUILD 121061 2014-10-20 12:57:19Z arodseth $ | |
# Maintainer: Alexander F Rødseth | |
# Contributor: Dominik Picheta | |
# Contributor: Sven-Hendrik Haase | |
# Contributor: Jesus Alvarez | |
pkgname=nim | |
_pkgname=Nim | |
pkgver=0.15.2 | |
pkgrel=0 | |
pkgdesc='Imperative, multi-paradigm, compiled programming language' | |
arch=('x86_64' 'i686') | |
url='http://nim-lang.org/' | |
license=('MIT') | |
makedepends=('git' 'glib2') | |
options=('!emptydirs') | |
source=("$pkgname-$pkgver.tar.gz::https://github.com/nim-lang/Nim/archive/v$pkgver.tar.gz" | |
"csources-0.15.2.tar.gz::https://github.com/nim-lang/csources/archive/v0.15.2.tar.gz") | |
sha256sums=('6c1c4169a2f3c346712f2a77597612b0fc03a31e681ac8e59b5c59b68ee1be4e' | |
'7ca18e11954caa49619f925fac1415c6a0844920e303db7dcf589952bb4f050d') | |
prepare() { | |
rm -fr "$_pkgname-$pkgver/build" | |
mv csources-0.15.2 "$_pkgname-$pkgver/build" | |
find . -type f -name "empty.txt" -exec rm {} + | |
} | |
build() { | |
cd "$_pkgname-$pkgver/build" | |
sh build.sh | |
cd .. | |
./bin/nim c koch | |
./koch boot -d:release -d:useGnuReadline | |
export PATH="$srcdir/$_pkgname-$pkgver/bin:$PATH" | |
cd lib | |
nim c --app:lib -d:createNimRtl -d:release nimrtl.nim | |
cd ../tools | |
nim c -d:release nimgrep.nim | |
} | |
package() { | |
cd "$_pkgname-$pkgver" | |
export PATH="$srcdir/$_pkgname-$pkgver/bin:$PATH" | |
install -d \ | |
"$pkgdir/usr/share/nim/doc" "$pkgdir/usr/lib/nim" \ | |
"$pkgdir/etc" "$pkgdir/usr/bin" "$pkgdir/usr/include" | |
mv lib/* "$pkgdir/usr/lib/nim/" | |
mv config/* "$pkgdir/etc/" | |
# Fix FS50252, unusual placement of header files | |
mv "$pkgdir/usr/lib/nim/"*.h "$pkgdir/usr/include/" | |
cd "$srcdir/$_pkgname-$pkgver" | |
mv examples web doc/* "$pkgdir/usr/share/nim/doc/" | |
install -m755 bin/nim "$pkgdir/usr/bin/" | |
install -m755 tools/nimgrep "$pkgdir/usr/bin/" | |
install -Dm644 copying.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE" | |
# Fix FS#48118, related to the doc2 command | |
ln -s /usr/share/nim/doc "$pkgdir/usr/lib/nim/doc" | |
} | |
# vim:set ts=2 sw=2 et: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment