summaryrefslogtreecommitdiff
path: root/libre/clementine/PKGBUILD
blob: dffb5bc708d129710f2fd6f29a87fa45a2c8b9d9 (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
76
77
78
79
80
81
82
83
84
85
86
87
88
# Maintainer (Arch): Maxime Gauduin <alucryd@archlinux.org>
# Contributor (Arch): Stéphane Gaudreault <stephane@archlinux.org>
# Contributor (Arch): BlackEagle <ike.devolder@gmail.com>
# Contributor (Arch): Dany Martineau <dany.luc.martineau@gmail.com>
# Maintainer (Hyperbola): André Silva <emulatorman@hyperbola.info>
# Contributor (Hyperbola): Márcio Silva <coadde@hyperbola.info>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: Kete <kete@ninthfloor.org>

# rationale for inclusion in libre:
#  - replaced nonfree nyancat artwork with moognu
#  - removed spotify support
#
# additional changes:
#  - build from release tarball instead of VCS

pkgname=clementine
pkgver=1.4.0rc1
pkgrel=1
pkgrel+=.parabola1
pkgdesc='A modern music player and library organizer'
pkgdesc+=', without nonfree artwork and Spotify support'
url=https://www.clementine-player.org/
license=(GPL)
arch=(x86_64)
arch+=(i686 armv7h)
depends=(chromaprint crypto++ glew gst-plugins-base-libs libcdio libgpod liblastfm-qt5 libmtp libmygpo-qt5 protobuf qt5-x11extras)
makedepends=(boost cmake qt5-tools sparsehash)
optdepends=(
  'gst-plugins-base: "Base" plugin libraries'
  'gst-plugins-good: "Good" plugin libraries'
  'gst-plugins-bad: "Bad" plugin libraries'
  'gst-plugins-ugly: "Ugly" plugin libraries'
  'gst-libav: Libav plugin'
  'gvfs: Various devices support'
)
source=("https://github.com/clementine-player/Clementine/releases/download/$pkgver/$pkgname-$pkgver.tar.xz"
        remove-nonfree-artwork-and-spotify.patch
        moognu.png)

sha256sums=('96ba2f5f3ece47b2c1065e980dcc37ada93ea42cf37b794ee804514ce4a65459'
            '75536b5290ebcd6126d9e8796c3f15a0b0d5339257060ebab511dfe665d64e32'
            'c6918617769152f3617c61f721819e69d03f671b85760b11cfe45abd53955bc4')

prepare() {
  mkdir -p build

  cd "$pkgname-$pkgver"

  # remove nonfree artwork for the Nyan Cat plugin
  # https://labs.parabola.nu/issues/329
  rm -v data/nyancat.png

  # remove nonfree artwork and Spotify references
  patch -Np1 -i ../remove-nonfree-artwork-and-spotify.patch

  # remove Spotifyblob files
  rm -rv ext/{$pkgname-spotifyblob,lib${pkgname}-spotifyblob}

  # remove Spotify files
  rm -rv src/internet/spotify
  rm -v data/icons/svg/spotify.svg
  rm -v data/providers/{22x22,32x32,48x48}/spotify.png
  rm -v data/spotify-attribution.png
  rm -v data/clementine-spotify-public.pem
  rm -v cmake/SpotifyVersion.cmake
  rm -v data/schema/schema-30.sql
  rm -v src/globalsearch/spotifysearchprovider.{cpp,h}

  # move free Nyan Cat replacement mascot (MooGNU) to the source code
  # https://labs.parabola.nu/issues/329
  install -m644 -v ../moognu.png data

  # create a blank file because it's a dependency for Clementine
  touch data/schema/schema-30.sql
}

build() {
  cd build

  cmake ../$pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr
  make
}

package() {
  make DESTDIR="$pkgdir" -C build install
}