updated on Sun Jan 15 08:01:04 UTC 2012
[aur-mirror.git] / unison-232 / PKGBUILD
blob1f97494c46d4c76abf39cc9b7648028109f2628d
1 # Maintainer: flan_suse < windows2linux AT zoho DOT com >
3 # This package does not compile the GTK1 version.
4 # It only compiles and builds the CLI and GTK2 versions.
5 # This means: 
6 #        * fewer makedeps to pull in
7 #        * shorter compile time
8 #        * smaller package size
10 # Ignore the warning of:
11 # WARNING: Package contains reference to $srcdir
12 # This also happens with unison in the [extra] repo.
13 # Compiling it includes the $srcdir path in the binary.
15 pkgname=unison-232
16 _pkgname=unison
17 pkgver=2.32.52
18 _pkgver=232
19 pkgrel=7
20 pkgdesc="File-synchronization tool (legacy 2.32 version)"
21 arch=('i686' 'x86_64')
22 license=('GPL2')
23 url="http://www.cis.upenn.edu/~bcpierce/unison"
24 provides=('unison')
25 optdepends=('gtk2: for the GTK2 frontend')
26 makedepends=('ocaml' 'lablgtk2' 'imagemagick')
27 source=("http://www.cis.upenn.edu/~bcpierce/$_pkgname/download/releases/$_pkgname-$pkgver/$_pkgname-$pkgver.tar.gz"
28         "$_pkgname-ssh-ocaml.patch"
29         "$_pkgname-$_pkgver.desktop")
30 md5sums=('0701f095c1721776a0454b94607eda48'
31          '81a28349471434c75a4206d07ad21eb1'
32          '2ab7bb57623e786936d892ddc228c2f8')
33 options=(!makeflags)
35 build() {
36   # Move into the source directory
37   cd $srcdir/$_pkgname-$pkgver
38   CFLAGS=""
41   # Apply SSH Ocaml patch
42   patch -Np1 -i "../$_pkgname-ssh-ocaml.patch"
44   # Compile Unison 2.32 command-line version
45   make clean
46   make mkProjectInfo
47   make UISTYLE=text DEBUGGING=false THREADS=true
48   mv "$_pkgname" "$_pkgname-cli"
50   # Compile Unison 2.32 GTK2 graphical version
51   make clean
52   make mkProjectInfo
53   make UISTYLE=gtk2 DEBUGGING=false THREADS=true
54   mv "$_pkgname" "$_pkgname-gtk2"
56   # Create a .png icon to be used in the menu
57   convert "win32rc/U.ico" "$_pkgname-$_pkgver.png"
61 package() {
63   # Move into the source directory
64   cd $srcdir/$_pkgname-$pkgver
66   # Install the compiled binary files
67   install -Dm755 "$_pkgname-cli" "$pkgdir/usr/bin/$_pkgname-$_pkgver"
68   install -Dm755 "$_pkgname-gtk2" "$pkgdir/usr/bin/$_pkgname-$_pkgver-gtk2"
70   # Install the icon to be used with the menu
71   install -Dm644 "$_pkgname-$_pkgver-3.png" "$pkgdir/usr/share/pixmaps/$_pkgname-$_pkgver.png"
73   # Install the .desktop menu file, which can launch the GTK2 version
74   install -Dm644 "../$_pkgname-$_pkgver.desktop" "$pkgdir/usr/share/applications/$_pkgname-$_pkgver.desktop"
75   
76   # Make a symbolic link named "unison-232-x11" that points to "unison-232-gtk2"; not required, but good for scripting / compatibility reasons
77   cd "$pkgdir/usr/bin/"
78   ln -s "$_pkgname-$_pkgver-gtk2" "$_pkgname-$_pkgver-x11"