diff options
author | caltlgin | 2020-10-31 11:41:33 +1300 |
---|---|---|
committer | caltlgin | 2020-10-31 11:41:33 +1300 |
commit | 46789fb94e59e797b82c3db6fd55e84bef0fab26 (patch) | |
tree | 48f216e486923be66fd23e45d2c18142ce195288 | |
download | aur-46789fb94e59e797b82c3db6fd55e84bef0fab26.tar.gz |
Add to AUR
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 57 | ||||
-rw-r--r-- | scorefile.install | 24 | ||||
-rw-r--r-- | tint.png | bin | 0 -> 9306 bytes |
4 files changed, 103 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..efd21b410a69 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = tint-git + pkgdesc = Tetris clone for the terminal + pkgver = r10.f3f757f + pkgrel = 1 + url = https://github.com/DavidGriffith/tint + install = scorefile.install + arch = x86_64 + license = BSD + makedepends = gendesk + makedepends = git + makedepends = imagemagick + depends = hicolor-icon-theme + depends = ncurses + provides = tint + conflicts = tint + source = git+https://github.com/DavidGriffith/tint.git + source = tint.png + sha256sums = SKIP + sha256sums = 86bf162483cf1a18248e07ae979a3fefc9dcfcdc1ba63e5a1335a38210064c34 + +pkgname = tint-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..552face2bcac --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,57 @@ +# Maintainer: Caltlgin Stsodaat <contact@fossdaily.xyz> + +_pkgname='tint' +pkgname="${_pkgname}-git" +pkgver=r10.f3f757f +pkgrel=1 +pkgdesc='Tetris clone for the terminal' +arch=('x86_64') +url='https://github.com/DavidGriffith/tint' +license=('BSD') +depends=('hicolor-icon-theme' 'ncurses') +makedepends=('gendesk' 'git' 'imagemagick') +provides=("${_pkgname}") +conflicts=("${_pkgname}") +install='scorefile.install' +source=("git+${url}.git" + "${_pkgname}.png") +sha256sums=('SKIP' + '86bf162483cf1a18248e07ae979a3fefc9dcfcdc1ba63e5a1335a38210064c34') + +prepare() { + gendesk -f -n \ + --pkgname="${_pkgname}" \ + --pkgdesc="${pkgdesc}" \ + --name="${_pkgname^^}" \ + --comment="${pkgdesc}" \ + --exec="sh -c '/usr/bin/tint -l 1;echo;echo PRESS ENTER;read line'" \ + --icon="${_pkgname}" \ + --terminal='true' \ + --categories='Game' +} + +pkgver() { + cd "${_pkgname}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + make -C "${_pkgname}" +} + +package() { + install -Dvm644 "${_pkgname}.desktop" -t "${pkgdir}/usr/share/applications" + + for i in 16 22 24 32 48 64 96 128; do + convert "${_pkgname}.png" -resize "${i}x${i}" "icon${i}.png" + install -Dvm644 "icon${i}.png" "${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/${_pkgname}.png" + done + + cd "${_pkgname}" + install -Dvm755 "${_pkgname}" -t "${pkgdir}/usr/bin" + install -Dvm644 "${_pkgname}.6" -t "${pkgdir}/usr/share/man/man6" + install -Dvm644 {'NOTES','README.md'} -t "${pkgdir}/usr/share/doc/${_pkgname}" + install -Dvm644 'debian/copyright' "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE" +} + +# vim: ts=2 sw=2 et: diff --git a/scorefile.install b/scorefile.install new file mode 100644 index 000000000000..2ded605deaea --- /dev/null +++ b/scorefile.install @@ -0,0 +1,24 @@ +post_install() { + set -e + scorefile='/var/games/tint.scores' + + if [ ! -e "${scorefile}" ]; then + touch "${scorefile}" + chmod 0664 "${scorefile}" + chown root:games "${scorefile}" + fi + + cat << EOF + +==> To enable savefile functionality; Add your user to the "games" group +==> You will need to logout or reboot for the changes to take effect. + +==> sudo usermod -a -G games \$USER + +EOF +} + +post_remove() { + set -e + rm -f '/var/games/tint.scores' +}
\ No newline at end of file diff --git a/tint.png b/tint.png Binary files differnew file mode 100644 index 000000000000..9db72698222c --- /dev/null +++ b/tint.png |