blob: aaa02e2d4d1b035bf1b45344b709c31ef18624eb (
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
|
# Maintainer: Patrick Hechler <patrjprof.aur@ph.anderemails.de>
pkgname=patrjprof
pkgver=1.6.0r299
_pkgver="$(echo "${pkgver}" | sed -E 's/r[0-9]+$//')"
pkgrel=1
pkgdesc="A Free Java profiler written in Java"
arch=('any')
url="https://git.rwth-aachen.de/patrick_laszlo.hechler/patr-java-profiler"
license=('AGPL-3.0-or-later')
groups=()
depends=('java-runtime-headless>=8')
makedepends=()
optdepends=('java-runtime>=8: graphical user interface'
'java-runtime-headless>=16: support for socket files for server/client communication'
'java-runtime-headless>=23: profile constructors with the new class-file API'
)
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("patr-java-profiler-start-${_pkgver}.sh::https://nexuspat.hechler.de/repository/maven-releases/de/hechler/patrick/profiler/patr-java-profiler/${_pkgver}/patr-java-profiler-${_pkgver}.start-script"
"patr-java-profiler-agent-${_pkgver}.jar::https://nexuspat.hechler.de/repository/maven-releases/de/hechler/patrick/profiler/patr-java-profiler-agent/${_pkgver}/patr-java-profiler-agent-${_pkgver}-jar-with-dependencies.jar"
"patr-java-profiler-bootstrap-${_pkgver}.jar::https://nexuspat.hechler.de/repository/maven-releases/de/hechler/patrick/profiler/patr-java-profiler-bootstrap/${_pkgver}/patr-java-profiler-bootstrap-${_pkgver}.jar"
"patr-java-profiler-client-${_pkgver}.jar::https://nexuspat.hechler.de/repository/maven-releases/de/hechler/patrick/profiler/patr-java-profiler-client/${_pkgver}/patr-java-profiler-client-${_pkgver}.jar"
"patr-java-profiler-server-${_pkgver}.jar::https://nexuspat.hechler.de/repository/maven-releases/de/hechler/patrick/profiler/patr-java-profiler-server/${_pkgver}/patr-java-profiler-server-${_pkgver}.jar"
"patr-java-profiler-test-${_pkgver}.jar::https://nexuspat.hechler.de/repository/maven-releases/de/hechler/patrick/profiler/patr-java-profiler-test/${_pkgver}/patr-java-profiler-test-${_pkgver}.jar"
)
noextract=("${source[@]%%::*}")
sha512sums=('cdef6de2254f01d4398b2fcd8f9c43ca5aa1cac5d44d66595f0c0d7cdcab5082dea7fd323548df46dde468b5f307cc44a267927ed103324b2e0f41df99ab0bc4'
'c700f43f25ae1eb3a7613c776b2696cc3201e345c91a649a1206d9cf56839b19ed8f21a61774370539003ff5bc119380b9af250cf4acc2e62d2300c6972967f3'
'e0c14ca932ea19dc27ac9ff7c83e5b9fa78b284085fe36f891990ebb7a8c7d7d4a4d174fcf9ff887a504b6d70a83fa59faf40d36c0bb315b3970b67a72fc02d6'
'9116b3eec111a05cc701264fff4fd85050f78a7af71113f1d5e2227c2515ef21983559114d7b5d30998f13dfb636bcf9bf2ea3b1a062403b1ba59516b00c422a'
'e0e903dba389a80ebaa9aa73977020b10845ac7f0da24202a48b285405712b5093eba6012cf6b74500c5b0dd7a589c21b823ca10962f0477dc1c289e355aaaf0'
'2c6ab852b95ca0903514c187d696814c16a9b589347f051745cd80bd3335621a24eae6a32796811404ce7406e8d83b3aa09b14e60b2eca544b528ca237febf94'
)
build() {
cd "$srcdir"
chmod +x "./patr-java-profiler-start-${_pkgver}.sh"
}
check() {
cd "$srcdir"
export JAVA=java
export AGENT_JAR="patr-java-profiler-agent-${_pkgver}.jar"
export BOOTSTRAP_JAR="patr-java-profiler-bootstrap-${_pkgver}.jar"
export SERVER_JAR="patr-java-profiler-server-${_pkgver}.jar"
export CLIENT_JAR="patr-java-profiler-client-${_pkgver}.jar"
echo 'start test'
"./patr-java-profiler-start-${_pkgver}.sh" --no-server --no-client --no-defaults -cp \
"patr-java-profiler-test-${_pkgver}.jar" de.hechler.patrick.profiler.test.PHPTestMain 11
echo 'validate test'
"./patr-java-profiler-start-${_pkgver}.sh" --only-client --validate patr-java-profiler-output.data
echo 'finished test'
}
package() {
cd "$srcdir"
# copy original files
mkdir -p "$pkgdir"/usr/share/java/patrjprof
cp -T "patr-java-profiler-agent-${_pkgver}.jar" \
"$pkgdir"/usr/share/java/patrjprof/patr-java-profiler-agent.jar
cp -T "patr-java-profiler-bootstrap-${_pkgver}.jar" \
"$pkgdir"/usr/share/java/patrjprof/patr-java-profiler-bootstrap.jar
cp -T "patr-java-profiler-server-${_pkgver}.jar" \
"$pkgdir"/usr/share/java/patrjprof/patr-java-profiler-server.jar
cp -T "patr-java-profiler-client-${_pkgver}.jar" \
"$pkgdir"/usr/share/java/patrjprof/patr-java-profiler-client.jar
# create script which starts the profiler
mkdir -p "$pkgdir"/usr/bin
echo '#!/bin/sh' > "$pkgdir"/usr/bin/patrjprof
# do not change the SPDX license Identifier
head -1 "patr-java-profiler-start-${_pkgver}.sh" >> "$pkgdir"/usr/bin/patrjprof
echo -n "
# set the values needed for the script
AGENT_JAR=/usr/share/java/patrjprof/patr-java-profiler-agent.jar
BOOTSTRAP_JAR=/usr/share/java/patrjprof/patr-java-profiler-bootstrap.jar
SERVER_JAR=/usr/share/java/patrjprof/patr-java-profiler-server.jar
CLIENT_JAR=/usr/share/java/patrjprof/patr-java-profiler-client.jar
# helper script from git
" >> "$pkgdir"/usr/bin/patrjprof
tail +2 "patr-java-profiler-start-${_pkgver}.sh" >> "$pkgdir"/usr/bin/patrjprof
chmod +x "$pkgdir"/usr/bin/patrjprof
}
|