summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9e70508d58ec4b96e8fbb2de62ee92f823f433c4 (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# Maintainer:  dreieck
# Contributor: TJM <recreation@tjm.moe>
# Contributor: Yijian Chen <dastudiodirector@gmail.com>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Henrik Ronellenfitsch <searinox@web.de>
# Contributor: Alessio Sergi <sergi.alessio {at} gmail.com>
# Contributor: Dario 'Dax' Vilardi <dax [at] deelab [dot] org>
# Contributor: Anatol Pomozov <anatol.pomozov@gmail.com>
pkgname='amule-dlp-debug-git'
epoch=0
pkgver=2.3.3.r10608.20230302.7b3a07ab5
pkgrel=2
pkgdesc="An eMule-like client for ed2k p2p network with DLP patch. Build with debug information. Latest GIT checkout."
arch=(
  'i686'
  'x86_64'
)
url="https://github.com/persmule/amule-dlp"
license=('GPL2')
depends=(
  'binutils' # In unstripped debug build, library '/usr/lib/libsframe.so.1' needed in files '/usr/bin/amuled', '/usr/bin/amule', '/usr/bin/amulegui', '/usr/bin/amulecmd', '/usr/bin/amuleweb' according to 'namcap'.
  'boost-libs'
  'crypto++>=6.0.0'
  'gcc-libs'
  'gd'
  'geoip'
  'glibc'
  'libpng'
  'libsm'
  'libupnp'
  'readline'
  'zlib'
  'zstd'
  'wxwidgets-gtk3'
)
conflicts=(
  'amule'
  'amule-dlp'
  'amule-dlp-hg'
  'amule-dlp-debug-hg'
  'amule-dlp-hg-debug'
  'amule-dlp-git'
  'amule-dlp-git-debug' # This would be a autogenerated (by pacman) package name when `amule-dlp-git` is built with `options=('debug')` and not disabling strip.
)
replaces=(
  'amule-dlp-debug-hg'
  'amule-dlp-hg-debug'
)
provides=(
  "amule=${pkgver}"
  "amule-dlp=${pkgver}"
  "amule-dlp-git=${pkgver}"
)
makedepends=(
  'autoconf'
  'boost'
  'gettext'
  'git'
)
optdepends=(
  'antileech:             To use the antileech functionality.'
  'perl:                  For xas plugin (xChat2).'

  'gdb:                   To perform debugging.'

  'antileech-debug:       For debugging symbols in antileech.'
  'binutils-debug:        For debugging symbols in libsframe.'
  'boost-libs-debug:      For debugging symbols in boost libs.'
  'crypto++-debug>=6.0.0: For debugging symbols in crypto++.'
  'gcc-libs-debug:        For debugging symbols in gcc-libs.'
  'gd-debug:              For debugging symbols in gd.'
  'geoip-debug:           For debugging symbols in geoip.'
  'glibc-debug:           For debugging symbols in glibc.'
  'libpng-debug:          For debugging symbols in libpng.'
  'libsm-debug:           For debugging symbols in libsm.'
  'libupnp-debug:         For debugging symbols in libupnp.'
  'readline-debug:        For debugging symbols in readline.'
  'zlib-debug:            For debugging symbols in zlib.'
  'zstd-debug:            For debugging symbols in zstd.'
  'wxwidgets-gtk3-debug:  For debugging symbols in wxWidgets.'
)
install='amule.install'
source=(
  "amule-dlp::git+https://github.com/persmule/amule-dlp.git"
  'amuled.systemd'
  'amuleweb.systemd'
  '0001-allow-to-build-with-autoconf-2.70-and-later.patch'
)
sha256sums=(
  'SKIP'
  '6dbdd1ad1c3c3d8637b8f4cbd5416f39c8e4277a2f8498577b08bf6cda8dbca9'
  'f4f43b1154ddccc9036a4291a58c6715f097b171fec62ea7aead0c9d9fa654f2'
  '78b0021d878a8985d87c5f00caa7a1165b9bdf92880a2e3a197db429a7eb6dd8'
)
options=(
  'debug'
  '!strip'
  '!lto'
)

pkgver() {
  cd "${srcdir}/amule-dlp"

  _ver="$(grep -Po '(?<=set \(PACKAGE_VERSION ").+(?="\))' ./CMakeLists.txt)"
  _rev="$(git rev-list --count HEAD)"
  _date="$(git log -1 --date=format:"%Y%m%d" --format="%ad")"
  _hash="$(git rev-parse --short HEAD)"

  if [ -z "${_ver}" ]; then
    error "Version could not be determined."
    return 1
  else
    printf '%s' "${_ver}.r${_rev}.${_date}.${_hash}"
  fi
}

prepare() {
  cd "${srcdir}/amule-dlp"

  cp -v src/aMule.xpm amule.xpm

  for _patch in "${srcdir}/0001-allow-to-build-with-autoconf-2.70-and-later.patch"; do
    msg2 "Applying patch '$(basename "${_patch}")'"
    patch -N -p1 --follow-symlinks -i "${_patch}"
  done

  git log > "${srcdir}/git.log"

  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd "${srcdir}/amule-dlp"

  _toolkit='gtk3'
  _wxversion="$(wx-config --version | awk -F. '{print $1"."$2}')" # 3.2

  ./configure \
    --prefix=/usr \
    --mandir=/usr/share/man \
    --enable-monolithic \
    --enable-amule-daemon \
    --enable-amulecmd \
    --enable-amule-gui \
    --enable-webserver \
    --enable-cas \
    --enable-wxcas \
    --enable-ed2k \
    --enable-alc \
    --enable-alcc \
    --enable-xas \
    --enable-fileview \
    --disable-plasmamule \
    --enable-shared \
    --disable-static \
    --disable-kde-in-home \
    --enable-dlp \
    --enable-geoip \
    --enable-upnp \
    --with-denoise-level=1 \
    --enable-rpath \
    --enable-nls \
    --enable-debug \
    --enable-bfd \
    --enable-profile \
    --disable-optimize \
    --enable-mmap \
    --with-boost \
    --with-toolkit="${_toolkit}" \
    --with-wxversion="${_wxversion}"

  make
}

package() {
  cd "${srcdir}/amule-dlp"

  make DESTDIR=${pkgdir} install

  install -D -v -m644 "${srcdir}/amuled.systemd" "${pkgdir}/usr/lib/systemd/system/amuled.service"
  install -D -v -m644 "${srcdir}/amuleweb.systemd" "${pkgdir}/usr/lib/systemd/system/amuleweb.service"

  install -D -v -m644 "${srcdir}/git.log" "${pkgdir}/usr/share/doc/amule-dlp/git.log"
}