summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6cd0cc2e68a8842b2ed60b2c22896cb666b75155 (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
52
53
# Maintainer: Christopher Price <pricechrispy at gmail dot com>
# Contributor: Simon Legner <Simon.Legner@gmail.com>
# Contributor: Jakob Nixdorf <flocke@shadowice.org>
# Contributor: Bertram Felgenhauer <int-e@gmx.de>
# Contributor: Simon Legner <Simon.Legner@gmail.com>
pkgname=camlidl
pkgver=1.12
_pkgver=${pkgver/\./}
pkgrel=2
pkgdesc="A stub code generator and COM binding for Objective Caml (OCaml)"
arch=('x86_64')
url="https://github.com/xavierleroy/camlidl"
license=(LGPL2.1)
depends=('ocaml')
makedepends=()
options=(staticlibs)
source=("https://github.com/xavierleroy/$pkgname/archive/$pkgname$_pkgver.tar.gz"
        META.camlidl
        patch.diff)
sha256sums=('d6ab22a363f22798d303df3b0e54ba274f2c3d7ab7a3023fee1c73d8a21970aa'
            'SKIP'
            'SKIP')

build() {
  #ls -alh
  cp patch.diff "$srcdir/$pkgname-$pkgname$_pkgver"

  cd "$srcdir/$pkgname-$pkgname$_pkgver"
  cp config/Makefile.unix config/Makefile

  #ls -alh
  #git apply -v patch.diff
  patch -p1 < patch.diff

  #ls -alh /usr/lib/ocaml/Makefile.config
  #mkdir -p /build/camlidl/pkg/camlidl//usr/lib/ocaml/
  #ln -s /usr/lib/ocaml/Makefile.config /build/camlidl/pkg/camlidl//usr/lib/ocaml/Makefile.config
  #ls -alh /build/camlidl/pkg/camlidl//usr/lib/ocaml/Makefile.config

  make all
}

package() {
  cd "$srcdir/$pkgname-$pkgname$_pkgver"

  local _bindir="$pkgdir/usr/bin"
  local _ocamldir="$pkgdir/$(ocamlc -where)"
  mkdir -p "$_bindir" "$_ocamldir"/{caml,stublibs,"$pkgname"}

  make BINDIR="$_bindir" OCAMLLIB="$_ocamldir" install

  install -Dm644 "$srcdir/META.camlidl" "$_ocamldir/$pkgname/META"
}