gitea: make it upgradable
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
92a226da83
commit
7fc23fa0fc
2 changed files with 15 additions and 13 deletions
|
@ -21,12 +21,11 @@ optdepends=(
|
||||||
'sqlite: SQLite support'
|
'sqlite: SQLite support'
|
||||||
)
|
)
|
||||||
options=(!lto)
|
options=(!lto)
|
||||||
_tag=7e084341feeb584dbfdd6a4bb92f1d3c9ca6fb64 # git rev-parse v${pkgver}
|
source=("https://dl.gitea.io/gitea/$pkgver/gitea-src-$pkgver.tar.gz"
|
||||||
source=("git+https://github.com/go-gitea/gitea.git#tag=${_tag}?signed"
|
|
||||||
gitea.tmpfiles
|
gitea.tmpfiles
|
||||||
gitea.service
|
gitea.service
|
||||||
gitea.sysusers)
|
gitea.sysusers)
|
||||||
sha256sums=('SKIP'
|
sha256sums=('a7a42179aa830b5384ecf56cce125344f4e4c0cd0ec93c5854aaccfb337d274c'
|
||||||
'9f63a517e8da6865fa6d9e87f6b08fe25ea56285304115e052809663c48dc3d7'
|
'9f63a517e8da6865fa6d9e87f6b08fe25ea56285304115e052809663c48dc3d7'
|
||||||
'b16d02a9f32a17cc14dfa46a980bad795a4ed744627e6342248f60236dc2be43'
|
'b16d02a9f32a17cc14dfa46a980bad795a4ed744627e6342248f60236dc2be43'
|
||||||
'7e7b798b8ce035c1fb55993ece41c5efb6cad5922708866804fa50ada0cf9fa5')
|
'7e7b798b8ce035c1fb55993ece41c5efb6cad5922708866804fa50ada0cf9fa5')
|
||||||
|
@ -43,18 +42,13 @@ validpgpkeys=(
|
||||||
install=gitea.install
|
install=gitea.install
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd ${pkgname}
|
cd ${srcdir}
|
||||||
# Fetch dependency using go mod
|
# Fetch dependency using go mod
|
||||||
make vendor
|
make vendor
|
||||||
}
|
}
|
||||||
|
|
||||||
pkgver() {
|
|
||||||
cd ${pkgname}
|
|
||||||
git describe --tags | sed 's/^v//'
|
|
||||||
}
|
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd ${pkgname}
|
cd ${srcdir}
|
||||||
export CGO_CPPFLAGS="${CPPFLAGS}"
|
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||||
export CGO_CFLAGS="${CFLAGS}"
|
export CGO_CFLAGS="${CFLAGS}"
|
||||||
export CGO_CXXFLAGS="${CXXFLAGS}"
|
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||||
|
@ -66,10 +60,11 @@ build() {
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
install -Dm755 ${pkgname}/${pkgname} -t "${pkgdir}"/usr/bin/
|
cd ${srcdir}
|
||||||
install -Dm644 ${pkgname}/LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}/
|
install -Dm755 ${pkgname} -t "${pkgdir}"/usr/bin/
|
||||||
|
install -Dm644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}/
|
||||||
install -Dm644 ${pkgname}.service -t "${pkgdir}"/usr/lib/systemd/system/
|
install -Dm644 ${pkgname}.service -t "${pkgdir}"/usr/lib/systemd/system/
|
||||||
install -Dm644 ${pkgname}.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/${pkgname}.conf
|
install -Dm644 ${pkgname}.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/${pkgname}.conf
|
||||||
install -Dm644 ${pkgname}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${pkgname}.conf
|
install -Dm644 ${pkgname}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${pkgname}.conf
|
||||||
install -D ${pkgname}/custom/conf/app.example.ini -t "${pkgdir}"/etc/gitea/
|
install -D custom/conf/app.example.ini -t "${pkgdir}"/etc/gitea/
|
||||||
}
|
}
|
||||||
|
|
7
gitea/update.sh
Executable file
7
gitea/update.sh
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
source ../.util.sh
|
||||||
|
|
||||||
|
update_github_tag go-gitea/gitea
|
||||||
|
|
||||||
|
[ $? -eq 0 ] && update_pkg
|
Loading…
Add table
Reference in a new issue