summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2c3de6eff5dfc09a78d697a0db08e5236dcf85a2 (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
66
67
68
69
70
pkgname=mldonkey-ed2kad-daemon-git
pkgver=3.1.6.4.g297ee9a6
pkgrel=1
pkgdesc="A multi-network P2P client. Daemon function, only ED2K/KAD. (GIT Version)"
arch=('x86_64')
url='http://mldonkey.sourceforge.net'
license=('GPL')
depends=('bzip2'
         'miniupnpc'
         'libnatpmp'
         'file'
         )
makedepends=('camlp4'
             'ocaml-num'
             'git'
             )
conflicts=('mldonkey')
provides=('mldonkey')
source=('git+http://repo.or.cz/r/mldonkey.git'
        'mldonkey.logrotate'
        'mldonkey.service'
        'mldonkey@.service'
        'mldonkey.tmpfiles'
        'mldonkey.sysuser'
        )
sha256sums=('SKIP'
            'fe6227ec1a54278226ca6d6a5b0e1bb23224bf7b90e2ea107f014cc9518b0ed3'
            '3a25e71992aa0ab5caabed81b96ebcf313f1d93ccd7a182b1c57bf3f9571b8e8'
            'b859429d1fa10b2afdb87a08cb248b52d1f5bee375d3c83254d8f6b5a9d49d0f'
            '7a7d4d4c9eccadca24cf7970bd26847369c81a16163f8d15923011357e227990'
            'ef14b4c8dcb9e64a1026630463313139171d2682d4ad80965e4a39e5021b93a5'
            )
install=mldonkey-daemon.install

pkgver() {
  cd mldonkey
  echo "$(git describe --long --tags | tr - . | sed 's|release.||g')"
}

build() {
  cd mldonkey
  ./configure \
    --prefix=/usr \
    --enable-minimum \
    --enable-upnp-natpmp \
    --enable-bzip2 \
    --enable-magic \
    --enable-donkeysui \
    --disable-rpath \
    --enable-checks \
    --enable-pthread

  make depend
  make
  make utils
}

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

  install -Dm755 mld_hash "${pkgdir}/usr/bin/ed2k_hash"

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

  install -Dm644 "${srcdir}/mldonkey.logrotate" "${pkgdir}/etc/logrotate.d/mldonkey"
}