summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 58820e5b6a795945d207174feaff9ece38a67aa4 (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
# Maintainer: Stefan Eekhof <stefaneekhof@gmail.com>
pkgname=connective-http
pkgver=1.0.0

pkgrel=32
pkgdesc="Connective -- Lightweight Java HTTP Server"
arch=( 'any' )
url=""
license=('GPL2')
groups=( "connective-server" )
depends=( 'jdk17-openjdk' 'authbind' )
makedepends=( 'jdk17-openjdk' 'gradle>=6.7' )
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=main.install
changelog=
source=("git+https://aerialworks.ddns.net/ASF/ConnectiveStandalone.git" "scripts-and-configs.tar.gz")
noextract=()
md5sums=('SKIP' '0ec265bc6657dfc706654fe6800c8742')

build() {
    cd ConnectiveStandalone
    export JAVA_HOME=/usr/lib/jvm/java-17-openjdk
    gradle build
}

package() {
    chmod +x credtool.sh
    chmod +x start.sh
    
    mkdir "$pkgdir/usr/bin" -p
    mkdir "$pkgdir/usr/lib/connective-http" -p
    mkdir "$pkgdir/usr/lib/connective-http/libs" -p
    mkdir "$pkgdir/usr/lib/systemd/system" -p
    mkdir "$pkgdir/etc/connective-http" -p
    mkdir "$pkgdir/etc/connective-http/credentials" -p
    
    cp -rf "$srcdir/ConnectiveStandalone/build/Installations/"*.jar "$pkgdir/usr/lib/connective-http"
    cp -rf "$srcdir/ConnectiveStandalone/build/Installations/libs" "$pkgdir/usr/lib/connective-http"
    rm -rf "$srcdir/ConnectiveStandalone/build"
    
    chmod 775 "$pkgdir/etc/connective-http"
    chmod 770 "$pkgdir/etc/connective-http/credentials"
    
    cp config.props "$pkgdir/etc/connective-http"
    
    cp start.sh "$pkgdir/usr/bin/connective-http"
    cp credtool.sh "$pkgdir/usr/bin/credtool"
    
    cp service.service "$pkgdir/usr/lib/systemd/system/connective-http.service"
}