]> git.pld-linux.org Git - packages/freecraft.git/commitdiff
- switched to .bz2 source
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 22 Dec 2002 01:13:44 +0000 (01:13 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- fcmp separated to freecraft-data-fcmp.spec
- fixed passing optflags, disabled warnings about gcc3
- nonint patch - allow passing options bypassing questions (which depended on
  build environment!)
- fix patch to fix compilation with threaded sound
- removed ELF binaries from /usr/share

Changed files:
    freecraft-fix.patch -> 1.1
    freecraft-nonint.patch -> 1.1
    freecraft-opt.patch -> 1.1
    freecraft.spec -> 1.4

freecraft-fix.patch [new file with mode: 0644]
freecraft-nonint.patch [new file with mode: 0644]
freecraft-opt.patch [new file with mode: 0644]
freecraft.spec

diff --git a/freecraft-fix.patch b/freecraft-fix.patch
new file mode 100644 (file)
index 0000000..31436e0
--- /dev/null
@@ -0,0 +1,20 @@
+--- freecraft-020630/src/sound/sound_server.c.orig     Sun Jun 16 19:58:15 2002
++++ freecraft-020630/src/sound/sound_server.c  Sun Dec 22 00:44:57 2002
+@@ -1083,7 +1083,7 @@
+           audio_buf_info info;
+           ioctl(SoundFildes, SNDCTL_DSP_GETOSPACE, &info);
+-          DebugLevel0("Free bytes %d\n", info.bytes);
++          DebugLevel0("Free bytes %d\n" _C_ info.bytes);
+       }
+       FillChannels(free_channels, &discarded_request, &started_request);
+       how_many_playing += started_request;
+@@ -1120,7 +1120,7 @@
+           how_many_playing -= new_free_channels;
+       }
+       free_channels = MaxChannels - how_many_playing;
+-      DebugLevel3("Channels: %d %d %d\n", free_channels, how_many_playing,
++      DebugLevel3("Channels: %d %d %d\n" _C_ free_channels _C_ how_many_playing _C_
+           new_free_channels);
+       new_free_channels += discarded_request;
+       // decrement semaphore by the number of stopped channels
diff --git a/freecraft-nonint.patch b/freecraft-nonint.patch
new file mode 100644 (file)
index 0000000..dbbed7a
--- /dev/null
@@ -0,0 +1,132 @@
+--- freecraft-020630/setup.orig        Sat Dec 21 23:40:21 2002
++++ freecraft-020630/setup     Sun Dec 22 00:35:55 2002
+@@ -443,7 +443,12 @@
+   fi
+   echo
+   echo -n "Please enter selection: "
++  if [ -n "$WITH_VIDEO" ]; then
++        VIDSEL="$WITH_VIDEO"
++        echo $VIDSEL
++  else
+   read $N VIDSEL
++  fi
+   echo
+ fi
+@@ -551,7 +556,12 @@
+ echo
+ echo -n "Do you want to compile with sound? (y) "
++if [ -n "$WITH_SOUND" ]; then
++      ANSWER="$WITH_SOUND"
++      echo $ANSWER
++else
+ read $N ANSWER
++fi
+ echo
+ case $ANSWER in
+   [nN])
+@@ -572,7 +582,12 @@
+           echo
+           echo "Assuming you have a thread-safe X11 (libc6 or glibc),"
+           echo -n "do you want to compile with threaded sound? (n) "
++          if [ -n "$WITH_THREADEDSOUND" ]; then
++                  ANSWER2="$WITH_THREADEDSOUND"
++                  echo $ANSWER2
++          else
+           read $N ANSWER2
++          fi
+           echo
+           case $ANSWER2 in [yY])
+             echo "THREAD              = -D_REENTRANT -DUSE_THREAD" >> $RULESFILE
+@@ -589,7 +604,12 @@
+       LIBCHECK="-lFLAC -lm"; check_for_libs
+       if test "$?" = 0 ; then 
+       echo -n "Would you like FLAC support? (n) "
++      if [ -n "$WITH_FLAC" ]; then
++              ANSWER="$WITH_FLAC"
++              echo $ANSWER
++      else
+       read $N ANSWER
++      fi
+       echo
+       case $ANSWER in 
+           [yY])
+@@ -607,7 +627,12 @@
+       LIBCHECK="-lvorbisfile -lvorbis -logg"; check_for_libs
+       if test "$?" = 0 ; then 
+       echo -n "Would you like OGG support? (n) "
++      if [ -n "$WITH_OGG" ]; then
++              ANSWER="$WITH_OGG"
++              echo $ANSWER
++      else
+       read $N ANSWER
++      fi
+       echo
+       case $ANSWER in 
+           [yY])
+@@ -637,7 +662,12 @@
+       LIBCHECK="-lmad"; check_for_libs
+       if test "$?" = 0 ; then 
+       echo -n "Would you like MAD MP3 support? (n) "
++      if [ -n "$WITH_MAD" ]; then
++              ANSWER="$WITH_MAD"
++              echo $ANSWER
++      else
+       read $N ANSWER
++      fi
+       echo
+       case $ANSWER in 
+           [yY])
+@@ -657,7 +687,12 @@
+       echo -n "or [S]DL "
+       fi
+       echo -n "CD Audio support? (n) "
++      if [ -n "$WITH_CDA" ]; then
++              CDMode="$WITH_CDA"
++              echo $CDMode
++      else
+       read $N CDMode
++      fi
+       echo
+       case $CDMode in
+           [sS])
+@@ -741,7 +776,12 @@
+ fi
+ echo
+ echo -n "Please enter selection ($COMPDEF): "
++if [ -n "$WITH_COMP" ]; then
++      COMPOPT="$WITH_COMP"
++      echo $COMPOPT
++else
+ read $N COMPOPT
++fi
+ echo
+ if test "$COMPOPT x" = " x" ; then COMPOPT=$COMPDEF; fi
+@@ -897,7 +937,12 @@
+ echo
+ echo -n "Are you using the WarCraft 2 Expansion CD? (n): "
++if [ -n "$WITH_WC2EXPCD" ]; then
++      YESORNO="$WITH_WC2EXPCD"
++      echo $YESORNO
++else
+ read $N YESORNO
++fi
+ echo
+ if [ "$YESORNO" = "Y" -o "$YESORNO" = "y" ] ; then
+ echo -n " -DHAVE_EXPANSION" >> $RULESFILE
+@@ -965,7 +1010,12 @@
+ echo "Done generating $RULESFILE."
+ echo
+ echo -n "Would you like to compile it now? (y) "
++if [ -n "$WITH_COMPILE" ]; then
++      ANSWER="$WITH_COMPILE"
++      echo $ANSWER
++else
+ read $N ANSWER
++fi
+ echo
+ case $ANSWER in
diff --git a/freecraft-opt.patch b/freecraft-opt.patch
new file mode 100644 (file)
index 0000000..19fb287
--- /dev/null
@@ -0,0 +1,23 @@
+--- freecraft-020630/setup.orig        Sun Jun 30 21:44:16 2002
++++ freecraft-020630/setup     Sat Dec 21 23:33:56 2002
+@@ -130,9 +130,9 @@
+ # Choose optimization level
+ #DEBUG_CFLAGS="-g -O0 -fsigned-char \$(PROFILE) -pipe -Wall -Werror \$(IFLAGS) \$(DFLAGS)"
+-DEBUG_CFLAGS="-g -O1 -fsigned-char -Wall -Werror \$(IFLAGS) \$(DFLAGS)"
++DEBUG_CFLAGS="$OPTFLAGS -fsigned-char -Wall -Werror \$(IFLAGS) \$(DFLAGS)"
+ #-- Production (default)
+-CFLAGS="-O2 -pipe -fsigned-char -fomit-frame-pointer -fconserve-space -fexpensive-optimizations -ffast-math  \$(IFLAGS) \$(DFLAGS)"
++CFLAGS="$OPTFLAGS -pipe -fsigned-char -fconserve-space -fexpensive-optimizations -ffast-math  \$(IFLAGS) \$(DFLAGS)"
+ #------------------------------------------------------------------------------
+ # Function declarations
+@@ -274,7 +274,7 @@
+     WIN32=0
+     CC=cc
+     CCLD=c++
+-   CFLAGS="-O2 -pipe -fomit-frame-pointer -fconserve-space -fexpensive-optimizations -ffast-math  \$(IFLAGS) \$(DFLAGS) -traditional-cpp"
++   CFLAGS="$OPTFLAGS -pipe -fconserve-space -fexpensive-optimizations -ffast-math  \$(IFLAGS) \$(DFLAGS) -traditional-cpp"
+     echo "It appears that you are in a Darwin environment..."
+     echo "Use --beos, --win32 or --unix to override"
+   fi
index 4fa43538a3e2593212328043f50f675ab4e24b95..9a59dc7152ea1e7e44cda58cc66d51da3d193d26 100644 (file)
@@ -11,7 +11,6 @@
 # _with_cda_sdl        - SDL CD Audio Support
 # _with_wc2 - WarCraft 2 Expansion CD
 #
