rpms/crystal-stacker/devel crystal-stacker-1.5-fixes.patch, NONE, 1.1 crystal-stacker-theme-editor.desktop, NONE, 1.1 crystal-stacker.desktop, NONE, 1.1 crystal-stacker.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Sun Apr 9 07:30:54 UTC 2006


Author: jwrdegoede

Update of /cvs/extras/rpms/crystal-stacker/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20718/devel

Modified Files:
	.cvsignore sources 
Added Files:
	crystal-stacker-1.5-fixes.patch 
	crystal-stacker-theme-editor.desktop crystal-stacker.desktop 
	crystal-stacker.spec 
Log Message:
auto-import crystal-stacker-1.5-0.pre.2 on branch devel from crystal-stacker-1.5-0.pre.2.src.rpm

crystal-stacker-1.5-fixes.patch:

--- NEW FILE crystal-stacker-1.5-fixes.patch ---
--- crystal-stacker-1.5/cs/source/Makefile.unix.fixes	2006-03-21 19:07:56.000000000 +0100
+++ crystal-stacker-1.5/cs/source/Makefile.unix	2006-04-07 00:25:54.000000000 +0200
@@ -1,6 +1,6 @@
-PREFIX  = /home/opt
+PREFIX  = /usr/local
 DATADIR = $(PREFIX)/share/$(TARGET)
-CFLAGS  = -g -Wall  -Wno-deprecated-declarations -O2 
+CFLAGS  = -g -Wall -O2 -fsigned-char
 LDFLAGS = `allegro-config --libs` -laldmb -ldumb
 DEFINES = -DDATADIR=\"$(DATADIR)/\"
 OBJS    =    animate.o  misc.o   cs2bd.o     cs2ns.o    game.o      keys.o   \
@@ -21,9 +21,9 @@
 	mkdir -p $(PREFIX)/bin
 	install -p -m 755 $(TARGET) $(PREFIX)/bin
 	mkdir -p $(DATADIR)
-	install -p -m 644 ../../distro/cs.dat $(DATADIR)
-	install -p -m 644 ../../distro/cs.cth $(DATADIR)
-	install -p -m 644 ../../distro/cs.xm $(DATADIR)
+	install -p -m 644 ../cs.dat $(DATADIR)
+	install -p -m 644 ../cs.cth $(DATADIR)
+	install -p -m 644 ../cs.xm $(DATADIR)
 	
 clean:
 	rm -f $(OBJS) $(TARGET) *~
--- crystal-stacker-1.5/cs/source/t3ssal.c.fixes	2006-03-24 20:24:54.000000000 +0100
+++ crystal-stacker-1.5/cs/source/t3ssal.c	2006-04-07 00:25:54.000000000 +0200
@@ -7,13 +7,12 @@
 #define __USE_GNU
 #include <allegro.h>
 #include <aldumb.h> 
-#include <unistd.h>
-#ifndef ALLEGRO_WINDOWS
-	#include <pthread.h>
-#endif
 #include "t3ssal.h"
 #include "mywav.h"
-
+#ifdef T3SS_PTHREADS
+#include <unistd.h>
+#include <pthread.h>
+#endif
 
 
 int t3ss_effects_channels =  4; // how many channels for sound effects
@@ -31,14 +30,12 @@
 int t3ss_music_pattern =     0;
 
 /* dumb / mod(music) playing related vars */
-static char t3ss_mod_fn[128];
 static DUH *t3ss_duh = NULL;
 static AL_DUH_PLAYER *t3ss_duh_player = NULL;
-static DUH_SIGRENDERER * t3ss_sigrenderer = NULL;
 
-#ifndef ALLEGRO_WINDOWS
-	static pthread_t t3ss_duh_player_thread;
-	static pthread_mutex_t t3ss_duh_player_mutex;
+#ifdef T3SS_PTHREADS
+static pthread_t t3ss_duh_player_thread;
+static pthread_mutex_t t3ss_duh_player_mutex;
 #endif
 
 
@@ -63,9 +60,9 @@
 
         /* init dumb */
         dumb_register_packfiles();
