summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir LAVALLADE2022-12-03 21:07:41 +0100
committerVladimir LAVALLADE2022-12-03 21:07:41 +0100
commit0406be71e7526f1d18f18fa5102bde839e95f5bc (patch)
tree6493835fe1c5a78770b3b7bfe3c58877a634a525
downloadaur-0406be71e7526f1d18f18fa5102bde839e95f5bc.tar.gz
Import fixed version
-rw-r--r--.SRCINFO18
-rw-r--r--2h4u.desktop12
-rw-r--r--PKGBUILD43
3 files changed, 73 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..6aa4826576fa
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = 2h4u
+ pkgdesc = A mix between a Tetris-like game and a wall breaker
+ pkgver = 1.3
+ pkgrel = 6
+ url = http://sourceforge.net/projects/toohardforyou/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = ffmpeg
+ depends = sdl_ttf
+ depends = sdl_mixer
+ depends = sdl_image
+ source = http://downloads.sourceforge.net/project/toohardforyou/2H4U/2H4U%20v1.3/2H4U-1.3_SOURCES.tar.gz
+ source = 2h4u.desktop
+ sha256sums = 2da1e593b43887617c78d2709397be2e57e9f67b1840350430d802d31b18e9f2
+ sha256sums = c87774ef50aaa6c561ab6e6d2a587d4fd7da20afa5a0a21b3d818dbeac43a778
+
+pkgname = 2h4u
diff --git a/2h4u.desktop b/2h4u.desktop
new file mode 100644
index 000000000000..d09a9f2f6693
--- /dev/null
+++ b/2h4u.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Version=1.0
+Exec=2h4u
+Type=Application
+Categories=Game;
+Name=2H4U
+GenericName=A mix between a Tetris-like game and a wall breaker
+Comment=Too hard for you
+Terminal=false
+StartupNotify=false
+Icon=/usr/share/2h4u/data/images/icone.png
+X-Desktop-File-Install-Version=0.21
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..29f91453433b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: LAVALLADE Vladimir <erus.iluvatar+archlinux@gmail.com>
+# Contributor: Axper Jan <483ken 4t gmail d0t com>
+# Contributor: Dany Martineau <dany.luc.martineau at gmail.com>
+pkgname=2h4u
+pkgver=1.3
+pkgrel=6
+pkgdesc="A mix between a Tetris-like game and a wall breaker"
+arch=('i686' 'x86_64')
+url="http://sourceforge.net/projects/toohardforyou/"
+license=('GPL')
+depends=('sdl_ttf' 'sdl_mixer' 'sdl_image')
+makedepends=('ffmpeg')
+source=("http://downloads.sourceforge.net/project/toohardforyou/2H4U/2H4U%20v1.3/2H4U-1.3_SOURCES.tar.gz"
+ "2h4u.desktop")
+sha256sums=('2da1e593b43887617c78d2709397be2e57e9f67b1840350430d802d31b18e9f2'
+ 'c87774ef50aaa6c561ab6e6d2a587d4fd7da20afa5a0a21b3d818dbeac43a778')
+
+OPTIONS=(!strip)
+
+prepare() {
+ # patch the sound handling to refer to an OGG file instead of an MP3
+ sed -i "s/mp3/ogg/g" ${srcdir}/2H4U/sources/son.cpp
+ # use ffmpeg to convert the provided MP3 audio to an OGG file, since the SDL does not seem to handle the provided file anymore
+ cd ${srcdir}/2H4U/data/sons/
+ ffmpeg -i Musique.mp3 -c:a libvorbis -q:a 4 Musique.ogg
+ rm Musique.mp3
+}
+
+build() {
+ cd ${srcdir}/2H4U/scripts
+ make
+}
+
+package() {
+ mkdir -p ${pkgdir}/usr/share/2h4u
+ mkdir -p ${pkgdir}/usr/share/applications
+ cd $srcdir/2H4U
+ cp -r 2H4U aide data help ${pkgdir}/usr/share/2h4u
+ mkdir -p ${pkgdir}/usr/bin
+ echo -e "#!/bin/sh\ncd /usr/share/2h4u\n./2H4U" > ${pkgdir}/usr/bin/2h4u
+ chmod a+x ${pkgdir}/usr/bin/2h4u
+ cp ${srcdir}/2h4u.desktop ${pkgdir}/usr/share/applications
+}