[arch-commits] Commit in puzzles/repos/community-i686 (3 files)

Jakob Gruber schuay at archlinux.org
Sat Jan 17 08:10:36 UTC 2015


    Date: Saturday, January 17, 2015 @ 09:10:35
  Author: schuay
Revision: 126031

archrelease: copy trunk to community-i686

Added:
  puzzles/repos/community-i686/PKGBUILD
    (from rev 126030, puzzles/trunk/PKGBUILD)
  puzzles/repos/community-i686/puzzles.install
    (from rev 126030, puzzles/trunk/puzzles.install)
Deleted:
  puzzles/repos/community-i686/PKGBUILD

-----------------+
 PKGBUILD        |  110 ++++++++++++++++++++++++++++++++++--------------------
 puzzles.install |   19 +++++++++
 2 files changed, 90 insertions(+), 39 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2015-01-17 08:10:19 UTC (rev 126030)
+++ PKGBUILD	2015-01-17 08:10:35 UTC (rev 126031)
@@ -1,39 +0,0 @@
-# Contributor: Geoffroy Carrier <geoffroy.carrier at koon.fr>
-# Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
-# Maintainer: schuay <jakob.gruber at gmail.com>
-
-pkgname=puzzles
-pkgver=10282
-pkgrel=1
-pkgdesc="Simon Tatham's Portable Puzzle Collection"
-arch=('i686' 'x86_64')
-url="http://www.chiark.greenend.org.uk/~sgtatham/puzzles/"
-license=('MIT')
-makedepends=('pkgconfig' 'subversion')
-depends=('gtk2')
-source=("svn://svn.tartarus.org/sgt/puzzles#revision=$pkgver")
-md5sums=("SKIP")
-
-build() {
-    cd ${srcdir}/${pkgname}
-
-    ./mkfiles.pl
-    
-    sed -i 's|\$(gamesdir)|\$(bindir)|' Makefile.gtk
-
-    make -f Makefile.gtk prefix=/usr
-}
-
-package() {
-    cd ${srcdir}/${pkgname}
-
-    install -d ${pkgdir}/usr/{bin,share/licenses/${pkgname}}
-    install -Dm644 LICENCE ${pkgdir}/usr/share/licenses/${pkgname}/
-
-    make -f Makefile.gtk prefix=/usr DESTDIR=${pkgdir} install
-
-    #fix FS#14600
-    mv ${pkgdir}/usr/bin/net ${pkgdir}/usr/bin/puzzles-net
-    mv ${pkgdir}/usr/bin/cube ${pkgdir}/usr/bin/puzzles-cube
-    mv ${pkgdir}/usr/bin/blackbox ${pkgdir}/usr/bin/puzzles-blackbox
-}

Copied: puzzles/repos/community-i686/PKGBUILD (from rev 126030, puzzles/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2015-01-17 08:10:35 UTC (rev 126031)
@@ -0,0 +1,71 @@
+# Contributor: Geoffroy Carrier <geoffroy.carrier at koon.fr>
+# Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
+# Maintainer: schuay <jakob.gruber at gmail.com>
+
+pkgname=puzzles
+pkgver=20150117
+pkgrel=1
+pkgdesc="Simon Tatham's Portable Puzzle Collection"
+arch=('i686' 'x86_64')
+url="http://www.chiark.greenend.org.uk/~sgtatham/puzzles/"
+license=('MIT')
+makedepends=('pkgconfig' 'subversion' 'xorg-server-xvfb' 'imagemagick' 'git')
+depends=('gtk2' 'desktop-file-utils')
+install=puzzles.install
+source=("git://git.tartarus.org/simon/puzzles.git#commit=cca302c01")
+md5sums=("SKIP")
+
+prepare() {
+    cd ${srcdir}/${pkgname}
+
+    # Generate the makefiles.
+    ./mkfiles.pl
+    sed -i 's|\$(gamesdir)|\$(bindir)|' Makefile.gtk
+
+    # Tweak desktop file generation to use proper icon paths.
+    sed -i 's_\$icondir\/\$id-48d24.png_$id_' desktop.pl
+}
+
+build() {
+    cd ${srcdir}/${pkgname}
+    make -f Makefile.gtk prefix=/usr
+
+    # Generate icons.
+    cd ${srcdir}/${pkgname}/icons
+    xvfb-run make pngicons
+}
+
+package() {
+    # Install the icons.
+    cd ${srcdir}/${pkgname}/icons
+
+    install -d ${pkgdir}/usr/share/icons/hicolor/48x48/
+    for oldname in *-48d24.png; do
+        newname=$(sed 's/\(\w*\)-48d24.png/\1.png/' <<< ${oldname})
+        install -Dm644 ${oldname} ${pkgdir}/usr/share/icons/hicolor/48x48/${newname}
+    done
+
+    # Generate .desktop files.
+    cd ${srcdir}/${pkgname}
+
+    install -d ${pkgdir}/usr/share/applications
+    ./desktop.pl ${pkgdir}/usr/share/applications \
+                 /usr/bin \
+                 /usr/share/icons/
+
+    # And finally, install the games.
+    cd ${srcdir}/${pkgname}
+
+    install -d ${pkgdir}/usr/{bin,share/licenses/${pkgname}}
+    install -Dm644 LICENCE ${pkgdir}/usr/share/licenses/${pkgname}/
+
+    make -f Makefile.gtk prefix=/usr DESTDIR=${pkgdir} install
+
+    # Fix FS#14600 (name conflicts with other packages).
+    for oldname in net cube blackbox; do
+        newname=puzzles-${oldname}
+        mv ${pkgdir}/usr/bin/${oldname} ${pkgdir}/usr/bin/${newname}
+        sed -i "s_Exec=/usr/bin/${oldname}_Exec=/usr/bin/${newname}_" \
+            ${pkgdir}/usr/share/applications/${oldname}.desktop
+    done
+}

Copied: puzzles/repos/community-i686/puzzles.install (from rev 126030, puzzles/trunk/puzzles.install)
===================================================================
--- puzzles.install	                        (rev 0)
+++ puzzles.install	2015-01-17 08:10:35 UTC (rev 126031)
@@ -0,0 +1,19 @@
+pkgname=puzzles
+
+post_install() {
+  update-desktop-database -q
+  gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+pre_upgrade() {
+  pre_remove $1
+}
+
+post_upgrade() {
+  post_install $1
+}
+
+pre_remove() {
+  gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+



More information about the arch-commits mailing list