-%define                fcmp_ver        020712
 Summary:       Free cross-platform real-time strategy gaming engine
 Summary(pl):   Wolnodostêpny, miêdzyplatformowy silnik gier strategicznych czasu rzeczywistego
 Name:          freecraft
@@ -19,15 +18,20 @@ Version:    020630
 Release:       0.1
 License:       GPL
 Group:         Applications/Games
-Source0:       http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
-Source1:       http://prdownloads.sourceforge.net/%{name}/fcmp-%{fcmp_ver}.tar.bz2
+Source0:       ftp://ftp.sourceforge.net/pub/sourceforge/freecraft/%{name}-%{version}.tar.bz2
+Patch0:                %{name}-opt.patch
+Patch1:                %{name}-nonint.patch
+Patch2:                %{name}-fix.patch
 URL:           http://freecraft.sourceforge.net/
 %{?_with_sdl:BuildRequires:    SDL-devel}
 %{?_with_sdlsvga:BuildRequires:     SDL-devel}
-%{?_with_svga:BuildRequires:   svgalib-devel}
+BuildRequires: bzip2-devel
 #BuildRequires:        flac-devel
-BuildRequires: libogg-devel
+BuildRequires: libpng-devel
+BuildRequires: libvorbis-devel
 BuildRequires: mad-devel
