rpms/powermanga/devel powermanga-0.80-install.patch, NONE, 1.1 powermanga.desktop, NONE, 1.1 powermanga.spec, 1.14, 1.15

Matthias Saou (thias) fedora-extras-commits at redhat.com
Tue Jun 19 17:03:17 UTC 2007


Author: thias

Update of /cvs/extras/rpms/powermanga/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31378

Modified Files:
	powermanga.spec 
Added Files:
	powermanga-0.80-install.patch powermanga.desktop 
Log Message:
Move binary to _bindir and data to _datadir (#218280).


powermanga-0.80-install.patch:

--- NEW FILE powermanga-0.80-install.patch ---
diff -Naupr powermanga-0.80.orig/graphics/Makefile powermanga-0.80/graphics/Makefile
--- powermanga-0.80.orig/graphics/Makefile	2006-04-09 10:19:27.000000000 +0200
+++ powermanga-0.80/graphics/Makefile	2007-06-19 17:55:38.000000000 +0200
@@ -38,7 +38,7 @@ build_triplet = i686-pc-linux-gnu
 host_triplet = i686-pc-linux-gnu
 target_triplet = i686-pc-linux-gnu
 
-pkgdatadir = $(datadir)/games/powermanga/graphics
+pkgdatadir = $(datadir)/powermanga/graphics
 ACLOCAL = ${SHELL} /home/bruno/IM/powermanga/autotools/missing --run aclocal-1.7
 AMDEP_FALSE = #
 AMDEP_TRUE = 
diff -Naupr powermanga-0.80.orig/graphics/Makefile.am powermanga-0.80/graphics/Makefile.am
--- powermanga-0.80.orig/graphics/Makefile.am	2006-04-09 10:17:50.000000000 +0200
+++ powermanga-0.80/graphics/Makefile.am	2007-06-19 17:53:22.000000000 +0200
@@ -1,5 +1,5 @@
 
-pkgdatadir = $(datadir)/games/powermanga/graphics
+pkgdatadir = $(datadir)/powermanga/graphics
 
 dist_pkgdata_DATA = \
 	BIGSTAR0.SPR \
diff -Naupr powermanga-0.80.orig/graphics/Makefile.in powermanga-0.80/graphics/Makefile.in
--- powermanga-0.80.orig/graphics/Makefile.in	2006-04-09 10:19:02.000000000 +0200
+++ powermanga-0.80/graphics/Makefile.in	2007-06-19 17:55:27.000000000 +0200
@@ -38,7 +38,7 @@ build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
 
-pkgdatadir = $(datadir)/games/powermanga/graphics
+pkgdatadir = $(datadir)/powermanga/graphics
 ACLOCAL = @ACLOCAL@
 AMDEP_FALSE = @AMDEP_FALSE@
 AMDEP_TRUE = @AMDEP_TRUE@
diff -Naupr powermanga-0.80.orig/Makefile powermanga-0.80/Makefile
--- powermanga-0.80.orig/Makefile	2006-04-09 10:19:26.000000000 +0200
+++ powermanga-0.80/Makefile	2007-06-19 17:57:49.000000000 +0200
@@ -38,7 +38,7 @@ build_triplet = i686-pc-linux-gnu
 host_triplet = i686-pc-linux-gnu
 target_triplet = i686-pc-linux-gnu
 
-pkgdatadir = $(mandir)
+pkgdatadir = $(mandir)/man6
 ACLOCAL = ${SHELL} /home/bruno/IM/powermanga/autotools/missing --run aclocal-1.7
 AMDEP_FALSE = #
 AMDEP_TRUE = 
diff -Naupr powermanga-0.80.orig/Makefile.am powermanga-0.80/Makefile.am
--- powermanga-0.80.orig/Makefile.am	2005-01-25 06:51:13.000000000 +0100
+++ powermanga-0.80/Makefile.am	2007-06-19 17:57:22.000000000 +0200
@@ -2,6 +2,6 @@
 SUBDIRS = src graphics sounds
 EXTRA_DIST = bootstrap
 
-pkgdatadir = $(mandir)
+pkgdatadir = $(mandir)/man6
 dist_pkgdata_DATA = powermanga.6
 
diff -Naupr powermanga-0.80.orig/Makefile.in powermanga-0.80/Makefile.in
--- powermanga-0.80.orig/Makefile.in	2006-04-09 10:19:02.000000000 +0200
+++ powermanga-0.80/Makefile.in	2007-06-19 17:57:36.000000000 +0200
@@ -38,7 +38,7 @@ build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
 
-pkgdatadir = $(mandir)
+pkgdatadir = $(mandir)/man6
 ACLOCAL = @ACLOCAL@
 AMDEP_FALSE = @AMDEP_FALSE@
 AMDEP_TRUE = @AMDEP_TRUE@
diff -Naupr powermanga-0.80.orig/powermanga.6 powermanga-0.80/powermanga.6
--- powermanga-0.80.orig/powermanga.6	2005-01-25 06:51:11.000000000 +0100
+++ powermanga-0.80/powermanga.6	2007-06-19 18:47:26.000000000 +0200
@@ -99,12 +99,12 @@ make the game easier by giving more bonu
 .B \--hard
 make the game harder
 .SH FILES
-.B /usr/share/games/powermanga/graphics/
+.B /usr/share/powermanga/graphics/
 .br
 .RS
 Graphics files.
 .RE
-.B /usr/share/games/powermanga/sound/
+.B /usr/share/powermanga/sound/
 .br
 .RS
 Sound files.
diff -Naupr powermanga-0.80.orig/sounds/Makefile powermanga-0.80/sounds/Makefile
--- powermanga-0.80.orig/sounds/Makefile	2006-04-09 10:19:27.000000000 +0200
+++ powermanga-0.80/sounds/Makefile	2007-06-19 18:40:49.000000000 +0200
@@ -38,7 +38,7 @@ build_triplet = i686-pc-linux-gnu
 host_triplet = i686-pc-linux-gnu
 target_triplet = i686-pc-linux-gnu
 
-pkgdatadir = $(datadir)/games/powermanga/sounds
+pkgdatadir = $(datadir)/powermanga/sounds
 ACLOCAL = ${SHELL} /home/bruno/IM/powermanga/autotools/missing --run aclocal-1.7
 AMDEP_FALSE = #
 AMDEP_TRUE = 
diff -Naupr powermanga-0.80.orig/sounds/Makefile.am powermanga-0.80/sounds/Makefile.am
--- powermanga-0.80.orig/sounds/Makefile.am	2006-04-09 10:18:08.000000000 +0200
+++ powermanga-0.80/sounds/Makefile.am	2007-06-19 17:53:34.000000000 +0200
@@ -1,5 +1,5 @@
 
-pkgdatadir = $(datadir)/games/powermanga/sounds
+pkgdatadir = $(datadir)/powermanga/sounds
 
 dist_pkgdata_DATA = \
 	bonus1.wav \
diff -Naupr powermanga-0.80.orig/sounds/Makefile.in powermanga-0.80/sounds/Makefile.in
--- powermanga-0.80.orig/sounds/Makefile.in	2006-04-09 10:19:02.000000000 +0200
+++ powermanga-0.80/sounds/Makefile.in	2007-06-19 18:40:44.000000000 +0200
@@ -38,7 +38,7 @@ build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
 
-pkgdatadir = $(datadir)/games/powermanga/sounds
+pkgdatadir = $(datadir)/powermanga/sounds
 ACLOCAL = @ACLOCAL@
 AMDEP_FALSE = @AMDEP_FALSE@
 AMDEP_TRUE = @AMDEP_TRUE@
diff -Naupr powermanga-0.80.orig/src/linuxroutines.cpp powermanga-0.80/src/linuxroutines.cpp
--- powermanga-0.80.orig/src/linuxroutines.cpp	2006-03-26 17:26:20.000000000 +0200
+++ powermanga-0.80/src/linuxroutines.cpp	2007-06-19 18:48:46.000000000 +0200
@@ -447,7 +447,7 @@ int chaine_cmp(char *_pChaine1, char *_p
 //------------------------------------------------------------------------------
 static const char      *data_directories[]=
 { ".",                                                         // Normally unused, except when running from the source directory...
-  0                                                            // Special value meaning "$(PREFIX)/share/games/powermanga/"
+  0                                                            // Special value meaning "$(PREFIX)/share/powermanga/"
                                                                // Also marks end of list
 };
 static char pathstring[256];
@@ -456,11 +456,11 @@ char *locate_data_file(const char *const
 {
   if(name == 0) return 0;
   if(*name == '/') return strdup(name);                        // Guillaume Cottenceau (2001-03-15) replace "return 0;" by "strdup(name);"
-                                                               // En effet, nous sommes dans le cas ou le programme recherche dans /usr/share/games/powermanga
+                                                               // En effet, nous sommes dans le cas ou le programme recherche dans /usr/share/powermanga
   for(const char **p = data_directories;; p++)
   { char                   *pathname;
     if(*p == 0)
-    { const char             *subdir = "/share/games/powermanga/";
+    { const char             *subdir = "/share/powermanga/";
 	  pathname = &pathstring[0];
       /*pathname=(char *)malloc(strlen(nomprefix) + strlen(subdir) + strlen(name) + 1);
       if(pathname == 0)
diff -Naupr powermanga-0.80.orig/src/Makefile powermanga-0.80/src/Makefile
--- powermanga-0.80.orig/src/Makefile	2006-04-09 10:19:26.000000000 +0200
+++ powermanga-0.80/src/Makefile	2007-06-19 17:54:51.000000000 +0200
@@ -133,7 +133,7 @@ target_cpu = i686
 target_os = linux-gnu
 target_vendor = pc
 
-gamesdir = $(prefix)/games
+gamesdir = $(prefix)/bin
 scoredir = /var/games
 score = powermanga.hi
 
diff -Naupr powermanga-0.80.orig/src/Makefile.am powermanga-0.80/src/Makefile.am
--- powermanga-0.80.orig/src/Makefile.am	2006-04-09 10:17:39.000000000 +0200
+++ powermanga-0.80/src/Makefile.am	2007-06-19 17:52:41.000000000 +0200
@@ -1,5 +1,5 @@
 
-gamesdir = $(prefix)/games
+gamesdir = $(prefix)/bin
 scoredir = /var/games
 score = powermanga.hi
 
diff -Naupr powermanga-0.80.orig/src/Makefile.in powermanga-0.80/src/Makefile.in
--- powermanga-0.80.orig/src/Makefile.in	2006-04-09 10:19:03.000000000 +0200
+++ powermanga-0.80/src/Makefile.in	2007-06-19 17:55:00.000000000 +0200
@@ -133,7 +133,7 @@ target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
 
-gamesdir = $(prefix)/games
+gamesdir = $(prefix)/bin
 scoredir = /var/games
 score = powermanga.hi
 


--- NEW FILE powermanga.desktop ---
[Desktop Entry]
Name=Powermanga
Comment=Arcade 2D shoot-them-up game
Icon=powermanga
Exec=powermanga
Terminal=false
Type=Application
Categories=Game;ArcadeGame;
Encoding=UTF-8


Index: powermanga.spec
===================================================================
RCS file: /cvs/extras/rpms/powermanga/devel/powermanga.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- powermanga.spec	28 Aug 2006 12:28:48 -0000	1.14
+++ powermanga.spec	19 Jun 2007 17:02:37 -0000	1.15
@@ -1,18 +1,17 @@
 Summary: Arcade 2D shoot-them-up game
 Name: powermanga
 Version: 0.80
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: GPL
 Group: Amusements/Games
 URL: http://linux.tlk.fr/games/Powermanga/
 Source0: http://linux.tlk.fr/games/Powermanga/download/powermanga-%{version}.tgz
 Source1: powermanga.png
+Source2: powermanga.desktop
+Patch0: powermanga-0.80-install.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 BuildRequires: SDL-devel, SDL_mixer-devel, zlib-devel, desktop-file-utils
-# Use monolithic X up to FC4, and modular X for FC5+ and non-Fedora
-%if %{!?fedora:6}%{?fedora} >= 5
 BuildRequires: libXt-devel, libXxf86dga-devel, libXxf86vm-devel
-%endif
 
 %description
 Powermanga is an arcade 2D shoot-them-up game with 41 levels and more than
@@ -21,23 +20,7 @@
 
 %prep
 %setup -q
-
-%{__cat} > %{name}.desktop << EOF
-[Desktop Entry]
-Name=Powermanga
-Comment=Arcade 2D shoot-them-up game
-Icon=powermanga.png
-Exec=powermanga
-Terminal=false
-Type=Application
-Categories=Application;Game;ArcadeGame;
-Encoding=UTF-8
-EOF
-
-%{__cat} > %{name}.sh << 'EOF'
-#!/bin/bash
-exec %{_prefix}/games/powermanga "$@"
-EOF
+%patch0 -p1 -b .install
 
 
 %build
@@ -49,57 +32,64 @@
 %{__rm} -rf %{buildroot}
 %{__make} install DESTDIR=%{buildroot}
 
-# Install wrapper script
-%{__install} -D -m 0755 %{name}.sh %{buildroot}%{_bindir}/powermanga
-
 # Allow stripping, g+s will be set back in %%files
-%{__chmod} g-s %{buildroot}%{_prefix}/games/powermanga
-
-# Fix location of the man page
-%{__mkdir_p} %{buildroot}%{_mandir}/man6/
-%{__mv} %{buildroot}%{_prefix}/share/man/powermanga.6 \
-        %{buildroot}%{_mandir}/man6/
+%{__chmod} g-s %{buildroot}%{_bindir}/powermanga
 
 # Install pixmap for the menu entry
 %{__install} -D -p -m 0644 %{SOURCE1} \
-    %{buildroot}%{_datadir}/pixmaps/powermanga.png
+    %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/powermanga.png
 
 # Install menu entry
 %{__mkdir_p} %{buildroot}%{_datadir}/applications
 desktop-file-install \
-    --vendor fedora \
-    --add-category X-Fedora \
+    --vendor "" \
+    --mode 0644 \
     --dir %{buildroot}%{_datadir}/applications \
-    %{name}.desktop
+    %{SOURCE2}
 
 # Workaround for the "texts" dir not being installed, although it's needed
-%{__mkdir_p} %{buildroot}%{_datadir}/games/powermanga/texts
+%{__mkdir_p} %{buildroot}%{_datadir}/powermanga/texts
 %{__install} -p -m 0644 texts/*.txt \
-    %{buildroot}%{_datadir}/games/powermanga/texts/
+    %{buildroot}%{_datadir}/powermanga/texts/
 echo "Lang=en" > \
-    %{buildroot}%{_datadir}/games/powermanga/texts/config.ini
+    %{buildroot}%{_datadir}/powermanga/texts/config.ini
 
 
 %clean
 %{__rm} -rf %{buildroot}
 
 
+%post
+touch --no-create %{_datadir}/icons/hicolor || :
+%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+
+%postun
+touch --no-create %{_datadir}/icons/hicolor || :
+%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+
+
 %files
-%defattr(-, root, root, 0755)
+%defattr(-,root,root,-)
 %doc AUTHORS CHANGES COPYING README
-%{_bindir}/powermanga
-%attr(2755, root, games) %{_prefix}/games/powermanga
-%{_datadir}/games/powermanga/
-%config(noreplace) %{_datadir}/games/powermanga/texts/config.ini
-%{_datadir}/pixmaps/powermanga.png
+%attr(2755, root, games) %{_bindir}/powermanga
+%{_datadir}/applications/%{name}.desktop
+%{_datadir}/icons/hicolor/48x48/apps/powermanga.png
+%{_datadir}/powermanga/
+%config(noreplace) %{_datadir}/powermanga/texts/config.ini
 %{_mandir}/man6/powermanga.6*
 %config(noreplace) %attr(664, root, games) %{_var}/games/powermanga.hi
 %config(noreplace) %attr(664, root, games) %{_var}/games/powermanga.hi-easy
 %config(noreplace) %attr(664, root, games) %{_var}/games/powermanga.hi-hard
-%{_datadir}/applications/*-%{name}.desktop
 
 
 %changelog
+* Tue Jun 19 2007 Matthias Saou <http://freshrpms.net/> 0.80-4
+- Move binary to _bindir and data to _datadir, removing "games" prefixes since
+  the guidelines now say so. This should fix prelink's problems (#218280).
+- Include patch to acheive the above, move the man6 hack to there too.
+- Externalize the desktop file.
+- Move icon from pixmaps to 48x48 hicolor, add scriplets.
+
 * Mon Aug 28 2006 Matthias Saou <http://freshrpms.net/> 0.80-3
 - FC6 rebuild.
 




More information about the fedora-extras-commits mailing list