summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 937930f38adb2a8a0431b59c5adde805722a1209 (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
# Maintainer: cirlo <cirlo_ca at łøđ dot com>
# Contributor: Sibren Vasse <arch at sibrenvasse dot nl>
# Contributor: demian <mikar ατ gmx δοτ de>
pkgname=blockify-git
_name=blockify
pkgver=4.1.0.r1.g7ec5460
pkgrel=2
pkgdesc="Mutes Spotify advertisements."
arch=("any")
url="https://github.com/carlocastoldi/blockify"
license=("MIT")
depends=("spotify" "alsa-utils" "python-gobject" "dbus-python" "python-docopt")
makedepends=("python-build" "python-installer" "python-wheel" "python-poetry-core")
optdepends=("libpulse: allows muting Spotify instead of all system sound")
conflicts=("blockify")
provides=("blockify")
source=("${pkgname}::git+https://github.com/carlocastoldi/blockify")
sha256sums=('SKIP')

pkgver() {
    cd "${srcdir}/${pkgname}"
    git describe --long --tags | sed -E 's/([^-]*-g)/r\1/;s/[_-]/./g;s/^v//'
}

prepare() {
    git -C "${srcdir}/${pkgname}" clean -dfx
}

build() {
    cd "${srcdir}/${pkgname}"
    python -m build --wheel --no-isolation
}

package() {
    cd "${srcdir}/${pkgname}"
    python -m installer --destdir="$pkgdir" dist/*.whl
    install -Dm644 "${srcdir}/${pkgname}/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
    install -Dm644 "${srcdir}/${pkgname}/blockify/data/blockify.service" "${pkgdir}/usr/lib/systemd/user/blockify.service"
}