void-packages/srcpkgs/sublime-merge-bin/template

42 lines
1.3 KiB
Bash

# Template file for 'sublime-merge-bin'
pkgname=sublime-merge-bin
version=2039
revision=1
archs="x86_64"
wrksrc=sublime_merge
hostmakedepends="w3m"
depends="libpng gtk+ hicolor-icon-theme desktop-file-utils"
short_desc="New Git client, from the makers of Sublime Text"
maintainer="Adelmo Junior <noblehelm@gmail.com>"
license="custom:EULA"
homepage="https://www.sublimemerge.com"
distfiles="https://download.sublimetext.com/sublime_merge_build_${version}_x64.tar.xz"
checksum=289218c5a06ad7516477456d7e372d01fc0fbeb5761d239835ef442a11200251
_license_checksum=d2ee1cc3f8af74d1eacc960a81fdf1ebe58a9b801bf0b2e2a2302fdefb0ee370
nopie=yes
repository=nonfree
restricted=yes
replaces="sublime-merge>0"
post_extract() {
$XBPS_FETCH_CMD https://www.sublimehq.com/eula
w3m -dump -I utf-8 -T text/html < eula > EULA
filesum="$(xbps-digest EULA)"
if [ "$filesum" != "$_license_checksum" ]; then
msg_error "SHA256 mismatch for EULA:\n$filesum\n"
fi
}
do_install() {
vmkdir "usr/bin"
vmkdir "opt/sublime_merge"
vcopy "*" opt/sublime_merge
vinstall "sublime_merge.desktop" 644 "usr/share/applications/"
for size in 16 32 48 128 256; do
vinstall "Icon/${size}x${size}/sublime-merge.png" 644 "usr/share/icons/hicolor/${size}x${size}/apps/"
done
ln -s /opt/sublime_merge/sublime_merge ${DESTDIR}/usr/bin/subl-merge
vlicense EULA
}