summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1f62be5f513dc40e4f84d5c2cb8c9d09610d75b9 (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
# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix
# Contributor: Anatol Pomozov <anatol.pomozov@gmail.com>

pkgname=mldonkey-git
pkgver=3.2.1.r10.gcb0da53f
pkgrel=2
pkgdesc='A multi-network P2P client'
arch=(x86_64)
url='http://mldonkey.sourceforge.net/'
license=(GPL2)
depends=(file gd hicolor-icon-theme libnatpmp libminiupnpc.so)
makedepends=(git gtk2 librsvg ocaml4 ocaml4-camlp4 ocaml4-lablgtk2 ocaml4-num miniupnpc)
optdepends=('librsvg: GUI support'
            'gtk2: GUI support')
backup=(etc/conf.d/mldonkey)
provides=(mldonkey)
conflicts=(mldonkey)
source=("git+https://github.com/ygrek/mldonkey.git"
        mldonkey.conf
        mldonkey.service
        mldonkey.tmpfiles
        mldonkey.sysusers)
sha256sums=('SKIP'
            'f1d9401cefd591662d49011c53fdb2788755a6f745a963e46d8037b990edeb6a'
            '778cebe8edcffd63db3594054c2daa62ce571644a96ad235b8c95470b55c0415'
            '9c78fbfbba4f8286e2c2299e4da6f76d0f34f33fde26964922707c34fb75157b'
            '24d7ef8f6af93a8d87a82842b0ed796e35ce2f88d81734d9275eede8f4e10fba')

pkgver() {
  cd "mldonkey"
  git describe --long --tags | sed 's/^release.//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "mldonkey"
  ./configure \
    --prefix=/usr \
    --enable-gui=newgui2 \
    --enable-upnp-natpmp \
    --disable-fasttrack \
    --disable-gnutella \
    --disable-gnutella2

#    --enable-batch \

  make
  make utils
}

package() {
  cd "mldonkey"
  make DESTDIR="$pkgdir" install

  install -Dm644 packages/rpm/mldonkey-icon-16.png "$pkgdir"/usr/share/icons/hicolor/16x16/apps/mldonkey.png
  install -Dm644 packages/rpm/mldonkey-icon-32.png "$pkgdir"/usr/share/icons/hicolor/32x32/apps/mldonkey.png
  install -Dm644 packages/rpm/mldonkey-icon-48.png "$pkgdir"/usr/share/icons/hicolor/48x48/apps/mldonkey.png
  install -Dm644 distrib/mldonkey.desktop "$pkgdir"/usr/share/applications/mldonkey.desktop

  install -Dm644 "$srcdir"/mldonkey.conf "$pkgdir"/etc/conf.d/mldonkey
  install -Dm644 "$srcdir"/mldonkey.service "$pkgdir"/usr/lib/systemd/system/mldonkey.service
  install -Dm644 "$srcdir"/mldonkey.tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/mldonkey.conf
  install -Dm644 "$srcdir"/mldonkey.sysusers "$pkgdir"/usr/lib/sysusers.d/mldonkey.conf
}