summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a3a68410975c89d6d6bf36f9ebc016719f62dba2 (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
71
72
73
74
# Maintainer: Ivan Zenin <i.zenin@gmx.com>

pkgname=amule-daemon-git
pkgver=latest
pkgrel=7
pkgdesc='An eMule-like client for the eD2k and Kademlia p2p networks (daemon only, development version)'
url='http://www.amule.org'
arch=('i686' 'x86_64')
license=('GPL')
depends=('crypto++' 'wxbase3.0' 'boost')
makedepends=('git')
conflicts=('amule')
source=('git+https://github.com/amule-project/amule.git'
        'amuled.service'
        'amuled@.service'
        'amuled.tmpfile')
md5sums=('SKIP'
         '0bb6c56702cd79dc46ff618c4946df33'
         'f2a109a00db1871fcab05dc2ced6a993'
         '70a7fdf6a76e68794635e3f3a9613e26')
install="amule-daemon-git.install"

pkgver() {
  cd "${srcdir}"/amule
  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build() {
  cd "${srcdir}"/amule
  ./autogen.sh && ./configure \
      --prefix=/usr \
      --mandir=/usr/share/man \
      --disable-monolithic \
      --enable-amule-daemon \
      --enable-amulecmd \
      --disable-webserver \
      --disable-amule-gui \
      --disable-cas \
      --disable-wxcas \
      --enable-ed2k \
      --disable-alc \
      --enable-alcc \
      --disable-xas \
      --disable-fileview \
      --disable-plasmamule \
      --disable-static \
      --disable-kde-in-home \
      --disable-geoip \
      --disable-upnp \
      --disable-debug \
      --disable-profile \
      --enable-optimize \
      --enable-mmap \
      --disable-nls \
      --disable-ccache \
	  --with-boost \
      --with-wx-config=/usr/bin/wx-config
  make
} 

package() {
  cd amule
  make DESTDIR="${pkgdir}" install
  find "${pkgdir}" -type d -name .git -exec rm -r '{}' +
  install -Dm644 "${srcdir}/amuled.service" "${pkgdir}/usr/lib/systemd/system/amuled.service"
  install -Dm644 "${srcdir}/amuled@.service" "${pkgdir}/usr/lib/systemd/system/amuled@.service"
  install -Dm644 "${srcdir}/amuled.tmpfile" "${pkgdir}/usr/lib/tmpfiles.d/amuled.conf"
  install -dm750 -o129 -g129 "${pkgdir}/var/lib/amule"
  rm -fr "${pkgdir}/usr/share"/{pixmaps,applications}
}