summaryrefslogtreecommitdiff
path: root/community/mldonkey/PKGBUILD
blob: 2b64d751583d16de8f79c7cae0537bfe03374baa (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
# $Id: PKGBUILD 106068 2014-02-21 22:30:45Z anatolik $
# Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com>

pkgname=mldonkey
pkgver=3.1.3
pkgrel=3
pkgdesc='A multi-network P2P client'
arch=(i686 x86_64)
url='http://mldonkey.sourceforge.net/'
license=(GPL)
depends=(desktop-file-utils file gd)
makedepends=(lablgtk2 librsvg ocaml)
optdepends=('librsvg: GUI support'
            'gtk2: GUI support')
backup=(etc/conf.d/mldonkey)
install=mldonkey.install
source=(http://downloads.sourceforge.net/sourceforge/mldonkey/$pkgname-$pkgver.tar.bz2
        mldonkey.conf
        mldonkey.service
        mldonkey.tmpfiles
        gd_version.patch)
sha1sums=('424386f277e84df55a2cbab213fae60787e42c8b'
          '7e70e5f3c7bf5036debde4dacbed463c0464a1e7'
          'd6886479cf36fbee0a62def0291706973c91dfa5'
          'a454b919fac518ecb32f6262afbef0dfc423401c'
          '18c4a0753d338bf24cac28dcbd43abcf59ce4534')

prepare() {
  cd mldonkey-$pkgver
  patch -p0 < "$srcdir/gd_version.patch" # a fix from upstream http://cvs.savannah.gnu.org/viewvc/mldonkey/config/configure.in?root=mldonkey&r1=1.357&r2=1.358&view=patch

  rm config/configure  # remove this file to force its regeneration, we've just changed ./config/configure.in
}

build() {
  cd mldonkey-$pkgver
  ./configure --prefix=/usr --enable-gui=newgui2
  make
}

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

  install -Dm644 icons/rsvg/type_source_normal.svg "$pkgdir"/usr/share/icons/mldonkey.svg
  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
}