diff options
author | Andy Weidenbaum | 2016-12-03 07:46:38 -0800 |
---|---|---|
committer | Andy Weidenbaum | 2016-12-03 07:46:38 -0800 |
commit | 3cb238781638479506afccfde71d09c7c8178d97 (patch) | |
tree | 21a64549317fca693396bf73b3c32ae1f6375453 | |
parent | b539be9d255173ac59c6dac2fcab16cffbb29745 (diff) | |
download | aur-3cb238781638479506afccfde71d09c7c8178d97.tar.gz |
use multipkg for nim-git nimble-git nimsuggest-git
-rw-r--r-- | .SRCINFO | 34 | ||||
-rw-r--r-- | PKGBUILD | 151 |
2 files changed, 129 insertions, 56 deletions
@@ -1,24 +1,42 @@ # Generated by mksrcinfo v8 -# Sat Dec 3 01:50:06 UTC 2016 +# Sat Dec 3 15:45:58 UTC 2016 pkgbase = nim-git - pkgdesc = Compiled, garbage-collected systems programming language which has an excellent productivity/performance ratio pkgver = 20161201 pkgrel = 1 - url = https://github.com/nim-lang/Nim arch = i686 arch = x86_64 groups = nim - license = MIT makedepends = git makedepends = texlive-bin makedepends = texlive-core - provides = nim - conflicts = nim - options = !emptydirs - source = nim::git+https://github.com/nim-lang/Nim + source = git+https://github.com/nim-lang/Nim source = git+https://github.com/nim-lang/csources + source = git+https://github.com/nim-lang/nimble + source = git+https://github.com/nim-lang/nimsuggest + sha256sums = SKIP + sha256sums = SKIP sha256sums = SKIP sha256sums = SKIP pkgname = nim-git + pkgdesc = Compiled, garbage-collected systems programming language which has an excellent productivity/performance ratio + url = https://github.com/nim-lang/Nim + license = MIT + provides = nim + conflicts = nim + options = !emptydirs + +pkgname = nimble-git + pkgdesc = Package manager for the Nim programming language + url = https://github.com/nim-lang/nimble + license = BSD + provides = nimble + conflicts = nimble + +pkgname = nimsuggest-git + pkgdesc = Tool for providing auto completion data for Nim source code + url = https://github.com/nim-lang/nimsuggest + license = MIT + provides = nimsuggest + conflicts = nimsuggest @@ -4,93 +4,148 @@ # Contributor: Sven-Hendrik Haase <sh@lutzhaase.com> # Contributor: Jesus Alvarez <jeezusjr@gmail.com> -pkgname=nim-git +pkgbase=nim-git +pkgname=('nim-git' 'nimble-git' 'nimsuggest-git') pkgver=20161201 pkgrel=1 -pkgdesc="Compiled, garbage-collected systems programming language which has an excellent productivity/performance ratio" arch=('i686' 'x86_64') -makedepends=('git' 'texlive-bin' 'texlive-core') groups=('nim') -url="https://github.com/nim-lang/Nim" -license=('MIT') -options=('!emptydirs') -source=(${pkgname%-git}::git+https://github.com/nim-lang/Nim - git+https://github.com/nim-lang/csources) -sha256sums=('SKIP' 'SKIP') -provides=('nim') -conflicts=('nim') +makedepends=('git' 'texlive-bin' 'texlive-core') +source=(git+https://github.com/nim-lang/Nim + git+https://github.com/nim-lang/csources + git+https://github.com/nim-lang/nimble + git+https://github.com/nim-lang/nimsuggest) +sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP') pkgver() { - cd ${pkgname%-git} + cd "$srcdir/Nim" git log -1 --format="%cd" --date=short | sed "s|-||g" } prepare() { - cd ${pkgname%-git} + cd "$srcdir/Nim" - msg2 'Copying csources...' + msg2 'Cloning csources...' git clone --local "$srcdir/csources" } build() { - cd ${pkgname%-git} + cd "$srcdir/Nim" msg2 'Building csources...' pushd csources sh build.sh popd - msg2 'Building...' - ./bin/nim c koch - ./koch boot -d:release -d:useGnuReadline + msg2 'Building Nim...' + ./bin/nim c -d:release koch + ./koch boot -d:release -d:nativeStacktrace -d:useGnuReadline - msg2 'Building PDF documentation...' + msg2 'Building Nim PDF documentation...' ./koch pdf + msg2 'Building Nimble...' + ./koch nimble + + msg2 'Building nimgrep and nimsuggest...' + ./koch tools + msg2 'Building libnimrtl...' pushd lib ../bin/nim c --app:lib -d:createNimRtl -d:release nimrtl.nim popd - - msg2 'Building nimgrep...' - cd tools - ../bin/nim c -d:release nimgrep.nim } -package() { - cd ${pkgname%-git} +package_nim-git() { + pkgdesc="Compiled, garbage-collected systems programming language which has an excellent productivity/performance ratio" + url="https://github.com/nim-lang/Nim" + license=('MIT') + options=('!emptydirs') + provides=('nim') + conflicts=('nim') - msg2 'Installing...' + cd "$srcdir/Nim" + + msg2 'Installing Nim license...' + install -Dm 644 "copying.txt" -t "$pkgdir/usr/share/licenses/nim" + + msg2 'Installing Nim documentation...' + install -dm 755 "$pkgdir/usr/share/doc/nim" + cp -dpr --no-preserve=ownership examples web doc/* "$pkgdir/usr/share/doc/nim" + + msg2 'Installing Nim...' ./koch install "$pkgdir" + install -Dm 755 bin/{nim,nimgrep} -t "$pkgdir/usr/bin" - install -dm 755 \ - "$pkgdir/etc" \ - "$pkgdir/usr/bin" \ - "$pkgdir/usr/lib/nim" \ - "$pkgdir/usr/share/doc/nim" cd "$pkgdir/nim" - mv lib/* "$pkgdir/usr/lib/nim/" - mv config/* "$pkgdir/etc/" - cp -dpr --no-preserve=ownership "$srcdir/${pkgname%-git}/lib/packages" \ - "$pkgdir/usr/lib/nim/" - mv bin/* "$pkgdir/usr/bin/" + install -dm 755 "$pkgdir/etc" "$pkgdir/usr/lib/nim" + find lib -mindepth 1 -maxdepth 1 -exec \ + cp -dpr --no-preserve=ownership '{}' "$pkgdir/usr/lib/nim" \; + find config -mindepth 1 -maxdepth 1 -exec \ + cp -dpr --no-preserve=ownership '{}' "$pkgdir/etc/" \; + cp -dpr --no-preserve=ownership "$srcdir/Nim/lib/packages" \ + "$pkgdir/usr/lib/nim" + + # https://bugs.archlinux.org/task/50252 + msg2 'Fixing unusual placement of header files...' + install -dm 755 "$pkgdir/usr/include" + for _header in cycle nimbase; do + ln -s "/usr/lib/nim/${_header}.h" "$pkgdir/usr/include/${_header}.h" + done + + msg2 'Fixing unusual placement of shared object files...' + ln -s "/usr/lib/nim/libnimrtl.so" "$pkgdir/usr/lib/libnimrtl.so" + + msg2 'Cleaning up pkgdir...' + rm -rf "$pkgdir/nim" +} - cd "$srcdir/${pkgname%-git}" +package_nimble-git() { + pkgdesc="Package manager for the Nim programming language" + url="https://github.com/nim-lang/nimble" + license=('BSD') + provides=('nimble') + conflicts=('nimble') - msg2 'Installing license...' - install -Dm 644 copying.txt -t "$pkgdir/usr/share/licenses/nim" + cd "$srcdir/nimble" - msg2 'Installing documentation...' - rm -rf "$pkgdir/nim" - mv examples web "$pkgdir/usr/share/doc/nim" - mv doc/* "$pkgdir/usr/share/doc/nim" + msg2 'Installing Nimble license...' + install -Dm 644 "$srcdir/nimble/license.txt" \ + -t "$pkgdir/usr/share/licenses/nimble" + + msg2 'Installing Nimble documentation...' + install -Dm 644 changelog.markdown readme.markdown todo.markdown \ + -t "$pkgdir/usr/share/doc/nimble" - msg2 'Installing libnimrtl...' - install -Dm 644 lib/libnimrtl.so -t "$pkgdir/usr/lib" + msg2 'Installing Nimble...' + install -Dm 755 "$srcdir/Nim/bin/nimble" -t "$pkgdir/usr/bin" - msg2 'Installing nimgrep...' - install -Dm 755 tools/nimgrep -t "$pkgdir/usr/bin" + # Nimble looks for nimscriptapi.nim in /usr/bin/nimblepkg/, of all places. + install -dm 755 "$pkgdir/usr/share/nimble" + cp -dpr --no-preserve=ownership src/nimblepkg "$pkgdir/usr/share/nimble" + ln -s "/usr/share/nimble" "$pkgdir/usr/bin/nimblepkg" + + msg2 'Installing Nimble bash completion...' + install -Dm 644 nimble.bash-completion \ + "$pkgdir/usr/share/bash-completion/completions/nimble" } -# vim:set ts=2 sw=2 et: +package_nimsuggest-git() { + pkgdesc="Tool for providing auto completion data for Nim source code" + url="https://github.com/nim-lang/nimsuggest" + license=('MIT') + provides=('nimsuggest') + conflicts=('nimsuggest') + + cd "$srcdir/nimsuggest" + + msg2 'Installing Nimsuggest license...' + install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/nimsuggest" + + msg2 'Installing Nimsuggest documentation...' + install -Dm 644 README.md -t "$pkgdir/usr/share/doc/nimsuggest" + + msg2 'Installing Nimsuggest...' + install -Dm 755 "$srcdir/Nim/bin/nimsuggest" -t "$pkgdir/usr/bin" +} |