-        #ifndef ALLEGRO_WINDOWS
-        	pthread_mutex_init(&t3ss_duh_player_mutex, NULL);
-        #endif
+#ifdef T3SS_PTHREADS
+        pthread_mutex_init(&t3ss_duh_player_mutex, NULL);
+#endif
         
         t3ss_initialized = 1;
     }
@@ -109,16 +106,6 @@
 void t3ss_enable_music(void)
 {
     t3ss_music_on = 1;
-    if (t3ss_duh) {
-	    #ifndef ALLEGRO_WINDOWS
-        	pthread_mutex_lock(&t3ss_duh_player_mutex);
-        #endif
-        al_resume_duh(t3ss_duh_player);
-        #ifndef ALLEGRO_WINDOWS
-	        pthread_mutex_unlock(&t3ss_duh_player_mutex);
-	    #endif
-        t3ss_music_playing = 1;
-    }
 }
 
 void t3ss_disable_effects(void)
@@ -128,26 +115,21 @@
 
 void t3ss_disable_music(void)
 {
+    if (t3ss_duh_player)
+        t3ss_stop_mod();
     t3ss_music_on = 0;
-    if (t3ss_duh) {
-	    #ifndef ALLEGRO_WINDOWS
-        	pthread_mutex_lock(&t3ss_duh_player_mutex);
-        #endif
-        al_pause_duh(t3ss_duh_player);
-	    #ifndef ALLEGRO_WINDOWS
-	        pthread_mutex_unlock(&t3ss_duh_player_mutex);
-	    #endif
-        t3ss_music_playing = 0;
-    }
 }
 
-#ifndef ALLEGRO_WINDOWS
+
+#ifdef T3SS_PTHREADS
 static void *t3ss_duh_player_thread_function(void *arg)
 {
     while(1)
     {
         pthread_mutex_lock(&t3ss_duh_player_mutex);
-        al_poll_duh(t3ss_duh_player);
+        /* this may be nuked if things fail in t3ss_set_music_pattern */
+        if (t3ss_duh_player)
+            al_poll_duh(t3ss_duh_player);
         pthread_mutex_unlock(&t3ss_duh_player_mutex);
         pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
         usleep(10000);
@@ -162,10 +144,10 @@
     DUMB_IT_SIGDATA *sigdata;
     DUH_SIGRENDERER *renderer;
     
-    if (!t3ss_initialized)
+    if (!t3ss_initialized || !t3ss_music_on)
         return 0;
         
-    if (t3ss_duh)
+    if (t3ss_duh_player)
         t3ss_stop_mod();
     
     t3ss_duh = dumb_load_xm_quick(fn);
@@ -191,7 +173,7 @@
     }
 
     t3ss_duh_player = al_duh_encapsulate_sigrenderer(renderer,
-        t3ss_music_volume/100.0f, 2048, t3ss_freq);
+        t3ss_music_volume/100.0f, 4096, t3ss_freq);
     if (!t3ss_duh_player)
     {
         duh_end_sigrenderer(renderer);
@@ -199,24 +181,19 @@
         t3ss_duh = NULL;
         return 0;
     }
-    
-    if (!t3ss_music_on)
-        al_pause_duh(t3ss_duh_player);
-    
-	#ifndef ALLEGRO_WINDOWS
+        
+#ifdef T3SS_PTHREADS
     if (pthread_create(&t3ss_duh_player_thread, NULL,
             t3ss_duh_player_thread_function, NULL))
     {
         al_stop_duh(t3ss_duh_player);
-        unload_duh(t3ss_duh);
         t3ss_duh_player = NULL;
+        unload_duh(t3ss_duh);
         t3ss_duh = NULL;
         return 0;
     }
-	#endif
+#endif
 
-    if (fn != t3ss_mod_fn)
-        snprintf(t3ss_mod_fn, sizeof(t3ss_mod_fn), "%s", fn);
     t3ss_music_playing = 1;
     return 1;
 }
@@ -225,35 +202,36 @@
 /* stop sound playback */
 void t3ss_stop_mod(void)
 {
-    if (t3ss_duh)
+    if (t3ss_duh_player)
     {
         /* stop the player thread */
-        #ifndef ALLEGRO_WINDOWS
+#ifdef T3SS_PTHREADS
         pthread_cancel(t3ss_duh_player_thread);
         pthread_join(t3ss_duh_player_thread, NULL);
-        #endif
+#endif
         /* and clean up everything */
         al_stop_duh(t3ss_duh_player);
-        unload_duh(t3ss_duh);
         t3ss_duh_player = NULL;
+        unload_duh(t3ss_duh);
         t3ss_duh = NULL;
         t3ss_music_playing = 0;
     }
 }
 
