summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3ceab826d73eeec9e5c55e68e2fdcc93139a4bdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Maintainer: Einhard Leichtfuß <alguien@respiranto.de>

_extname=PluggableAuth
_extname_lowercase="${_extname,,}"
_pkgname_base="mediawiki-extension-${_extname_lowercase}"

_mediawiki_mainver=1.35
_mediawiki_mainver_succ=${_mediawiki_mainver%.*}.$((${_mediawiki_mainver##*.}+1))
_branch="REL${_mediawiki_mainver/./_}"

pkgname="${_pkgname_base}-git"
epoch=1
pkgver=5.7.r35.g2a465ae
pkgrel=1
pkgdesc="MediaWiki extension providing a framework for creating authentication and authorization extensions"
arch=('any')
url="https://www.mediawiki.org/wiki/Extension:${_extname}"
license=('MIT')
depends=("mediawiki>=${_mediawiki_mainver}"
         "mediawiki<${_mediawiki_mainver_succ}")
makedepends=('git')
provides=("$_pkgname_base")
conflicts=("$_pkgname_base")
source=("git+https://gerrit.wikimedia.org/r/mediawiki/extensions/${_extname}#branch=${_branch}")
sha512sums=('SKIP')

pkgver()
{
	cd "${_extname}"
	git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

package()
{
	local ext_dir="/usr/share/webapps/mediawiki/extensions/${_extname}"

	install -d -m755 "${pkgdir}${ext_dir}"
	cp -a "$_extname"/* "${pkgdir}${ext_dir}/"

	install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}"
	ln -s "${ext_dir}/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/"
}