--- template.orig	2020-11-08 13:32:51.921982000 +0600
+++ template	2020-11-08 20:01:53.723899000 +0600
@@ -12,3 +12,3 @@ makedepends="chromaprint-devel boost-dev
  libusbmuxd-devel libmtp-devel libcdio-devel pulseaudio-devel glu-devel
- taglib-devel crypto++-devel $(vopt_if spotify libspotify-devel)
+ taglib-devel crypto++-devel
  libgpod-devel libmygpo-qt-devel qt5-x11extras-devel qt5-plugin-mysql
@@ -23,15 +23,31 @@ distfiles="https://github.com/clementine
 checksum=e1fa2482b81336282a36a5451a0217c274e5b45aa3eeed83fe3fd29a5df59397
-build_options="spotify"
 
-case "$XBPS_TARGET_MACHINE" in
-	x86_64 | i686 | armv7l)
-		build_options_default="spotify";;
-	*)
-		if [ "$build_option_spotify" ]; then
-			broken="no spotify blob"
-		fi
-		;;
-esac
+# Liberation
+# Some code has been taken and modified from:
+# https://git.parabola.nu/abslibre.git/tree/libre/clementine/PKGBUILD
+post_patch() {
+	# remove nonfree artwork for the Nyan Cat plugin
+	# https://labs.parabola.nu/issues/329
+	rm -v data/nyancat.png
 
-subpackages="$(vopt_if spotify clementine-spotify)"
+	# 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 ${FILESDIR}/moognu.png data
+
+	# create a blank file because it's a dependency for Clementine
+	touch data/schema/schema-30.sql
+}
 
@@ -41,10 +57,3 @@ post_install() {
 
-clementine-spotify_package() {
-	depends="${sourcepkg}>=${version}_${revision}"
-	short_desc+=" - spotify extension"
-	license="Apache-2.0"
-	repository="nonfree"
-	pkg_install() {
-		vmove usr/bin/clementine-spotifyblob
-	}
-}
+# Liberation
+# "clementine-spotify" package has been removed due to being nonfree
