thomas
cc93246273
new version for adguardhome authelia bitwarden-desktop element-web gitea gotify joplin mautrix-whatsapp metabase zigbee2mqtt rustdesk-server
44 lines
1.1 KiB
Bash
Executable file
44 lines
1.1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
VERSION=1.17.0
|
|
|
|
[ -e ./lib/function.sh ] && source ./lib/function.sh
|
|
|
|
APP=gitea
|
|
DEPOT=https://github.com/go-gitea/gitea.git
|
|
GIT_VERSION=v${VERSION}
|
|
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
|
|
DEBIAN_VERSION_CODENAME=bullseye
|
|
IMAGE_SIZE=5
|
|
|
|
STEP="envinit prebuild build makedeb"
|
|
|
|
envinit() {
|
|
apt-get update
|
|
apt-get dist-upgrade -y
|
|
apt install -y --no-install-recommends git wget ca-certificates dpkg fakeroot build-essential
|
|
wget -qO - https://deb.nodesource.com/setup_16.x | bash
|
|
apt-get update
|
|
apt-get install -y nodejs
|
|
wget -qO - https://go.dev/dl/go1.18.1.linux-amd64.tar.gz | tar -C /usr/local -xz
|
|
}
|
|
|
|
prebuild(){
|
|
[ -e /tmp/git ] && rm -fr /tmp/${APP}
|
|
git clone --depth 1 -b ${GIT_VERSION} ${DEPOT} /tmp/${APP}
|
|
}
|
|
|
|
build() {
|
|
cd /tmp/${APP}/
|
|
PATH=$PATH:/usr/local/go/bin
|
|
TAGS="bindata sqlite sqlite_unlock_notify" make build
|
|
}
|
|
|
|
makedeb(){
|
|
PATH_DEB=/tmp/src/rootfs
|
|
|
|
cp /tmp/${APP}/gitea ${PATH_DEB}/usr/bin/
|
|
cp /tmp/${APP}/custom/conf/app.example.ini ${PATH_DEB}/etc/gitea/app.ini
|
|
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
|
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
|
}
|