36 lines
779 B
Bash
Executable File
36 lines
779 B
Bash
Executable File
#!/bin/bash
|
|
|
|
VERSION=1.19.0
|
|
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=6
|
|
PACKAGE_DEPENDENCY="build-essential nodejs"
|
|
|
|
main() {
|
|
base_package_upgrade
|
|
configure_depot_nodejs 18
|
|
install_package_dependency
|
|
install_go
|
|
get_git_source
|
|
build
|
|
makedeb
|
|
}
|
|
|
|
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
|
|
}
|