summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 860c7d2d42a062c6eef776d2329776bf9eeb2378 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Maintainer: Eduardo Jose Gomez Hernandez <eduardo@edujgh.net>
# Contributor: Jonatan R. Fischer <jonafischer at gmail dot com>
pkgname=c3c-bin
_pkgname=c3c
pkgver=0.7.3
pkgrel=1
pkgdesc="C3 is an evolution of C enabling the same paradigms and retaining the same syntax as far as possible. Stable Release"
arch=(x86_64)
url="https://github.com/c3lang/c3c.git"
license=('LGPL3' 'MIT')
depends=()
makedepends=('binutils')
provides=('c3c')
conflicts=('c3c' 'c3c-git')
source=("https://github.com/c3lang/c3c/releases/download/v$pkgver/c3-linux.tar.gz")

md5sums=('777192082a26066b56617cea4ef4784b')

prepare() {

  echo ""
  echo "              WARNING: Due to a current incompatibility with ArchLinux"
  echo "       a Symbolic link to libxml2 will be installed at /usr/lib/libxml2.so.2"
  echo "                       PLEASE CHECK THERE IS NO CONFLICT!!!!!"
  echo ""

}

pkgver() {
  cd "${srcdir}/c3"

  # libxml2 compatibility...
  rm libxml2.so.2 || true
  ln -s /usr/lib/libxml2.so libxml2.so.2

  ./c3c -V | grep "C3 Compiler Version" | tr -s " " | cut -f 2 -d ':' | cut -f 2 -d " "
}

package() {
  cd "${srcdir}/c3/"

  install -d "${pkgdir}/usr/bin"
  install -d "${pkgdir}/usr/lib/${_pkgname}"

  # libxml2 compatibility
  cp "${srcdir}/c3/libxml2.so.2" "${pkgdir}/usr/lib/libxml2.so.2"

  cp "${srcdir}/c3/c3c" "${pkgdir}/usr/lib/${_pkgname}/c3c"
  cp -r "${srcdir}/c3/lib" "${pkgdir}/usr/lib/${_pkgname}/lib"
  ln -s "/usr/lib/${_pkgname}/c3c" "${pkgdir}/usr/bin/c3c"
}