OCaml 4.14.0 rebuild
[arch-packages.git] / unison / trunk / PKGBUILD
blobebb2e97101f64088ed0b4279e2962589f95b0f28
1 #Maintainer: Gaetan Bisson <bisson@archlinux.org>
2 #Contributor: Tobias Powalowski <tpowa@archlinux.org>
4 pkgname=unison
5 pkgver=2.52.1
6 pkgrel=1
7 pkgdesc='File-synchronization tool'
8 #url='https://github.com/bcpierce00/unison/'
9 url='https://www.cis.upenn.edu/~bcpierce/unison/'
10 arch=('x86_64')
11 license=('GPL2')
12 optdepends=('gtk2: graphical interface')
13 makedepends=('ocaml>=4.11.0' 'emacs' 'lablgtk2')
14 source=("https://github.com/bcpierce00/unison/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
15         'large.patch'
16         'desktop')
17 sha512sums=('6b1b44ffb9c1f6373e7250b28c08c26dfc4281ff750f64155872317e1b98fce40fb3adf16ad89ebe0d033c93254c048c8b7d641163219642bfea9b4bb37c9e0a'
18             'e2f7a5e6e832ee9c694f36e399178652456d2047b22cba86603982cd6f6caf54e520fc87a8bde1940b2da46102cf3aa89f3e062c965efc77cd840b47e01b4d2f'
19             '74526b1f583f49b3e1c68b72c9ab3d5875796b8b371c1388cf3b5b25aef8a0304023e9bb960b2ff9aec2eb989f712e99b2c049b8075529074f62ef9ffd6c1cdd')
20 options=('!makeflags')
22 prepare() {
23         cd "${srcdir}/${pkgname}-${pkgver}"
24         sed 's/region_of_string/region_of_bytes/' -i src/uigtk2.ml
25         patch -p0 -i ../large.patch
28 build() {
29         cd "${srcdir}/${pkgname}-${pkgver}"
30         for ui in gtk2 text; do
31                 cp -a . build || true
32                 pushd build
33                 export CFLAGS=
34                 make all UISTYLE=$ui DEBUGGING=false THREADS=true
35                 mv src/unison src/unison-$ui
36                 mv src/unison-* ..
37                 popd
38                 rm -fr build
39         done
42 package() {
43         cd "${srcdir}/${pkgname}-${pkgver}"
44         install -d "${pkgdir}"/usr/bin
45         install -m755 unison-* "${pkgdir}"/usr/bin
46         ln -s unison-text "${pkgdir}"/usr/bin/unison
48         install -Dm644 ../desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop"
49         install -Dm644 icons/U.svg "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname}.svg"
50         for i in 16 24 32 48 256; do
51                 install -Dm644 icons/U.${i}x${i}x16m.png "${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/${pkgname}.png"
52         done