# Template file for 'pysolfc-cardsets'
pkgname=pysolfc-cardsets
version=2.0
revision=1
wrksrc="PySolFC-Cardsets-${version}"
archs=noarch
build_style=fetch
short_desc="PySolFC Cardsets"
maintainer="newbluemoon <blaumolch@mailbox.org>"
license="GPL-2"
homepage="http://pysolfc.sourceforge.net/"
distfiles="$SOURCEFORGE_SITE/pysolfc/PySolFC-Cardsets/PySolFC-Cardsets-${version}/PySolFC-Cardsets-${version}.tar.bz2"
checksum=c388d6360191b3b7e463d84e5a64260c4e3ed36e791a85227d7e8923f3f47ca7

do_install() {
	vmkdir usr/share/PySolFC/cardsets
	bsdtar -xjf PySolFC-Cardsets-${version}.tar.bz2 --strip-components=1 -C $DESTDIR/usr/share/PySolFC/cardsets
}

# Liberation
# Some code has been taken from:
# https://git.parabola.nu/abslibre.git/tree/libre/pysolfc-cardsets/PKGBUILD
post_install() {
	# removing nonfree cardsets included in pysolfc
	rm -rv $DESTDIR/usr/share/PySolFC/cardsets/cardset-{greywyvern,jacoby,patience,rangoon-{d,e,r},tksol}
}
