87 lines
2.3 KiB
Bash
87 lines
2.3 KiB
Bash
#!/usr/bin/bash
|
|
# JOBoRun : Jwm OpenBox Obarun RUNit
|
|
# Maintainer : Joe Bo Run <joborun@disroot.org>
|
|
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
|
|
# Website : https://pozol.eu
|
|
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
|
|
|
pkgname=forgejo
|
|
pkgver=1.20.1.0
|
|
pkgrel=02
|
|
pkgdesc='A lightweight software forge w/o systemd'
|
|
url='https://forgejo.org'
|
|
depends=('git')
|
|
makedepends=('go' 'nodejs' 'npm')
|
|
checkdepends=('openssh')
|
|
optdepends=(
|
|
'mariadb: MariaDB support'
|
|
'memcached: MemCached support'
|
|
'openssh: GIT over SSH support'
|
|
'pam: Authentication via PAM support'
|
|
'postgresql: PostgreSQL support'
|
|
'redis: Redis support'
|
|
'sqlite: SQLite support'
|
|
)
|
|
options=('!lto' '!debug')
|
|
_commit=dcab256781bcad7462ad9edfdd7c268118de47e9 # tags/v1.20.1-0
|
|
source=(
|
|
"$pkgname::git+https://codeberg.org/forgejo/forgejo#commit=$_commit"
|
|
'sysusers.conf'
|
|
'tmpfiles.conf'
|
|
)
|
|
|
|
pkgver() {
|
|
cd "$pkgname"
|
|
|
|
git describe --tags | sed -e 's/v//' -e 's/-/./g'
|
|
}
|
|
|
|
prepare() {
|
|
cd "$pkgname"
|
|
|
|
make deps
|
|
}
|
|
|
|
build() {
|
|
cd "$pkgname"
|
|
|
|
export CGO_CPPFLAGS="${CPPFLAGS}"
|
|
export CGO_CFLAGS="${CFLAGS}"
|
|
export CGO_CXXFLAGS="${CXXFLAGS}"
|
|
export CGO_LDFLAGS="${LDFLAGS}"
|
|
export EXTRA_GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
|
|
export LDFLAGS="-X 'code.gitea.io/gitea/modules/setting.AppWorkPath=/var/lib/forgejo/' -X 'code.gitea.io/gitea/modules/setting.CustomConf=/etc/forgejo/app.ini'"
|
|
export TAGS="bindata sqlite sqlite_unlock_notify pam"
|
|
|
|
make -j1
|
|
}
|
|
|
|
package() {
|
|
install -vDm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
|
|
install -vDm644 tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
|
|
|
|
cd "$pkgname"
|
|
|
|
# binary
|
|
install -vDm755 gitea "$pkgdir/usr/bin/$pkgname"
|
|
|
|
# configuration example
|
|
install -vDm644 custom/conf/app.example.ini -t "$pkgdir/etc/$pkgname"
|
|
|
|
# license
|
|
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
|
|
}
|
|
|
|
#---- gpg-key sha256sums ----
|
|
|
|
arch=(x86_64)
|
|
|
|
license=('MIT')
|
|
|
|
sha256sums=(SKIP
|
|
563ebe7e826c351786612102a303b9b3726a218e471b89817af94b2326f46a83 # sysusers.conf
|
|
b3bb27d8168b9939b83f23d215bc841fba96b16e4e2dc9e1529254f174a12994) # tmpfiles.conf
|
|
|
|
## 18cb70239cdba83406120dc9ff11fde15491a6dd38868181148a29867a87c85c forgejo-1.20.1.0-02-x86_64.pkg.tar.lz
|
|
|