+%{?_with_svga:BuildRequires:   svgalib-devel}
+BuildRequires: zlib-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -46,92 +50,105 @@ by
 w stylu C&C, WC2, SC i AOE. Dzia³a pod systemami: Linux, BSD, BeOS,
 MacOS/X, MacOS/Darwin i MS Windows (XP jeszcze nie jest obs³ugiwane).
 
-%package data
-Summary:        FreeCraft data
-Summary(pl):    Dane do FreeCrafta
+%package data-wc2
+Summary:        Freecraft - files that allow using orignal game data
+Summary(pl):    Freecraft - pliki pozwalaj±ce u¿ywaæ danych z oryginalnej gry
 Group:          Applications/Games
 Requires:      %{name} = %{version}
+Provides:      %{name}-data
+Obsoletes:     %{name}-data-fcmp
+
+%description data-wc2
+Freecraft - files that allow using orignal game data.
 
-%description data
-FreeCraft data.
+NOTE: it requires data from orignal WC2 CD or Expansion CD.
 
-%description data -l pl
-Dane do FreeCrafta.
+%description data-wc2 -l pl
+Freecraft - pliki pozwalaj±ce u¿ywaæ danych z oryginalnej gry.
+
+UWAGA: wymaga do dzia³ania danych z oryginalnego CD lub Expansion CD
+WC2.
 
 %prep
 %setup -q -n %{name}-%{version}
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
 %build
 # Version to compile
-%{?_with_svga:echo -n "V" > options}
-%{?_with_sdl:echo -n "S" > options}
-%{?_with_sdlsvga:echo -n "B" > options}
-%{!?_with_svga:%{!?_with_sdl:%{!?_with_sdlsvga:echo -n "X" > options}}}
+%{?_with_svga:WITH_VIDEO="V"}
+%{?_with_sdl:WITH_VIDEO="S"}
+%{?_with_sdlsvga:WITH_VIDEO="B"}
+%{!?_with_svga:%{!?_with_sdl:%{!?_with_sdlsvga:WITH_VIDEO="X"}}}
+export WITH_VIDEO
 
 # sound support
