blob: f4887f86b938668acc0d5815a1bf002366351771 (
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
# Maintainer: dreieck (https://aur.archlinux.org/account/dreieck)
_pkgname=python-libpulse
pkgname="${_pkgname}-git"
pkgver=0.5.r47.20241103.9aa1f54
pkgrel=1
pkgdesc="Asyncio interface to the Pulseaudio and Pipewire pulse library."
arch=(
'any'
)
url="https://gitlab.com/xdegaye/libpulse"
license=('MIT')
provides=(
"${_pkgname}=${pkgver}"
)
conflicts=(
"${_pkgname}"
)
depends=(
'python>=3.8'
'python<4'
)
makedepends=(
'git'
'python-build'
'python-flit-core>=3.2'
'python-flit-core<4'
'python-installer'
'python-setuptools'
'python-wheel'
)
optdepends=()
source=("${_pkgname}::git+${url}.git")
sha256sums=('SKIP')
prepare() {
cd "${srcdir}/${_pkgname}"
git log > git.log
}
pkgver() {
cd "${srcdir}/${_pkgname}"
_ver="$(git describe --tags | sed -E -e 's|^pa-dlna-||' -e 's|^[vV]||' | sed 's|-g[0-9a-fA-F]*$||' | tr '-' '+')"
_rev="$(git rev-list --count HEAD)"
_date="$(git log -1 --date=format:"%Y%m%d" --format="%ad")"
_hash="$(git rev-parse --short HEAD)"
if [ -z "${_ver}" ]; then
error "Version could not be determined."
return 1
else
printf '%s' "${_ver}.r${_rev}.${_date}.${_hash}"
fi
}
build() {
cd "${srcdir}/${_pkgname}"
python -m build --wheel --no-isolation
}
package() {
cd "${srcdir}/${_pkgname}"
python -m installer --destdir="${pkgdir}" dist/*.whl
### Remove file that gets ill-installed
#rm -v "${pkgdir}/usr/LICENSE.txt"
install -D -m644 -v -t "${pkgdir}/usr/share/doc/${_pkgname}" README.rst git.log
install -D -m644 -v -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
ln -svr "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" "${pkgdir}/usr/share/doc/${_pkgname}/LICENSE"
}
|