summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoraksr2015-07-16 13:34:59 +0200
committeraksr2015-07-16 13:34:59 +0200
commit3151731209cb8307aa2fc1a4aba1b11f48249cd1 (patch)
tree5b79c64a7202e8c57515d8e45db5b0650b0d720e
downloadaur-3151731209cb8307aa2fc1a4aba1b11f48249cd1.tar.gz
Start.
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD44
-rw-r--r--lcc-compiler.install9
3 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..663b5372d56
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = lcc-compiler
+ pkgdesc = A small and fast C compiler.
+ pkgver = 4.2
+ pkgrel = 1
+ url = http://www.cs.princeton.edu/software/lcc/
+ install = lcc-compiler.install
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = gcc
+ source = ftp://ftp.cs.princeton.edu/pub/packages/lcc/lcc-4.2.tar.gz
+ md5sums = 2c4826936b4486f3b0445a2ddb6cd642
+ sha1sums = 40353f5dc66ac62cc27abe1e7ef09ad31be9168d
+ sha256sums = 05d3e2b2824b30e9860621de1568a0a0f2028182955c5fedd68474a7bcab5d00
+
+pkgname = lcc-compiler
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..988c19acbc2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Contributor: Zhang Li <richselian at gmail.com>
+# Maintainer : aksr <aksr at t-com dot me>
+_pkgname=lcc
+pkgname=${_pkgname}-compiler
+pkgver=4.2
+pkgrel=1
+pkgdesc="A small and fast C compiler."
+arch=('i686' 'x86_64')
+url=('http://www.cs.princeton.edu/software/lcc/')
+license=('custom')
+makedepends=('gcc')
+source=("ftp://ftp.cs.princeton.edu/pub/packages/${_pkgname}/${_pkgname}-$pkgver.tar.gz")
+install=${pkgname}.install
+md5sums=('2c4826936b4486f3b0445a2ddb6cd642')
+sha1sums=('40353f5dc66ac62cc27abe1e7ef09ad31be9168d')
+sha256sums=('05d3e2b2824b30e9860621de1568a0a0f2028182955c5fedd68474a7bcab5d00')
+
+build() {
+ cd $srcdir/${_pkgname}-$pkgver
+ mkdir -p ${_pkgname}
+ BUILDDIR=lcc make -j2 CFLAGS="-O2 -DLCCDIR='\"/usr/lib/lcc/\"'" HOSTFILE=./etc/linux.c lcc
+ BUILDDIR=lcc make -j2 CFLAGS="-O2 -DLCCDIR='\"/usr/lib/lcc/\"'" all
+}
+
+package() {
+ cd $srcdir/${_pkgname}-$pkgver/${_pkgname}
+ mkdir -p $pkgdir/usr/{bin,lib/${_pkgname}/include,man/man1}
+ install -Dm755 bprint $pkgdir/usr/bin/bprint
+ install -Dm755 lburg $pkgdir/usr/bin/lburg
+ install -Dm755 lcc $pkgdir/usr/bin/lcc
+
+ ## rcc renamed to lcc-rcc to avoid a conflict with qtchooser
+ install -Dm755 rcc $pkgdir/usr/bin/${_pkgname}-rcc
+
+ install -Dm755 cpp $pkgdir/usr/lib/${_pkgname}/gcc/cpp
+ mv liblcc.a librcc.a $pkgdir/usr/lib/${_pkgname}/
+ install -Dm644 ../CPYRIGHT $pkgdir/usr/share/licenses/${_pkgname}/COPYRIGHT
+ ln -s /usr/lib/gcc/*-linux-gnu/*/include/* $pkgdir/usr/lib/${_pkgname}/include/
+ ln -s /usr/lib/gcc/*-linux-gnu/*/crt* $pkgdir/usr/lib/${_pkgname}/
+ cp -f ../include/x86/linux/* $pkgdir/usr/lib/${_pkgname}/include/
+ install -Dm644 ../doc/bprint.1 $pkgdir/usr/man/man1/bprint.1
+ install -Dm644 ../doc/lcc.1 $pkgdir/usr/man/man1/lcc.1
+}
+
diff --git a/lcc-compiler.install b/lcc-compiler.install
new file mode 100644
index 00000000000..09742cc11a7
--- /dev/null
+++ b/lcc-compiler.install
@@ -0,0 +1,9 @@
+post_install() {
+ echo "==> Warning: Package should be rebuilt after gcc is upgraded."
+ echo "==> Warning: rcc renamed to lcc-rcc to avoid a conflict with qtchooser."
+}
+
+post_upgrade() {
+ post_install
+}
+