-echo -n "y" >> options
+WITH_SOUND="y"; export WITH_SOUND
 
 # threaded sound
-echo -n "n" >> options
+WITH_THREADEDSOUND="y"; export WITH_THREADEDSOUND
 
 # FLAC support (not working jet)
-echo -n "n" >> options
+WITH_FLAC="n"; export WITH_FLAC
 
 # OGG support
-echo -n "y" >> options
+WITH_OGG="y"; export WITH_OGG
 
 # MAD MP3 support
-echo -n "y" >> options
+WITH_MAD="y"; export WITH_MAD
 
 # CD audio
-%{?_with_cda_internal:echo -n "i" >> options}
-%{?_with_cda_sdl:echo -n "S" >> options}
-%{!?_with_cda_internal:%{!?_with_cda_sdl:echo -n "n" >> options}}
+%{?_with_cda_internal:WITH_CDA="i"}
+%{?_with_cda_sdl:WITH_CDA="S"}
+%{!?_with_cda_internal:%{!?_with_cda_sdl:WITH_CDA="n"}}
+export WITH_CDA
 
-# COMPRESSION OPTIONS (both)
-echo -n "O" >> options
+# COMPRESSION OPTIONS (both zlib and bzip2, no zziplib)
+WITH_COMP="O"; export WITH_COMP
 
 # WarCraft 2 Expansion CD
-%{?_with_wc2:echo -n "y" >> options}
-%{!?_with_wc2:echo -n "n" >> options}
+WITH_WC2EXPCD="%{?_with_wc2:y}%{!?_with_wc2:n}"; export WITH_WC2EXPCD
 
 # Compile (NO!)
-echo -n "n" >> options
+WITH_COMPILE="n"; export WITH_COMPILE
 
-cat options | ./setup
-%{__make} depend
+OPTFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer} -D__I_KNOW_THAT_GNUC_3_IS_UNSUPPORTED__"
+export OPTFLAGS
+./setup
 
-%{__make} CC="%{__cc} %{rpmcflags} -Wall"
+%{__make} depend
+%{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/games/%{name}/{,tools}}
 
-install freecraft $RPM_BUILD_ROOT%{_datadir}/games/%{name}
+install freecraft $RPM_BUILD_ROOT%{_bindir}/freecraft-bin
 cp -r data $RPM_BUILD_ROOT%{_datadir}/games/%{name}
-cp %{SOURCE1} ./
-bzip2 -d fcmp-%{fcmp_ver}.tar.bz2 
-tar xfC fcmp-%{fcmp_ver}.tar $RPM_BUILD_ROOT%{_datadir}/games/%{name}
 
-install tools/{wartool,build.sh} $RPM_BUILD_ROOT%{_datadir}/games/%{name}/tools
+install tools/build.sh $RPM_BUILD_ROOT%{_datadir}/games/%{name}/tools
+install tools/wartool $RPM_BUILD_ROOT%{_bindir}
+ln -sf %{_bindir}/wartool $RPM_BUILD_ROOT%{_datadir}/games/%{name}/tools/wartool
+
 cat > $RPM_BUILD_ROOT%{_bindir}/freecraft << EOF
 #!/bin/sh
 cd /usr/share/games/freecraft
-./freecraft
+%{_bindir}/freecraft-bin
 EOF
-chmod 755 $RPM_BUILD_ROOT%{_bindir}/freecraft
+
+rm -f doc/{*.lsm,gpl*} contrib/{doxygen*,macosx.tgz,msvc.zip}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc doc/ contrib/
+%doc doc/* contrib
 %attr(755,root,root) %{_bindir}/*
 %dir %{_datadir}/games/%{name}
-%attr(755,root,root) %{_datadir}/games/%{name}/freecraft
-%{_datadir}/games/%{name}/tools
+%attr(755,root,root) %{_datadir}/games/%{name}/tools
 
-%files data
-%defattr(644,root,root,755
+%files data-wc2
+%defattr(644,root,root,755)
 %{_datadir}/games/%{name}/data
This page took 0.086096 seconds and 4 git commands to generate.