summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Knauer2015-05-31 21:09:10 +0200
committerRobert Knauer2015-05-31 21:09:10 +0200
commit03cd10bd22d629a70c96f9a2db73dce42d30bca2 (patch)
tree08d5db6f25d266c3f743b36bce1e961eb6f731ed
downloadaur-03cd10bd22d629a70c96f9a2db73dce42d30bca2.tar.gz
init
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD46
-rw-r--r--answer.cpp.patch20
-rw-r--r--jeopardy.cpp.patch29
-rw-r--r--main.cpp.patch11
5 files changed, 127 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..47e408725a3e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = jeopardy
+ pkgdesc = Implementation of well known Jeopardy! quiz show in C++ with Qt
+ pkgver = 0.9.6
+ pkgrel = 1
+ url = https://github.com/chlange/jeopardy
+ arch = i686
+ arch = x86_64
+ license = BSD
+ depends = qt4
+ depends = phonon-qt4
+ source = https://github.com/chlange/jeopardy/archive/v0.9.6s.tar.gz
+ source = answer.cpp.patch
+ source = jeopardy.cpp.patch
+ source = main.cpp.patch
+ sha256sums = bc8d79ce0e0212afd70c5ef0568a3ea8f43fafcac4fafe67b258f0d7a19e32f6
+ sha256sums = d411d19e9df1ddd0ab49b9c34cbf1815f0095fec35964ba6be2a7ca46411cb5b
+ sha256sums = 58a8f4509fb9b84b55674122edf4676b6f0b7930b322764c8c7da51fc1e9d89b
+ sha256sums = 36cb038dc503788abf1baf74f837501146469e5193a765c2a08a2a7b2735337f
+
+pkgname = jeopardy
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..74d0d2fc9d6a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Robert Knauer <robert@privatdemail.net>
+
+pkgname=jeopardy
+pkgver=0.9.6
+pkgrel=1
+pkgdesc="Implementation of well known Jeopardy! quiz show in C++ with Qt"
+arch=('i686' 'x86_64')
+url="https://github.com/chlange/jeopardy"
+license=('BSD')
+depends=('qt4' 'phonon-qt4')
+source=(
+ "https://github.com/chlange/${pkgname}/archive/v${pkgver}s.tar.gz"
+ 'answer.cpp.patch'
+ 'jeopardy.cpp.patch'
+ 'main.cpp.patch'
+)
+sha256sums=(
+ 'bc8d79ce0e0212afd70c5ef0568a3ea8f43fafcac4fafe67b258f0d7a19e32f6'
+ 'd411d19e9df1ddd0ab49b9c34cbf1815f0095fec35964ba6be2a7ca46411cb5b'
+ '58a8f4509fb9b84b55674122edf4676b6f0b7930b322764c8c7da51fc1e9d89b'
+ '36cb038dc503788abf1baf74f837501146469e5193a765c2a08a2a7b2735337f'
+)
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}s"
+ for f in answer.cpp jeopardy.cpp main.cpp; do
+ patch -p0 "${f}" "${srcdir}/${f}.patch"
+ done
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}s"
+ qmake-qt4
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}s"
+ install -D -m 755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+ for f in answers/*.jrf; do
+ install -D -m 644 ${f} "${pkgdir}/usr/share/${pkgname}/${f}"
+ done
+ install -D -m 644 images/icon.svg "${pkgdir}/usr/share/${pkgname}/images/icon.svg"
+ install -D -m 644 sound/${pkgname}.wav "${pkgdir}/usr/share/${pkgname}/sound/${pkgname}.wav"
+ install -D -m 644 sound/title.ogg "${pkgdir}/usr/share/${pkgname}/sound/title.ogg"
+}
diff --git a/answer.cpp.patch b/answer.cpp.patch
new file mode 100644
index 000000000000..f4d9a848976a
--- /dev/null
+++ b/answer.cpp.patch
@@ -0,0 +1,20 @@
+--- answer.cpp 2012-08-06 22:56:30.000000000 +0200
++++ answer.cpp.new 2015-03-29 14:39:33.433983097 +0200
+@@ -55,7 +55,7 @@
+ ui->videoPlayer->setVisible(false);
+
+ if(sound)
+- this->music = Phonon::createPlayer(Phonon::NoCategory, Phonon::MediaSource("sound/jeopardy.wav"));
++ this->music = Phonon::createPlayer(Phonon::NoCategory, Phonon::MediaSource("/usr/share/jeopardy/sound/jeopardy.wav"));
+
+ this->isVideo = false;
+ }
+@@ -217,7 +217,7 @@
+
+ void Answer::prependDir(QString *answer)
+ {
+- answer->prepend(QString("/answers/%1/").arg(this->round));
++ answer->prepend(QString("/usr/share/jeopardy/answers/%1/").arg(this->round));
+ answer->prepend(QDir::currentPath());
+ }
+
diff --git a/jeopardy.cpp.patch b/jeopardy.cpp.patch
new file mode 100644
index 000000000000..7e81b9fc69b4
--- /dev/null
+++ b/jeopardy.cpp.patch
@@ -0,0 +1,29 @@
+--- jeopardy.cpp 2012-08-06 22:56:30.000000000 +0200
++++ jeopardy.cpp.new 2015-03-29 14:39:54.657201454 +0200
+@@ -99,7 +99,7 @@
+
+ if(this->sound)
+ {
+- this->music = Phonon::createPlayer(Phonon::NoCategory, Phonon::MediaSource("sound/title.ogg"));
++ this->music = Phonon::createPlayer(Phonon::NoCategory, Phonon::MediaSource("/usr/share/jeopardy/sound/title.ogg"));
+ this->music->play();
+ }
+
+@@ -159,7 +159,7 @@
+ QDir dir;
+ QFile *file;
+
+- this->fileString = QString("answers/%1.jrf").arg(this->round);
++ this->fileString = QString("/usr/share/jeopardy/answers/%1.jrf").arg(this->round);
+ this->fileString = dir.absoluteFilePath(this->fileString);
+
+ file = new QFile(this->fileString);
+@@ -168,7 +168,7 @@
+ {
+ QMessageBox::critical(this, tr("Error"), tr("Could not open round file, please select one by yourself"));
+
+- this->fileString = QFileDialog::getOpenFileName(this, tr("Open File"), "answers/", tr("Jeopardy Round File (*.jrf)"));
++ this->fileString = QFileDialog::getOpenFileName(this, tr("Open File"), "/usr/share/jeopardy/answers/", tr("Jeopardy Round File (*.jrf)"));
+ this->fileString = dir.absoluteFilePath(this->fileString);
+ file = new QFile(this->fileString);
+
diff --git a/main.cpp.patch b/main.cpp.patch
new file mode 100644
index 000000000000..85f32884e67d
--- /dev/null
+++ b/main.cpp.patch
@@ -0,0 +1,11 @@
+--- main.cpp 2012-08-06 22:56:30.000000000 +0200
++++ main.cpp.new 2015-03-29 14:34:50.008851876 +0200
+@@ -32,7 +32,7 @@
+ int main(int argc, char *argv[])
+ {
+ QApplication a(argc, argv);
+- a.setWindowIcon(QIcon("images/icon.svg"));
++ a.setWindowIcon(QIcon("/usr/share/jeopardy/images/icon.svg"));
+ Jeopardy w;
+ w.init();
+ return a.exec();