void-packages/srcpkgs/gitea/template
Đoàn Trần Công Danh 7fc9190f0e srcpkgs/g*: convert patches to -Np1
* gcc is kept at -Np0, because of void-cross

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

53 lines
2 KiB
Bash

# Template file for 'gitea'
pkgname=gitea
version=1.14.2
revision=1
create_wrksrc=yes
build_style=go
go_import_path=code.gitea.io/gitea
go_ldflags=" -X main.Version=${version}"
# This could be done with build options, but these are built in with the
# following justification.
# * bindata: running with things not all in the binary is not a
# supported distribution format by the gitea upstream developers.
# That mode is only supported for development of gitea within the
# source tree
# * sqlite: this is likely the database that everyone will use. Only
# particularly large installations will want to go through the
# effort of setting up a real database server.
# * pam: PAM allows for authentication to varied external sources.
# Internal authentication supports the local database, OpenID, and
# LDAP, but basic other auth sources such as Kerberos and more
# exotic authenticators require PAM support to be useable.
# * tidb: This is an alternate database engine for users who would
# rather not use SQLite3 for some reason. It is also potentially
# more resiliant to corrupted writes.
go_build_tags="bindata sqlite pam tidb"
hostmakedepends="go-bindata git"
makedepends="sqlite-devel pam-devel"
depends="git bash"
short_desc="Git with a cup of Tea"
maintainer="fosslinux <fosslinux@aussies.space>"
license="MIT"
homepage="https://gitea.io"
changelog="https://github.com/go-gitea/gitea/blob/master/CHANGELOG.md"
distfiles="https://github.com/go-gitea/gitea/releases/download/v${version}/gitea-src-${version}.tar.gz"
checksum=d04bca934feba35600aaf739c82b7cbe7d8b911a086d7ac54f0710b689a85ac3
system_accounts="_gitea"
_gitea_homedir="/var/lib/gitea"
_gitea_shell="/bin/bash" # Proper shell needed for ssh support
make_dirs="/var/lib/gitea 0755 _gitea _gitea
/var/log/gitea 0755 _gitea root"
conf_files="/etc/gitea.conf"
pre_build() {
go mod vendor
}
post_install() {
vlicense LICENSE
vsv gitea
vinstall custom/conf/app.example.ini 0640 /etc gitea.conf
}