summaryrefslogtreecommitdiff
path: root/libre/clementine/PKGBUILD
blob: 1082bbbb9fd2b4b57b1d6c9c315692726e8d094d (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
89
90
91
92
93
94
95
# $Id: PKGBUILD 171170 2016-04-16 09:31:33Z alucryd $
# 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: André Silva <emulatorman@parabola.nu>
# Contributor: Kete <kete@ninthfloor.org>
# Contributor: Márcio Silva <coadde@parabola.nu>

pkgname=clementine
_pkgname=$pkgname-libre
pkgver=1.3
pkgrel=1.parabola1
pkgdesc='A modern music player and library organizer, without nonfree artwork and Spotify support'
url="http://www.$pkgname-player.org/"
license=('GPL')
arch=('i686' 'x86_64')
replaces=("$_pkgname")
conflicts=("$_pkgname")
depends=('chromaprint' 'crypto++' 'fftw' 'gcc-libs' 'glew' 'glib2' 'glibc'
         'gst-plugins-base-libs' 'gstreamer' 'libcdio' 'libechonest' 'libgl'
         'libgpod' 'liblastfm' 'libmtp' 'libpulse' 'libx11' 'protobuf' 'qjson'
         'qt4' 'sqlite' 'taglib' 'zlib')
makedepends=('boost' 'cmake' 'mesa' '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')
install="${pkgname}.install"
mksource=("${pkgname}-${pkgver}.tar.gz::https://github.com/$pkgname-player/${pkgname^}/archive/${pkgver}.tar.gz")
source=("https://repo.parabola.nu/other/${_pkgname}/${_pkgname}-${pkgver}.tar.gz"
        'remove-nonfree-artwork-and-spotify.patch'
        'moognu.png')
mksha256sums=('55e8d283ed02e3f2376a88b012cd2003e00fef95a98b6a919d67cb57e96b8617')
sha256sums=('d036d4ff71bff71baf941e5f3302a5a72a2665a04252d02f2ded5b1ecd0bb880'
            '8df85540364e62b1b12c818958e83eb079bc203f9ab2a542c97410c7a74aa360'
            'c6918617769152f3617c61f721819e69d03f671b85760b11cfe45abd53955bc4')

mksource() {
  cd ${pkgname^}-${pkgver}

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

prepare() {
  cd ${pkgname^}-${pkgver}

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

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

  # remove Spotify files
  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},internet/spotify{blobdownloader.{cpp,h},server.{cpp,h},service.{cpp,h},settingspage.{cpp,h,ui}}}

  # 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

  if [[ -d build ]]; then
    rm -rf build
  fi
  mkdir build
}

build() {
  cd ${pkgname^}-${pkgver}/build

  cmake .. \
    -DCMAKE_BUILD_TYPE='Release' \
    -DCMAKE_INSTALL_PREFIX='/usr'
  make
}

package() {
  cd ${pkgname^}-${pkgver}/build

  make DESTDIR="${pkgdir}" install
}

# vim: ts=2 sw=2 et: