# Interrum Maintainer: Luke R. <g4jc@openmailbox.org> GPG: rsa4096/3EAE8697

pkgname=parabola-backgrounds
pkgver=1.0
pkgrel=1
pkgdesc="Parabola backgrounds/artwork by Crazytoon, coadde, and Catira."
arch=('any')
url="https://repo.parabola.nu/other/artwork/parabola_wallpapers-r1/src/"
license=('custom')
makedepends=('pngcrush')
source=("https://repo.parabola.nu/other/artwork/scn-prbprbprw000001-gnu_wallpaper_03-r15360x8640px-c_rgb08-noa000r00h00m00s000f_nos_xcf02d08_m0002d3g-atf_lcf_nof.png"
"https://repo.parabola.nu/other/artwork/scn-prbprbprw000001-gnu_wallpaper_03-r15360x8640px-c_rgb08-noa000r00h00m00s000f_nos_xcf02d08_m0002d3g-atf_lcf_nof.png.sig"
"https://repo.parabola.nu/other/artwork/scn-prbprbprw000001-gnu_wallpaper_02-r17280x09720px-c_rgb08-noa000r00h00m00s000f_nos_xcf02d08_m0004d0g-atf_lcf_nof.png"
"https://repo.parabola.nu/other/artwork/scn-prbprbprw000001-gnu_wallpaper_02-r17280x09720px-c_rgb08-noa000r00h00m00s000f_nos_xcf02d08_m0004d0g-atf_lcf_nof.png.sig"
"https://repo.parabola.nu/other/artwork/scn-prbprbprw000001-gnu_wallpaper_01_ld_parabola-r04427x02490px-c_rgb08-noa000r00h00m00s000f_nos_xcf02d08_m0001d8g-atf_lcf_nof.png"
"https://repo.parabola.nu/other/artwork/scn-prbprbprw000001-gnu_wallpaper_01_ld_parabola-r04427x02490px-c_rgb08-noa000r00h00m00s000f_nos_xcf02d08_m0001d8g-atf_lcf_nof.png.sig"
"https://repo.parabola.nu/other/artwork/scn-prbprbprw000001-gnu_wallpaper_01_ld_generic-r04427x02490px-c_rgb08-noa000r00h00m00s000f_nos_xcf02d08_m0001d8g-atf_lcf_nof.png"
"https://repo.parabola.nu/other/artwork/scn-prbprbprw000001-gnu_wallpaper_01_ld_generic-r04427x02490px-c_rgb08-noa000r00h00m00s000f_nos_xcf02d08_m0001d8g-atf_lcf_nof.png.sig"
"https://repo.parabola.nu/other/artwork/scn-prbprbprw000001-gnu_wallpaper_03-r15360x8640px-c_rgb08-noa000r00h00m00s000f_nos_xcf02d08_m0002d3g-atf_lcf_nof.copying")
validpgpkeys=('684D54A189305A9CC95446D36B888913DDB59515')
sha512sums=('9c275669e48f77e4eafee6a1a9116a16aeefd14c41e181e8158b0ceb492c3ed69c973375db60adca1dc3573f3e0c6fa0e9a6076218181cc9515a642e7e82162b'
            '730832bd48acde3d55c688791e93ef7a1a0070c75ec89ace7316c9cecdc74dbd0c68a9404d7be486ac80ff80b34217b3d709cc6f8537a675d654f41d8a836821'
            '39dd9705c73b7de79f6ba191aced40cbba87220eaa08425a3d8ad4ae74e31013380a98696523d84b48fdfb0c1f53d47d250df1eccb0cf5b82b19309b6c7b59bd'
            '9df918446eff86b59d256d44c69f93c2c5d02fb4e1bc4d19ae28d4046af43d9af201584be03333608ab241b800912e8745919ee847df14515bf4fdec323a3e11'
            'eb290b60729b7785d9860c5b09f34e31dec76eba2b1608f5fdda351aacd0dc31b8b1d272279767f4b2c53bb389fd301ffacd50ab87fb4bfc05272d736ec33218'
            '4b2e8aff997a3db5d29345b00d19d7c7182133f0ec667b920d12be09284c4377dc0f9274c488eae8de4bf4ad8f3b3e7543b86e29438f7a8a5f52ce374e17b973'
            '0134a8969fcdb723a3db222bbf81b22c823249ea9628bfaf39db9891466011641947c94a45db07a7d4d6d13f0639b454207bf493fefff125839aaa2136be69d9'
            'a58965a13cc92f83a599a7f77bbe2d58f4d87fc75c0639e8db289b12fdfc56ee079fff2dbddaf508f59fb4614a2ad8a1bd99d94c11ea62cd218be279c69172d7'
            '27690d893b2eb58c38decd60b1d0fffb342a3c92456b141352c1ac1bc082e2a5e238c8f6af798fbbda79e332a46721b6c19c3e81086d9235f4ba0731a38ae5c0')

prepare() {
	cd $srcdir
	## Create license file for the package from one of the .copying image signatures
	mv scn-prbprbprw000001-gnu_wallpaper_03-r15360x8640px-c_rgb08-noa000r00h00m00s000f_nos_xcf02d08_m0002d3g-atf_lcf_nof.copying LICENSE
	## Compress raw png files
	pngcrush -d icons -brute -rem alla *.png
}

package() {
  cd $srcdir
   ### Place License Information##
   install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname
   ## Install all png files to backgrounds folder###
   find *.png -exec install -D -m644 {} ${pkgdir}/usr/share/backgrounds{} \;
   mv ${pkgdir}/usr/share/backgrounds. ${pkgdir}/usr/share/backgrounds ## fix strange period in packaging directory
   rm -rf ${pkgdir}/usr/share/backgrounds/*.sig ## remove uneeded .sig files, we verified them in the PKGBUILD.
}