+
 /* set the music volume */
 void t3ss_set_music_volume(int volume)
 {
     t3ss_music_volume = volume;
-    if (t3ss_duh)
+    if (t3ss_duh_player)
     {
-	    #ifndef ALLEGRO_WINDOWS
-        	pthread_mutex_lock(&t3ss_duh_player_mutex);
-        #endif
+#ifdef T3SS_PTHREADS
+        pthread_mutex_lock(&t3ss_duh_player_mutex);
+#endif
         al_duh_set_volume(t3ss_duh_player, t3ss_music_volume/100.0f);
-	    #ifndef ALLEGRO_WINDOWS
-	        pthread_mutex_unlock(&t3ss_duh_player_mutex);
-	    #endif
+#ifdef T3SS_PTHREADS
+        pthread_mutex_unlock(&t3ss_duh_player_mutex);
+#endif
     }
 }
 
@@ -269,13 +247,39 @@
 void t3ss_set_music_pattern(int patnum)
 {
     t3ss_music_pattern = patnum;
-    if (t3ss_duh)
+    if (t3ss_duh_player)
     {
-		al_stop_duh(t3ss_duh_player);
-		t3ss_sigrenderer = dumb_it_start_at_order(t3ss_duh, 2, patnum);
-		t3ss_duh_player = al_duh_encapsulate_sigrenderer(t3ss_sigrenderer, 1.0, 4096, 22050);
-		t3ss_set_music_volume(t3ss_music_volume);
-	}
+        DUH_SIGRENDERER *renderer;
+        if (t3ss_music_pattern >= t3ss_num_patterns)
+            t3ss_music_pattern = 0;
+#ifdef T3SS_PTHREADS
+        pthread_mutex_lock(&t3ss_duh_player_mutex);
+#endif
+        al_stop_duh(t3ss_duh_player);
+        t3ss_duh_player = NULL;
+
+        renderer = dumb_it_start_at_order(t3ss_duh, 2, t3ss_music_pattern);
+        if (renderer)
+            t3ss_duh_player = al_duh_encapsulate_sigrenderer(renderer,
+                t3ss_music_volume/100.0f, 4096, t3ss_freq);
+
+        if (!t3ss_duh_player)
+        {
+            if (renderer)
+                duh_end_sigrenderer(renderer);
+            unload_duh(t3ss_duh);
+            t3ss_duh = NULL;
+        }
+#ifdef T3SS_PTHREADS
+        pthread_mutex_unlock(&t3ss_duh_player_mutex);
+        /* stop the player thread? */
+        if (!t3ss_duh_player)
+        {
+            pthread_cancel(t3ss_duh_player_thread);
+            pthread_join(t3ss_duh_player_thread, NULL);
+        }
+#endif
+    }
 }
 
 
@@ -413,24 +417,40 @@
 
 void t3ss_pause_music(void)
 {
-	if(t3ss_duh_player)
-	{
-		al_pause_duh(t3ss_duh_player);
-	}
+    if(t3ss_duh_player)
+    {
+#ifdef T3SS_PTHREADS
+        pthread_mutex_lock(&t3ss_duh_player_mutex);
+#endif
+        al_pause_duh(t3ss_duh_player);
+#ifdef T3SS_PTHREADS
+        pthread_mutex_unlock(&t3ss_duh_player_mutex);
+#endif
+        t3ss_music_playing = 0;
+    }
 }
 
 void t3ss_resume_music(void)
 {
-	if(t3ss_duh_player)
-	{
-		al_resume_duh(t3ss_duh_player);
-	}
+    if (t3ss_duh_player)
+    {
+#ifdef T3SS_PTHREADS
+        pthread_mutex_lock(&t3ss_duh_player_mutex);
+#endif
+        al_resume_duh(t3ss_duh_player);
+#ifdef T3SS_PTHREADS
+        pthread_mutex_unlock(&t3ss_duh_player_mutex);
+#endif
+        t3ss_music_playing = 1;
+    }
 }
 
