debmaker/ressources/keycloak/debmaker

42 lines
1.1 KiB
Plaintext
Raw Normal View History

2022-10-16 01:39:24 +02:00
#!/bin/bash
2024-11-12 09:18:23 +01:00
VERSION=26.0.5
2022-10-16 01:39:24 +02:00
APP=keycloak
DEPOT=https://github.com/keycloak/keycloak.git
GIT_VERSION=${VERSION}
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
2023-07-18 15:58:26 +02:00
DEBIAN_VERSION_CODENAME=bookworm
2022-10-16 01:39:24 +02:00
IMAGE_SIZE=12
PACKAGE_DEPENDENCY="default-jdk maven"
STEP="base_package_upgrade install_package_dependency default_prebuild build makedeb"
#makedeb
build() {
cd /tmp/${APP}
mkdir ~/.m2/
cp .github/settings.xml ~/.m2/
cd quarkus
mvn -f ../pom.xml clean install -DskipTestsuite -DskipExamples -DskipTests
}
makedeb(){
PATH_DEB=/tmp/src/rootfs
2023-07-18 15:58:26 +02:00
2022-10-16 01:39:24 +02:00
mkdir -p ${PATH_DEB}/etc/
mkdir -p ${PATH_DEB}/usr/lib/keycloak
mkdir -p ${PATH_DEB}/var/lib/
2023-07-18 15:58:26 +02:00
tar -zxf /tmp/${APP}/quarkus/dist/target/keycloak-*tar.gz -C ${PATH_DEB}/usr/lib/keycloak --strip-components=1
2022-10-16 01:39:24 +02:00
mv ${PATH_DEB}/usr/lib/keycloak/conf ${PATH_DEB}/etc/keycloak
#mv ${PATH_DEB}/usr/lib/keycloak/data ${PATH_DEB}/var/lib/keycloak
2023-07-18 15:58:26 +02:00
2022-10-16 01:39:24 +02:00
ln -s /etc/keycloak ${PATH_DEB}/usr/lib/keycloak/conf
ln -s /var/lib/keycloak ${PATH_DEB}/usr/lib/keycloak/data
2023-07-18 15:58:26 +02:00
2022-10-16 01:39:24 +02:00
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}