aboutsummaryrefslogtreecommitdiffstats
path: root/community/unison/APKBUILD
blob: f3fce2d1fcb02825b40bb4156122549257b5a523 (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
54
55
56
57
58
59
60
61
62
63
64
65
# Contributor: Jean-Louis Fuchs <ganwell@fangorn.ch>
# Maintainer: Jean-Louis Fuchs <ganwell@fangorn.ch>
pkgname=unison
pkgver=2.48.4
pkgrel=4
pkgdesc="Unison - efficient file-synchronization tool"
url="https://www.cis.upenn.edu/~bcpierce/unison/"
# ocaml is not built for x86, armhf, s390x
# lablgtk is not built for aarch64
arch="all !x86 !armhf !aarch64 !s390x"
license="GPL-3.0+"
makedepends="ocaml lablgtk-dev linux-headers emacs-nox bash"
subpackages="$pkgname-doc $pkgname-gui"
source="http://www.seas.upenn.edu/~bcpierce/unison/download/releases/stable/unison-$pkgver.tar.gz
	http://www.seas.upenn.edu/~bcpierce/unison/download/releases/stable/unison-$pkgver-manual.html
	fix_inotify_check.patch
	marshalling.patch"
# TODO: Enable check once this issue is fixed:
# https://github.com/bcpierce00/unison/issues/73
options="!check"
builddir="$srcdir/src"

build() {
	cd "$builddir"
	# ocamlopt is a front-end for gcc which will create optimized ocaml
	# binaries. It will call gcc, but it hasn't implemented all gcc options.
	# -ccopt is the way to pass arbitrary options.
	local _cflags=""
	for i in $CFLAGS; do _cflags="$_cflags -ccopt $i"; done
	export CFLAGS="$_cflags"
	for ui in text gtk2; do
		make -j1 clean
		make -j1 mkProjectInfo
		make -j1 UISTYLE="$ui" DEBUGGING=false THREADS=true
		mv unison unison-"$ui"
	done
}

package() {
	cd "$builddir"
	install -d "$pkgdir"/usr/bin
	install -m755 unison-text unison-fsmonitor "$pkgdir"/usr/bin
	cd "$pkgdir"/usr/bin
	ln -s unison-text unison
	ln -s unison "unison-${pkgver%.*}"

	cd "$srcdir"
	install -d "$pkgdir"/usr/share/doc/"$pkgname"
	install -m644 unison-"$pkgver"-manual.html "$pkgdir"/usr/share/doc/"$pkgname"
}

gui() {
	description="Unison - efficient file-synchronization tool (GTK+2 GUI)"
	depends="$pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel gtk+2.0"

	cd "$builddir"
	install -d "$subpkgdir"/usr/bin
	install -m755 unison-gtk2 "$subpkgdir"/usr/bin
}

sha512sums="c8e7bd2b14edae31e7d08154cdc2dce8173546b6163b9e5f4f2b1c8255792a7645d8449da88d7acfcbf498746481d24d0a3936978969920530a15a16bcbc6024  unison-2.48.4.tar.gz
b995712cda51d612bd81c89589d872099b3b9c90f7413268b24ab399a1eff7690200980514a834ee3d12bd3c89ef61bb8a29b3970c01433e0c4671d363a96b68  unison-2.48.4-manual.html
27eaf4f347dc827dc14b338ef2be40d25507c6c9d65ecdc8f811ebe994f6e23577ad85fcc86b63d148b57844b24e6034061c869b641fbd3173532a26e0828803  fix_inotify_check.patch
3ca783527ee4b5eacd060086a72987e479b2f04d795d6689c8357eb33635e91021b6cd8b926cb583a4ca3dd18373c8ce5b50ba44dd5fa18b2e2e78922cea3c9f  marshalling.patch"