+#ifndef T3SS_PTHREADS
 void t3ss_poll(void)
 {
-	if(t3ss_duh_player && t3ss_duh)
-	{
-		al_poll_duh(t3ss_duh_player);
-	}
+    if(t3ss_duh_player)
+    {
+        al_poll_duh(t3ss_duh_player);
+    }
 }
+#endif
--- crystal-stacker-1.5/cs/source/cs.c.fixes	2006-03-24 19:41:48.000000000 +0100
+++ crystal-stacker-1.5/cs/source/cs.c	2006-04-07 00:25:54.000000000 +0200
@@ -127,7 +127,6 @@
 /* handle graphics mode switching */
 void cs_gfx_mode(int w, int h, PALETTE mpal)
 {
-    int rrate;
     int dw, dh;
 
     /* don't think this works */
@@ -207,7 +206,6 @@
 /* same as above, but sets the mode every time instead of by necessity */
 void cs_gfx_mode_force(int w, int h, PALETTE mpal)
 {
-    int rrate;
     int dw, dh;
 
     /* don't think this works */
--- crystal-stacker-1.5/cs/source/menu.c.fixes	2006-04-07 10:25:04.000000000 +0200
+++ crystal-stacker-1.5/cs/source/menu.c	2006-04-07 10:26:00.000000000 +0200
@@ -1441,9 +1441,13 @@
 /* select a new theme */
 void select_theme(void)
 {
-	t3ss_pause_music();
+#ifndef T3SS_PTHREADS
+    t3ss_pause_music();
+#endif	
     file_select_ex("Select theme file...", cs_options.theme_name, "CTH", 256, 320, 240);
-	t3ss_resume_music();
+#ifndef T3SS_PTHREADS
+    t3ss_resume_music();
+#endif
     update_theme_filenames(cs_options.theme_name);
     update_menu_screen();
     while((key[KEY_ESC] || key[KEY_ENTER] || key[KEY_SPACE]));
--- crystal-stacker-1.5/cs/source/t3ssal.h.fixes	2001-07-18 04:55:56.000000000 +0200
+++ crystal-stacker-1.5/cs/source/t3ssal.h	2006-04-07 00:25:54.000000000 +0200
@@ -7,6 +7,11 @@
 extern "C" {
 #endif
 
+/* Do we want to use pthreads? */
+#if !defined(ALLEGRO_WINDOWS) && !defined(T3SS_PTHREADS)
+#define T3SS_PTHREADS
+#endif
+
 #define I_NULL -1 /* provide NULL value for signed integers */
 #define MSAMPLE SAMPLE
 
@@ -39,6 +44,14 @@
 void t3ss_play_sound_ex(MSAMPLE * sp, int chan, int vol, int pan, int freq);
 void t3ss_play_sound_reserved(MSAMPLE * sp, int chan, int pan, int freq);
 int t3ss_place_sound(int x, int width);
+void t3ss_pause_music(void);
+void t3ss_resume_music(void);
+
+#ifdef T3SS_PTHREADS
+#define t3ss_poll()
+#else
+void t3ss_poll(void);
+#endif
 
 #ifdef __cplusplus
 }
--- crystal-stacker-1.5/cs/readme.txt.fixes	2006-03-24 19:02:38.000000000 +0100
+++ crystal-stacker-1.5/cs/readme.txt	2006-04-07 10:27:16.000000000 +0200
@@ -6,6 +6,7 @@
 Please see the "Contacting Us" section of this document if you need to contact
 us for any reason.
 
+
 Disclaimer
 ----------
 
--- crystal-stacker-1.5/ce/source/Makefile.unix.fixes	2006-03-21 19:07:56.000000000 +0100
+++ crystal-stacker-1.5/ce/source/Makefile.unix	2006-04-07 00:25:54.000000000 +0200
@@ -1,6 +1,6 @@
-PREFIX  = /home/opt
+PREFIX  = /usr/local
 DATADIR = $(PREFIX)/share/crystal-stacker
-CFLAGS  = -g -Wall -Wno-deprecated-declarations -Wno-char-subscripts -O2
+CFLAGS  = -g -Wall -Wno-char-subscripts -O2 -fsigned-char
 LDFLAGS = `allegro-config --libs`
 DEFINES = -DDATADIR=\"$(DATADIR)/\"
 OBJS    = gui.o gtools.o itools.o theme.o font.o palette.o settings.o \
@@ -17,7 +17,7 @@
 	mkdir -p $(PREFIX)/bin
 	install -p -m 755 $(TARGET) $(PREFIX)/bin
 	mkdir -p $(DATADIR)
-	install -p -m 644 ../../distro/ce.dat $(DATADIR)
+	install -p -m 644 ../ce.dat $(DATADIR)
 	
 clean:
 	rm -f $(OBJS) $(TARGET) *~
--- crystal-stacker-1.5/ce/ce.txt.fixes	2002-01-09 02:02:36.000000000 +0100
+++ crystal-stacker-1.5/ce/ce.txt	2006-04-07 10:27:18.000000000 +0200
@@ -1,11 +1,10 @@
-Crystal Edit (c) 2001 NewCreature Design
+Crystal Edit (c) 2006 NewCreature Design
 ----------------------------------------
 
-
-Crystal Edit is freeware. This means you can pass copies around freely as long
-as no money is to be made from it. If you'd like to include Crystal Edit on
-your freeware/shareware CD, you should contact us via e-mail at the address in
-the "Contacting Us" section of this document to make sure it's okay.
+Crystal Edit is freeware. This means you can pass copies around freely
+provided you include this document in it's original form in your distribution.
+Please see the "Contacting Us" section of this document if you need to contact
+us for any reason.
 
 
 Disclaimer
--- /dev/null	2006-04-07 10:13:42.899697500 +0200
+++ crystal-stacker-1.5/ce/ce-license-change.txt	2006-04-07 10:27:49.000000000 +0200
@@ -0,0 +1,122 @@
+On my (Hans de Goede <j.w.r.degoede at hhs.nl>) request Todd Cope has changed
+the license text for crystal-stacker. However he forgot to change the
+license text (which used to be identical) for the cs theme-editor ce.
+
+The license part of ce.txt has been modified by my to once again match that
+of cs (as found in cs/readme.txt). This was done with permission of Todd:
+
+
+Message-ID: <44339CF1.60204 at hhs.nl>
+Date: Wed, 05 Apr 2006 12:33:21 +0200
+From: Hans de Goede <j.w.r.degoede at hhs.nl>
+User-Agent: Thunderbird 1.5 (X11/20060210)
+MIME-Version: 1.0
+To:  todd at t3-i.com
+Subject: Re: Crsytal Stacker License Clarification needed
+References: <20060404203453.c1bf2b7c2c1de069cff39b794cd5d62e.ff21a1ecfd.wbe at email.secureserver.net>
+In-Reply-To: <20060404203453.c1bf2b7c2c1de069cff39b794cd5d62e.ff21a1ecfd.wbe at email.secureserver.net>
+Content-Type: text/plain; charset=ISO-8859-1; format=flowed
+Content-Transfer-Encoding: 7bit
+
+todd at t3-i.com wrote:
+> Hi there,
+> 
+> Sorry it's taking so long. I've been really busy.
+
+No problem! And many thanks for al the great work on a great game!
+
+> I have uploaded the
+> latest source package with the updated license information and all the
+> fixes you made. I changed the layout of the archive because I didn't
+> like the way the old layout was. Now when you compile the executables
+> they are placed in the "ce" and "cs" folders along with the game data.
+> Just thought I would inform you in case your makefile needs to be
+> updated to reflect this change. Here's the link:
+> 
+> http://ncdgames.t3-i.com/cs15src.zip
+> 
+> I will await word from you before officially releasing this source
+> package to the public that way if you have any more changes to submit I
+> can apply them. If you have things working the way you want and
+> everything looks good in the licensing and such you can go ahead and
+> release your FC version. I'm in the process of moving so I might not be
+> able to get back with you for a while.
+> 
+
+I've looked through the new source and I've got a number of remarks:
+
+1) you seem to have forgotten to update ce/ce.txt the license there 
+still reads:
+"Crystal Edit is freeware. This means you can pass copies around freely
+  as long as no money is to be made from it. If you'd like to include
+  Crystal Edit on your freeware/shareware CD, you should contact us via
+  e-mail at the address in the "Contacting Us" section of this document
+  to make sure it's okay."
+
+Where as in cs/readme.txt (which used to be distro/readme.txt) where you 
+had the exact same text you changed it to:
+"Crystal Stacker is freeware. This means you can pass copies around 
+freely provided you include this document in it's original form in your 
+distribution."
+
+I assume you wanted / meant todo the same change for ce? If you did mean 
+to make this change please let me know I understand if you don't have 
+the time todo a new release now, but without atleast a mail from you 
+saying that this is indeed what you wanted I still cannot distribute cs 
+:| (or atleast not ce).
+
+Many thanks for the license change BTW, the new license is good.
+
+2) Some remarks regarding the new t3ssal.c:
+
+---
+
+The rest of the mail has been deleted because of non relevance
+
+---
+
+Return-Path: <todd at t3-i.com>
+Received: from koko.hhs.nl ([145.52.2.16] verified)
+  by hhs.nl (CommuniGate Pro SMTP 4.3.6)
+  with ESMTP id 46263002 for j.w.r.degoede at hhs.nl; Wed, 05 Apr 2006 23:34:57 +0200
+Received: from exim by koko.hhs.nl with spam-scanned (Exim 4.41)
+	id 1FRFeS-0003oO-Ag
+	for j.w.r.degoede at hhs.nl; Wed, 05 Apr 2006 23:34:57 +0200
+X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on koko.hhs.nl
+X-Spam-Level: 
+X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,NO_REAL_NAME 
+	autolearn=no version=3.1.0
+Received: from exim (helo=koko)
+	by koko.hhs.nl with local-smtp (Exim 4.41)
+	id 1FRFeS-0003oL-6o
+	for j.w.r.degoede at hhs.nl; Wed, 05 Apr 2006 23:34:56 +0200
+Received: from [68.178.232.2] (port=36111 helo=smtpout11-02.prod.mesa1.secureserver.net)
+	by koko.hhs.nl with smtp (Exim 4.41)
+	id 1FRFeR-0003oG-Ml
+	for j.w.r.degoede at hhs.nl; Wed, 05 Apr 2006 23:34:56 +0200
+Received: (qmail 21425 invoked from network); 5 Apr 2006 21:34:54 -0000
+Received: from unknown (HELO gem-wbe05.mesa1.secureserver.net) (64.202.189.37)
+  by smtpout11-02.prod.mesa1.secureserver.net with SMTP; 5 Apr 2006 21:34:54 -0000
+Received: (qmail 596 invoked by uid 99); 5 Apr 2006 21:34:53 -0000
+Date: Wed, 05 Apr 2006 14:34:53 -0700
+From: todd at t3-i.com
+Subject: RE: Crsytal Stacker License Clarification needed
+To: Hans de Goede <j.w.r.degoede at hhs.nl>
+Message-ID: <20060405143453.c1bf2b7c2c1de069cff39b794cd5d62e.f78207bcfb.wbe at email.secureserver.net>
+MIME-Version: 1.0
+Content-Type: TEXT/plain; CHARSET=US-ASCII
+User-Agent: Web-Based Email 4.0.17
+X-Originating-IP: 66.190.177.177
+X-Anti-Virus: Kaspersky Anti-Virus for MailServers 5.5.2/RELEASE, bases: 05042006 #175178, status: clean
+
+1) you seem to have forgotten to update ce/ce.txt the license there 
+> still reads:...
+
+Yeah, I forgot about that file. I wanted it to have the same license as
+CS.
+
+2) Some remarks regarding the new t3ssal.c:...
+
+---
+
+Once again the rest of the mail has been deleted because of non relevance.


