name='gitea'
version='1.22.1' release='1'
This commit is contained in:
73
gitea/alr.sh
Normal file
73
gitea/alr.sh
Normal file
@ -0,0 +1,73 @@
|
||||
name='gitea'
|
||||
version='1.22.1'
|
||||
release='1'
|
||||
desc='Painless self-hosted Git service, community managed.'
|
||||
homepage='https://gitea.io'
|
||||
maintainer="Евгений Храмов <xpamych@yandex.ru>"
|
||||
architectures=('amd64')
|
||||
license=('MIT')
|
||||
provides=('gitea')
|
||||
conflicts=('gitea' 'gitea-git')
|
||||
|
||||
deps=(
|
||||
'git'
|
||||
)
|
||||
|
||||
build_deps=(
|
||||
'go'
|
||||
'nodejs'
|
||||
'npm'
|
||||
'poetry'
|
||||
'openssh'
|
||||
'pam-devel'
|
||||
)
|
||||
|
||||
opt_deps=(
|
||||
'mariadb: поддержка MariaDB'
|
||||
'memcached: поддержка MemCached'
|
||||
'openssh: поддержка GIT поверх SSH'
|
||||
'pam: поддержка аутентификации с помощью PAM'
|
||||
'postgresql: поддержка PostgreSQL'
|
||||
'redis: поддержка Redis'
|
||||
'sqlite: поддержка SQLite'
|
||||
)
|
||||
|
||||
sources=("git+https://github.com/go-gitea/gitea.git#tag=v${version}")
|
||||
checksums=('SKIP')
|
||||
|
||||
options=(!lto)
|
||||
backup=('etc/gitea/app.ini')
|
||||
|
||||
prepare() {
|
||||
cd ${name}
|
||||
# Patch to disable failing tests that rely on weak ssh keys (DSA-1024)
|
||||
# See https://github.com/go-gitea/gitea/issues/31624
|
||||
patch -Np1 < "${scriptdir}/disable_failing_tests.patch"
|
||||
make deps
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${name}
|
||||
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||
export CGO_CFLAGS="${CFLAGS}"
|
||||
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||
export CGO_LDFLAGS="${LDFLAGS}"
|
||||
export EXTRA_GOFLAGS="-buildmode=pie -mod=readonly -modcacherw"
|
||||
export LDFLAGS="-linkmode=external -compressdwarf=false -X 'code.gitea.io/gitea/modules/setting.AppWorkPath=/var/lib/gitea/' -X 'code.gitea.io/gitea/modules/setting.CustomConf=/etc/gitea/app.ini'"
|
||||
export TAGS="bindata sqlite sqlite_unlock_notify pam"
|
||||
make -j1
|
||||
}
|
||||
|
||||
check() {
|
||||
cd ${name}
|
||||
make test
|
||||
}
|
||||
|
||||
package() {
|
||||
install-binary ${name}/${name}
|
||||
install-license ${name}/LICENSE ./$name/LICENSE
|
||||
install-systemd ${name}.service
|
||||
install -Dm644 ${scriptdir}/${name}.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/${name}.conf
|
||||
install -Dm644 ${scriptdir}/${name}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${name}.conf
|
||||
install -Dm644 ${name}/custom/conf/app.example.ini "${pkgdir}"/etc/gitea/app.ini
|
||||
}
|
Reference in New Issue
Block a user