[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/pipepanic/FC-5 pipepanic-0.1.3-Makefile.patch, NONE, 1.1 pipepanic-0.1.3-window-title.patch, NONE, 1.1 pipepanic.desktop, NONE, 1.1 pipepanic.spec, NONE, 1.1



Author: musuruan

Update of /cvs/extras/rpms/pipepanic/FC-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2166/FC-5

Added Files:
	pipepanic-0.1.3-Makefile.patch 
	pipepanic-0.1.3-window-title.patch pipepanic.desktop 
	pipepanic.spec 
Log Message:
First import


pipepanic-0.1.3-Makefile.patch:

--- NEW FILE pipepanic-0.1.3-Makefile.patch ---
--- Makefile.orig	2007-04-08 15:31:31.000000000 +0200
+++ Makefile	2007-04-08 15:32:57.000000000 +0200
@@ -4,7 +4,7 @@
 
 # Settings for x86.
 CC=gcc
-CFLAGS=-O2 -Wall -pedantic `sdl-config --cflags`
+CFLAGS+=`sdl-config --cflags`
 LINK=gcc
 LDFLAGS=
 LIBS=`sdl-config --libs`

pipepanic-0.1.3-window-title.patch:

--- NEW FILE pipepanic-0.1.3-window-title.patch ---
diff -ur pipepanic-0.1.3-source/main.c pipepanic-0.1.3-source.new/main.c
--- pipepanic-0.1.3-source/main.c	2006-05-16 22:11:29.000000000 +0200
+++ pipepanic-0.1.3-source.new/main.c	2007-05-01 22:04:36.000000000 +0200
@@ -101,6 +101,7 @@
 #endif
 int main(int argc, char *argv[]) {
 	int count, count2;
+	SDL_Surface     *icon;
 	
 	/* Initialise the highscoreboard array because there may not yet
 	   be a saved highscore[board]/rc file */
@@ -178,6 +179,13 @@
 	printf("Setting video mode %ix%i\n", xres, yres);
 	#endif
 	
+	icon = SDL_LoadBMP("/usr/share/pipepanic/icon.bmp");
+	if (icon) {
+		SDL_SetColorKey(icon, SDL_SRCCOLORKEY,
+			SDL_MapRGB(icon->format, 255, 0, 255));
+		SDL_WM_SetIcon(icon, NULL);
+	}
+	
 	/* Set SDL video mode */
 	screen = SDL_SetVideoMode(xres, yres, 16, SDL_DOUBLEBUF | SDL_HWSURFACE | SDL_ANYFORMAT | sdl_fullscreen);
 	if(screen == NULL) {
@@ -185,6 +193,8 @@
 		exit(1);
 	}
 	
+	SDL_WM_SetCaption("Pipepanic version " VERSION, "Pipepanic");
+	
 	#ifdef DEBUG	
 	printf ("Loading bitmaps\n");
 	#endif


--- NEW FILE pipepanic.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=Pipepanic 
Comment=A pipe connecting game
Exec=pipepanic
Icon=pipepanic.png
Terminal=false
Type=Application
Categories=Game;LogicGame



--- NEW FILE pipepanic.spec ---
Name: pipepanic
Version: 0.1.3
Release: 2%{?dist}
Summary: A pipe connecting game       

Group: Amusements/Games
License: GPL
URL: http://www.users.waitrose.com/~thunor/pipepanic/
Source0: http://www.users.waitrose.com/~thunor/pipepanic/dload/%{name}-%{version}-source.tar.gz
Source1: pipepanic.desktop
Patch0: pipepanic-0.1.3-Makefile.patch
# Hans de Goede
Patch1: pipepanic-0.1.3-window-title.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: SDL-devel
BuildRequires: desktop-file-utils
BuildRequires: ImageMagick
Requires: hicolor-icon-theme


%description
Pipepanic is a pipe connecting game using libSDL. Connect as many 
different shaped pipes together as possible within the time given.


%prep
%setup -q -n %{name}-%{version}-source
%patch0 -p0
%patch1 -p1

# Fix DATADIR
sed -i 's:/opt/QtPalmtop/share/pipepanic/:%{_datadir}/%{name}/:' main.h


%build
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"


%install
rm -rf %{buildroot}

# Install binary
mkdir -p %{buildroot}%{_bindir}
install -m 755 pipepanic %{buildroot}%{_bindir}

# Install data files
mkdir -p %{buildroot}%{_datadir}/%{name}
install -m 644 *.bmp %{buildroot}%{_datadir}/%{name}/

# Install window icon (needed by patch1)
convert PipepanicIcon32.png bmp3:- | \
  convert - -fill '#FF00FF' -opaque black -colors 256 \
    -compress none bmp3:icon.bmp
install -m 644 icon.bmp %{buildroot}%{_datadir}/%{name}/

# Install icons
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/{16x16,32x32,48x48,64x64}/apps
install -m 644 PipepanicIcon16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
install -m 644 PipepanicIcon32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
install -m 644 PipepanicIcon48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
install -m 644 PipepanicIcon64.png %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/%{name}.png

# Install desktop file
mkdir -p %{buildroot}%{_datadir}/applications
desktop-file-install --vendor fedora         \
  --dir %{buildroot}%{_datadir}/applications \
  %{SOURCE1}


%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,-)
%{_bindir}/pipepanic
%{_datadir}/%{name}
%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
%{_datadir}/applications/fedora-%{name}.desktop
%doc AUTHORS ChangeLog COPYING COPYING-ARTWORK README


%changelog
* Wed May 02 2007 Andrea Musuruane <musuruan gmail com> 0.1.3-2%{?dist}
- Fixed package ownership of its datadir
- Changed description
- Added a patch by Hans de Goede to set a window title and icon

* Sun Apr 10 2007 Andrea Musuruane <musuruan gmail com> 0.1.3-1%{?dist}
- Initial release



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]