diff options
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 55 |
2 files changed, 41 insertions, 35 deletions
@@ -1,22 +1,19 @@ -# Generated by mksrcinfo v8 -# Mon Aug 28 22:19:50 UTC 2017 pkgbase = c0 - pkgdesc = C0 Package for 15-122 - pkgver = 0.590 + pkgdesc = A small safe subset of the C programming language, augmented with contracts + pkgver = 553 pkgrel = 1 - url = http://c0.typesafety.net/index.html + epoch = 1 + url = http://c0.cs.cmu.edu arch = x86_64 arch = i686 - license = GPL - depends = libpng12>=1.2 + license = GPL3 + makedepends = mlton + depends = libpng>=1.2 depends = zlib>=1.2 - depends = make>=4.0 depends = gcc>=5.1 depends = ncurses5-compat-libs>=6.0 - provides = coin provides = cc0 - source = c0::http://c0.typesafety.net/dist/cc0-v0590-linux4.4.0-bin.tgz - md5sums = 62e51ffbb7f6b03c7e863757c9705922 + source = c0::git+https://bitbucket.org/c0-lang/c0.git#commit=0547f597f1b2a4603988920d010f66f091ea157d + md5sums = SKIP pkgname = c0 - @@ -1,31 +1,40 @@ -# Maintainer: Derek Brown <derekbro@andrew.cmu.edu> +# Maintainer: Cooper Pierce <cppierce@andrew.cmu.edu> pkgname=c0 -pkgver=0.590 +_reponame="${pkgname}" +pkgver=553 pkgrel=1 -pkgdesc="C0 Package for 15-122" -url="http://c0.typesafety.net/index.html" +epoch=1 +pkgdesc="A small safe subset of the C programming language, augmented with contracts" +url="http://c0.cs.cmu.edu" arch=('x86_64' 'i686') -license=('GPL') -depends=('libpng12>=1.2' 'zlib>=1.2' 'make>=4.0' 'gcc>=5.1' 'ncurses5-compat-libs>=6.0') -provides=('coin' 'cc0') -source=("$pkgname::http://c0.typesafety.net/dist/cc0-v0590-linux4.4.0-bin.tgz") -md5sums=('62e51ffbb7f6b03c7e863757c9705922') +license=('GPL3') +depends=('libpng>=1.2' 'zlib>=1.2' 'gcc>=5.1' 'ncurses5-compat-libs>=6.0') +makedepends=('mlton' 'git') +provides=('cc0') +source=("$pkgname::git+https://bitbucket.org/c0-lang/c0.git#commit=0547f597f1b2a4603988920d010f66f091ea157d") +md5sums=('SKIP') -package() { - - # Create Installation Folder Structure - mkdir -p $pkgdir/usr/lib/c0 - cp -r $srcdir/cc0/* $pkgdir/usr/lib/c0 +build() { + cd "${_reponame}/cc0" + ./configure + # Use 2 cores to avoid OOM issues + make -j2 +} - mkdir -p $pkgdir/usr/bin +check() { + cd "${_reponame}/cc0" + make check +} - # Install C0 Bin - chmod +x $pkgdir/usr/lib/c0/bin/cc0.bin - echo -e '#!/bin/sh\n/usr/lib/c0/bin/cc0.bin $@' >> $pkgdir/usr/bin/cc0 - chmod +x $pkgdir/usr/bin/cc0 +package() { + cd "${_reponame}/cc0" + make install PREFIX="${pkgdir}/usr/share/c0" + bins=('coin' 'cc0' 'codex' 'wrappergen') + mkdir -p "${pkgdir}/usr/bin" + for bin in "${bins[@]}"; do + echo -e "#!/bin/sh\n\n/usr/share/c0/bin/${bin}.bin \$@" > "${pkgdir}/usr/bin/${bin}" + chmod 755 "${pkgdir}/usr/bin/${bin}" + done - # Install Coin Bin - chmod +x $pkgdir/usr/lib/c0/bin/coin.bin - echo -e '#!/bin/sh\n/usr/lib/c0/bin/coin.bin $@' >> $pkgdir/usr/bin/coin - chmod +x $pkgdir/usr/bin/coin + # License missing until upstream adds it to repo. } |