--- NEW FILE crystal-stacker-theme-editor.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=Crystal Stacker Theme Editor
GenericName=Themes editor for Crystal Stacker
Comment=Create new Themes for Crystal Stacker
Exec=crystal-stacker-theme-editor
Icon=crystal-stacker-theme-editor.png
Terminal=false
StartupNotify=false
Type=Application
Categories=Application;Game;
Version=1.5


--- NEW FILE crystal-stacker.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=Crystal Stacker
GenericName=Falling blocks 3 in a row
Comment=Match 3 or more crystals of the same color in a row
Exec=crystal-stacker
Icon=crystal-stacker.png
Terminal=false
StartupNotify=false
Type=Application
Categories=Application;Game;
Version=1.5


--- NEW FILE crystal-stacker.spec ---
Name:           crystal-stacker
Version:        1.5
Release:        0.pre.2%{?dist}
Summary:        Falling blocks, match 3 or more of the same color crystals
Group:          Amusements/Games
License:        Freeware
URL:            http://www.t3-i.com/cstacker.htm
Source0:        http://www.t3-i.com/ncdgames/cs15src.zip
Source1:	%{name}.desktop
Source2:	%{name}-theme-editor.desktop
Patch0:         crystal-stacker-1.5-fixes.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  allegro-devel dumb-devel ImageMagick desktop-file-utils

