archrelease: copy trunk to community-any
[ArchLinux/community.git] / whipper / repos / community-x86_64 / PKGBUILD
blobe209c41301ac7241e5ed0c1a1be189e0c10dfe59
1 # Maintainer : Christian Rebischke <Chris.Rebischke@archlinux.org>
2 # Maintainer : Bruno Pagani <archange@archlinux.org>
3 # Contributor: Frederik "Freso" S. Olesen <archlinux@freso.dk>
4 # Contributor: Bastien Traverse <firstname at lastname dot email>
5 # Contributor: Samantha Baldwin <fuhsaz+git@cryptic.li>
6 # Contributor: Caleb Reach <jtxx000@gmail.com>
7 # Contributor: Felix Yan <felixonmars@gmail.com>
8 # Contributor: Karol "Kenji Takahashi" Woźniak <kenji.sx>
9 # Contributor: Mantas Mikulėnas <grawity@gmail.com>
11 pkgname=whipper
12 pkgver=0.10.0
13 pkgrel=5
14 pkgdesc="Python CD-DA ripper preferring accuracy over speed"
15 arch=(x86_64)
16 url="https://github.com/whipper-team/whipper"
17 license=(GPL3)
18 depends=(
19   cdrdao
20   flac
21   libcdio-paranoia
22   libsndfile
23   python-discid
24   python-gobject
25   python-musicbrainzngs
26   python-mutagen
27   python-pycdio
28   python-ruamel-yaml
29   python-setuptools
30   sox
32 checkdepends=(
33   python-twisted
35 makedepends=(python-setuptools-scm python-docutils)
36 optdepends=('python-pillow: cover art support')
37 conflicts=(accuraterip-checksum)
38 provides=(accuraterip-checksum)
39 source=(${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz
40         whipper-ruamel.yaml-0.17.patch::https://github.com/whipper-team/whipper/pull/543.patch
41         test-fixup.patch)
42 sha512sums=('728ad98185aa2d29f4fb215a597136691bb2c3590b3cac4f659238f90a3b4328c377fafe830a725b655f050538739f404b3eca853db4c39001d1b9d721dc7fd8'
43             '893e2f23717633971410e0f9917345eaec5af313d83702b36a2693b51eaf54d755d58db864de82e13e8506dc98ab548334d7ba6d02fd6c200bd0670e4bca73bf'
44             '17e817faf7a9244fe9b0c11f1cba71ec4a4eb7ee880fc16a2a3e2033cf1db9f16ab3cad18e20c2e02d5e656c2ccbc1143f744ffd0e950fe6bfd3512d58731f71')
46 prepare() {
47   cd ${pkgname}-${pkgver}
48   patch -p1 -i ../whipper-ruamel.yaml-0.17.patch
49   patch -p1 -i ../test-fixup.patch # tests depend on an external service... which can change test data
52 build() {
53   cd ${pkgname}-${pkgver}
54   echo "Version: ${pkgver}" > PKG-INFO
55   python setup.py build
56   cd man
57   make
60 check() {
61   cd ${pkgname}-${pkgver}
62   local python_version=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')
63   PYTHONPATH="build/lib.linux-${CARCH}-cpython-${python_version}/" python -m unittest discover
66 package() {
67   cd ${pkgname}-${pkgver}
68   python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
69   install -Dm644 -t "${pkgdir}"/usr/share/man/man1/ man/*.1