summaryrefslogtreecommitdiff
path: root/pcr/cppo/PKGBUILD
blob: d4a89ed27b31c26c8c8ec555d9a75409f624ed10 (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
# Maintainer (AUR): Leonard de Ruijter <dev@systeemdenker.nl>
# Contributor (AUR): Serge Zirukin <ftrvxmtrx@gmail.com>
# Contributor (AUR): Justin Davis <jrcd 83 at gmail>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

# parabola changes and rationale:
#  no changes.

pkgname=cppo
pkgver=1.6.0
pkgrel=2
pkgdesc="The C preprocessor written in OCaml"
arch=('i686' 'x86_64' 'armv7h')
license=('BSD')
depends=('glibc')
makedepends=('jbuilder' 'ocaml-findlib' 'ocamlbuild' 'clingo' 'python2')
url="https://github.com/mjambon/cppo"
source=("https://github.com/mjambon/${pkgname}/archive/v${pkgver}.tar.gz")
sha256sums=('29cb0223adc1f0c4c5238d6c7bf8931b909505aed349fde398fbf1a39eaa1819')

prepare() {
  export OPAMROOT="${srcdir}/.opam"
  opam init -n
}

build() {
  cd $srcdir/$pkgname-$pkgver
  make
}

package() {
  cd $srcdir/$pkgname-$pkgver
  export OPAMROOT="${srcdir}/.opam"
  mkdir -p "${pkgdir}/usr/bin" "$pkgdir$(ocamlfind printconf destdir)"
  export OCAMLFIND_DESTDIR="$pkgdir$(ocamlfind printconf destdir)"
  make install
  cd _build/install/default/bin
  install -m755 -t ${pkgdir}/usr/bin cppo
}