diff options
author | Cooper Pierce | 2021-07-10 19:10:46 -0400 |
---|---|---|
committer | Cooper Pierce | 2021-07-10 19:28:51 -0400 |
commit | 65c29b844f456c486c1832dd091d1fbc2babfe8a (patch) | |
tree | 678e6efa4f4b3f10d1de9228a6a607a629622710 /PKGBUILD | |
download | aur-c0-bin.tar.gz |
Release for r771
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..13ec2f163c92 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,35 @@ +# Maintainer: Cooper Pierce <cppierce@andrew.cmu.edu> +# Contributor: Derek Brown <derekbro@andrew.cmu.edu> +pkgname=c0-bin +pkgver=0.771 +pkgrel=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=('MIT') +depends=('libpng>=1.2' 'zlib>=1.2' 'gcc>=5.1' 'ncurses5-compat-libs>=6.0') +conflicts=('c0' 'c0-git') +provides=('cc0') +source=("$pkgname::https://c0.cs.cmu.edu/downloads/aux/cc0-r771.tgz" "fno-common.patch") +md5sums=('e03e3c90b07603d899acedfc445faaf4' + '41a1d89191c6420779cf05a1f55339ab') + +prepare() { + cd "cc0.r771" + patch --forward --strip=1 --input="${srcdir}/fno-common.patch" +} + +package() { + # Create Installation Folder Structure + mkdir -p ${pkgdir}/usr/lib/c0 + cp -r ${srcdir}/cc0.r771/* ${pkgdir}/usr/lib/c0 + + mkdir -p ${pkgdir}/usr/bin + + bins=('cc0' 'coin' 'codex' 'wrappergen') + for bin in "${bins[@]}"; do + chmod +x ${pkgdir}/usr/lib/c0/bin/${bin}.bin + echo -e "#!/bin/sh\n/usr/lib/c0/bin/${bin}.bin \$@" >> ${pkgdir}/usr/bin/${bin} + chmod +x ${pkgdir}/usr/bin/${bin} + done +} |