%description
If you've played Columns then you know what Crystal Stacker is all about. Match
3 or more of the same color crystals either horizontally, vertically, or dia-
gonally to destroy them. For every 45 crystals you destroy, the level increases
and the crystals fall faster. The higher the level, the more points you are   
awarded for destroying crystals.


%package theme-editor
Summary:	Themes editor for Crystal Stacker
Group:		Amusements/Games
Requires:	%{name} = %{version}

%description theme-editor
Create new Themes for Crystal Stacker


%prep
%setup -q -c
%patch0 -p1 -z .fixes
%{__sed} -i 's/\r//' ce/*.txt cs/*.txt


%build
pushd cs/source
make %{?_smp_mflags} -f Makefile.unix PREFIX=%{_prefix} \
  CFLAGS="$RPM_OPT_FLAGS -fsigned-char"
popd

pushd ce/source
make %{?_smp_mflags} -f Makefile.unix PREFIX=%{_prefix} \
  CFLAGS="$RPM_OPT_FLAGS -fsigned-char -Wno-char-subscripts"
popd

convert cs/cs.ico %{name}.png
convert ce/ce.ico %{name}-theme-editor.png


%install
rm -rf $RPM_BUILD_ROOT
pushd cs/source
make -f Makefile.unix install PREFIX=$RPM_BUILD_ROOT%{_prefix}
popd

pushd ce/source
make -f Makefile.unix install PREFIX=$RPM_BUILD_ROOT%{_prefix}
popd

# below is the desktop file and icon stuff.
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --vendor fedora            \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  --add-category X-Fedora                       \
  %{SOURCE1}
desktop-file-install --vendor fedora            \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  --add-category X-Fedora                       \
  %{SOURCE2}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
install -p -m 644 %{name}.png %{name}-theme-editor.png \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps


%clean
rm -rf $RPM_BUILD_ROOT


%post
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%postun
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%post theme-editor
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%postun theme-editor
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi


%files
%defattr(-,root,root,-)
%doc cs/*.txt
%{_bindir}/crystal-stacker
%dir %{_datadir}/crystal-stacker
%{_datadir}/crystal-stacker/cs.*
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png

%files theme-editor
%defattr(-,root,root,-)
%doc ce/*.txt
%{_bindir}/crystal-stacker-theme-editor
%{_datadir}/crystal-stacker/ce.dat
%{_datadir}/applications/fedora-%{name}-theme-editor.desktop
%{_datadir}/icons/hicolor/32x32/apps/%{name}-theme-editor.png


%changelog
* Fri Apr  8 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 1.5-0.pre.2
- Updated Patch0 to not unnescesarry pause the music when selecting
  a new theme and using pthreads to play the music.

* Thu Apr  7 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 1.5-0.pre.1
- Initial Fedora Extras package


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/crystal-stacker/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	9 Apr 2006 07:29:53 -0000	1.1
+++ .cvsignore	9 Apr 2006 07:30:54 -0000	1.2
@@ -0,0 +1 @@
+cs15src.zip


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/crystal-stacker/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	9 Apr 2006 07:29:53 -0000	1.1
+++ sources	9 Apr 2006 07:30:54 -0000	1.2
@@ -0,0 +1 @@
+d961dfdc859267b2763f4b585a732f3e  cs15src.zip




More information about the scm-commits mailing list