summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 270942e25d103e449eac86a84cb8f757d13136aa (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
# Maintainer: Jakob Gahde <j5lx@fmail.co.uk>
# Contributor: Thorsten WiƟmann <edu@thorsten-wissmann.de>
# Contributor: Serge Zirukin <ftrvxmtrx@gmail.com>
# Contributor: Sergei Lebedev <superbobry@gmail.com>
# Contributor: Magnus Therning <magnus@therning.org>
# Contributor: Thomas Pani <thomas.pani@gmail.com>

_pkgname=ocaml-fileutils
pkgname=${_pkgname}-yypkg
_pkgver=0.4.5
_oldver=0.4.4
_yypkgver=1.9.0
pkgver=${_pkgver}yypkg${_yypkgver}
pkgrel=1
pkgdesc="A library to provide pure OCaml functions to manipulate real file and filename (with yypkg patches)"
arch=('i686' 'x86_64')
url="http://forge.ocamlcore.org/projects/ocaml-fileutils"
license=('LGPL')
depends=('ocaml')
makedepends=('ocaml-findlib' 'ocaml-ounit')
provides=("${_pkgname}=${_pkgver}")
conflicts=("${_pkgname}")
source=("http://forge.ocamlcore.org/frs/download.php/892/ocaml-fileutils-0.4.5.tar.gz"
        "http://win-builds.org/yypkg/yypkg-${_yypkgver}.tar.xz")
md5sums=('1f43b9333358f47660318bfbe9ae68bf'
         'f1613c5ef9ccffc26370f743cbb8cae7')

prepare() {
  cd "${srcdir}/${_pkgname}-${_oldver}"

  patch -Np1 < "${srcdir}/yypkg-${_yypkgver}/fileutils-symlink-patches/0001-FileUtil-replace-stat.is_link-boolean-with-a-Link-va.patch"
  patch -Np1 < "${srcdir}/yypkg-${_yypkgver}/fileutils-symlink-patches/0002-FileUtil-symlinks-patch-2.patch"
}

build() {
  cd "${srcdir}/${_pkgname}-${_oldver}"

  ./configure --disable-debug --prefix /usr --destdir "${pkgdir}"
  make all
}

package() {
  cd "${srcdir}/${_pkgname}-${_oldver}"

  export OCAMLFIND_DESTDIR="${pkgdir}/$(ocamlfind printconf destdir)"
  install -dm755 "${OCAMLFIND_DESTDIR}"
  make install
  install -Dm644 COPYING.txt "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}