#!/usr/bin/bash # JOBoRun : Jwm OpenBox Obarun RUNit # Maintainer : Joe Bo Run # PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname" #-----------------------------------------| DESCRIPTION |--------------------------------------- _pkgname='gitea' pkgname=gitea-git #pkgver=v1.15.0_dev_359_g2a998048ef pkgver=v1.17.0_dev_49_g401e5c8174 #4ac79e937fc6d75224eb7178e9695aa0cef4c12f refs/tags/v1.17.0-dev #^4563148a61ba892e8f2bb66342f00a950bcd5315 pkgrel=1 pkgdesc='Painless self-hosted Git service. Community managed fork of Gogs. w/o systemd - dev 0.17 edition' arch=('x86_64') url='https://gitea.io/' depends=('git') makedepends=('go' 'npm') 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' ) backup=('etc/gitea/app.ini') conflicts=('gitea') provides=('gitea') source=( git+https://github.com/go-gitea/gitea.git#branch=main gitea.tmpfiles gitea.sysusers app.ini ) pkgver() { cd "${srcdir}/${_pkgname}" git describe --tags --long | sed s/-/_/g } prepare() { cd ${srcdir}/${_pkgname} # Be nice to people with read-only home GOCACHE="${srcdir}/cache" make vendor } build() { cd ${srcdir}/${_pkgname} # Again, be nice to people with read-only home export GOCACHE="${srcdir}/cache" export CGO_CPPFLAGS="${CPPFLAGS}" export CGO_CFLAGS="${CFLAGS}" export CGO_CXXFLAGS="${CXXFLAGS}" export CGO_LDFLAGS="${LDFLAGS}" export LDFLAGS="-X 'code.gitea.io/gitea/modules/setting.AppWorkPath=/var/lib/gitea/'" export EXTRA_GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" export TAGS="bindata sqlite sqlite_unlock_notify pam" make -j1 # building in parallel breaks the bindata target which relies on execution order } package() { install -Dm755 ${_pkgname}/${_pkgname} -t "${pkgdir}"/usr/bin/ install -Dm644 ${_pkgname}/LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}/ install -Dm644 ${_pkgname}.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/${_pkgname}.conf install -Dm644 ${_pkgname}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${_pkgname}.conf install -Dm644 app.ini "${pkgdir}"/etc/gitea/app.ini } #---- license gpg-key sha256sums ---- license=('MIT') sha512sums=( 'SKIP' '89bf119a91fd48ed35c06131c67de1b4300bd2e79522c47aee9a73d7f1ebb08d9bceadc37408bd2425475d92c8bf59d87a799f2ce0a46bee860bf9fc7a904103' # -- sysd.service -- 'd65e053a98976423c6c1f3a4b6b0fd40f51e50a32d7afc651fc02414bb9f3bf574a58cc6a8c96760b85ab9f4f2bfcd0884bd7e9edcc2d71f07e7c1a548783c4c' '77f672ed82bc8f78ca04b1e2b7c7d026cb897da6e4f057817adbe1242bf8a67875061553806e6b027cdb3266cdf217ee3993efd9242a66c5802ed34344b5ded1' '704930578fe4231c45bcfdcc65df5d4f523b96909e670cc6e4f098770043b0f47fe5d90621788bc6ba300b0f19909a203068d2a1c142e7c5d29dc03a0dc5fc1d' ) sha256sums=(SKIP 1521fd7edc3830c695698ffe9835709f1408040b5ec989f07410972c894fa8ba # gitea.tmpfiles 2abc51ccd0086bb996194bb7fb241a3f26d84f518417c872b66a3db8970da7e4 # gitea.sysusers fefa585900fbd97aae2783c89bb13be96990c573b9828020dbd351337edc0ef4) # app.ini