blob: dc4c4861a072e5900a44089a68d6dbc4a73b2041 (
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
|
# Maintainer: Carl Smedstad <carl.smedstad at protonmail dot com>
# Contributor: Amina Khakimova <hakami1024@gmail.com>
# Contributor: Marcel Campello Ferreira <marcel.campello.ferreira@gmail.com>
# Contributor: Mark Dixon <mark@markdixon.name>
pkgname=neo4j-community
_pkgname=neo4j
pkgver=5.17.0
pkgrel=1
_java_version=17
pkgdesc="A fully transactional graph database implemented in Java"
arch=(any)
url="https://github.com/neo4j/neo4j"
license=(GPL-3.0-only)
depends=(
"java-runtime=$_java_version"
"scala"
)
makedepends=(
"java-environment=$_java_version"
"maven"
)
conflicts=(neo4j-enterprise)
backup=(
etc/neo4j/neo4j-admin.conf
etc/neo4j/neo4j.conf
etc/neo4j/server-logs.xml
etc/neo4j/user-logs.xml
)
source=(
"$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz"
"neo4j.executable-template"
"neo4j.service"
"neo4j.sysusers"
"neo4j.tmpfiles"
"use-system-scala.patch"
)
sha256sums=(
'13f43f099978ac639fd9008decaa783f04e3bd3d6957dd5109539e894dad879b'
'152e35d949fe9090c890e7a213da917c09bc087a060119a1c32541821f91781f'
'090e9ced1708e22592f775490360762d973e81061a0170b4150b087b1751e142'
'a1d3dd94aecf80289e8d9b6381d4393ed60b7a5dec3cae436e721be676c15f3a'
'45033d5009c84340b79f914bfc13b00c67a8c0bf30a5ccf9d016b5e238762f92'
'f0ec370a01d479459c44c096730396524a86c7c04b706ff6094120accc17d6de'
)
_archive="$_pkgname-$pkgver"
prepare() {
cd "$_archive"
patch --forward --strip=1 --input="$srcdir/use-system-scala.patch"
mvn versions:set -DnewVersion="$pkgver"
mkdir -p bin
# shellcheck disable=SC2002
{
cat "$srcdir/neo4j.executable-template" \
| sed "s/%APP_NAME%/neo4j/" \
| sed "s/%CLASS_NAME%/org.neo4j.server.startup.Neo4jBoot/" \
> bin/neo4j
cat "$srcdir/neo4j.executable-template" \
| sed "s/%APP_NAME%/neo4j-admin/" \
| sed "s/%CLASS_NAME%/org.neo4j.server.startup.Neo4jAdminBoot/" \
> bin/neo4j-admin
cat "$srcdir/neo4j.executable-template" \
| sed "s/%APP_NAME%/cypher-shell/" \
| sed "s/%CLASS_NAME%/org.neo4j.shell.startup.CypherShellBoot/" \
> bin/cypher-shell
}
}
build() {
cd "$_archive"
export PATH="/usr/lib/jvm/java-$_java-openjdk/bin:$PATH"
mvn \
-Dmaven.repo.local="$srcdir/repo" \
-Dscala.home=/usr/share/scala \
package -DskipTests
}
check() {
cd "$_archive"
# Running all integration tests takes ~1 hour
mvn \
-Dmaven.repo.local="$srcdir/repo" \
-Dscala.home=/usr/share/scala \
integration-test --projects community/community-it/community-it/
}
package() {
cd "$_archive"
tar -xf "packaging/standalone/target/neo4j-community-$pkgver-unix.tar.gz"
_bin_archive="neo4j-community-$pkgver"
# Config files
install -Dm644 -t "$pkgdir/etc/neo4j" \
"$_bin_archive/conf/neo4j-admin.conf" \
"$_bin_archive/conf/neo4j.conf" \
"$_bin_archive/conf/server-logs.xml" \
"$_bin_archive/conf/user-logs.xml"
sed -i 's:=/usr/share/neo4j/lib:=/usr/share/java/neo4j:' "$pkgdir/etc/neo4j/neo4j.conf"
# Bash completion
install -Dm644 "$_bin_archive/bin/completion/neo4j-admin_completion" "$pkgdir/usr/share/bash-completion/completions/neo4j-admin"
install -Dm644 "$_bin_archive/bin/completion/neo4j_completion" "$pkgdir/usr/share/bash-completion/completions/neo4j"
# Remove Scala JARs
rm "$_bin_archive/lib/"scala-library-*.jar
rm "$_bin_archive/lib/"scala-reflect-*.jar
# Install JARs
install -Dm644 -t "$pkgdir/usr/share/java/neo4j" "$_bin_archive/lib/"*.jar
# Man pages
install -Dm644 -t "$pkgdir/usr/share/man/man1" \
community/cypher-shell/packaging/src/common/manpages/cypher-shell.1
# Documentation
install -Dm644 -t "$pkgdir/usr/share/doc/neo4j" \
"$_bin_archive/README.txt" \
"$_bin_archive/UPGRADE.txt"
# License files
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" \
"$_bin_archive/LICENSE.txt" \
"$_bin_archive/LICENSES.txt" \
"$_bin_archive/NOTICE.txt"
# Executable files
install -Dm755 -t "$pkgdir/usr/bin" \
bin/cypher-shell \
bin/neo4j \
bin/neo4j-admin
# Systemd files
install -Dm644 -t "$pkgdir/usr/lib/systemd/system" "$srcdir/neo4j.service"
install -Dm644 -t "$pkgdir/usr/lib/sysusers.d" "$srcdir/neo4j.sysusers"
install -Dm644 -t "$pkgdir/usr/lib/tmpfiles.d" "$srcdir/neo4j.tmpfiles"
}
|