packages: caph/caph.spec (NEW), caph/caph-libpng.patch (NEW), caph/caph-map...
uzsolt
uzsolt at pld-linux.org
Sun Feb 7 16:10:42 CET 2010
Author: uzsolt Date: Sun Feb 7 15:10:42 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- initial
---- Files affected:
packages/caph:
caph.spec (NONE -> 1.1) (NEW), caph-libpng.patch (NONE -> 1.1) (NEW), caph-mapsdir.patch (NONE -> 1.1) (NEW), caph-sysdatadir.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/caph/caph.spec
diff -u /dev/null packages/caph/caph.spec:1.1
--- /dev/null Sun Feb 7 16:10:42 2010
+++ packages/caph/caph.spec Sun Feb 7 16:10:37 2010
@@ -0,0 +1,72 @@
+# $Revision$, $Date$
+Summary: A sandbox game, based on physics
+Name: caph
+Version: 091231
+Release: 0.3
+License: GPL v2
+Group: Applications
+Source0: http://dl.sourceforge.net/project/caphgame/caph/caph-091231/%{name}-src-%{version}.tar.bz2
+# Source0-md5: 26d743ed2b82726dea8cd3c4780b3adb
+Source1: http://dl.sourceforge.net/project/caphgame/caph/caph-091231/%{name}-data-%{version}.tar.bz2
+# Source1-md5: 42877f73bba16d835391ddaf747ccdd3
+Patch0: %{name}-libpng.patch
+Patch1: %{name}-sysdatadir.patch
+Patch2: %{name}-mapsdir.patch
+URL: http://caphgame.sourceforge.net/
+BuildRequires: Mesa-libGL-devel
+BuildRequires: SDL-devel
+BuildRequires: libpng-devel
+BuildRequires: pkgconfig
+BuildRequires: sed >= 4.0
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+It is a sandbox game, based on physics. The game target is to make
+contact red object with green object. You can use various objects,
+solid, wire (rope), and bendable objects. Gravitation will help you.
+
+%prep
+%setup -q -n %{name}-src
+tar xvf %{SOURCE1}
+
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%{__sed} -i "1 s,/sh,/bash," src/{build,mkgen}
+%{__sed} -i "s,libgl,gl," src/build
+
+%build
+cd src
+CFLAGS="%{rpmcflags}" \
+LFLAGS="%{rpmldflags}" \
+./build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{_bindir}
+install bin/caph $RPM_BUILD_ROOT%{_bindir}
+
+install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
+cp -r caph-data/share/caph/* $RPM_BUILD_ROOT%{_datadir}/%{name}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc doc/caph/CHANGELOG doc/caph/README
+%attr(755,root,root) %{_bindir}/caph
+%{_datadir}/%{name}
+
+
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1 2010/02/07 15:10:37 uzsolt
+- initial
+
================================================================
Index: packages/caph/caph-libpng.patch
diff -u /dev/null packages/caph/caph-libpng.patch:1.1
--- /dev/null Sun Feb 7 16:10:42 2010
+++ packages/caph/caph-libpng.patch Sun Feb 7 16:10:37 2010
@@ -0,0 +1,11 @@
+--- caph-src-orig/src/draw.c 2010-02-07 15:33:02.375626732 +0100
++++ caph-src/src/draw.c 2010-02-07 15:33:45.505830811 +0100
+@@ -279,7 +279,7 @@
+ (ltype == PNG_COLOR_TYPE_GRAY_ALPHA))
+ {
+ if (bits < 8)
+- png_set_gray_1_2_4_to_8(png_ptr);
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
+ png_set_gray_to_rgb(png_ptr);
+ }
+
================================================================
Index: packages/caph/caph-mapsdir.patch
diff -u /dev/null packages/caph/caph-mapsdir.patch:1.1
--- /dev/null Sun Feb 7 16:10:42 2010
+++ packages/caph/caph-mapsdir.patch Sun Feb 7 16:10:37 2010
@@ -0,0 +1,11 @@
+--- caph-src-orig/src/maps.c 2010-02-07 15:33:02.378960686 +0100
++++ caph-src/src/maps.c 2010-02-07 15:58:53.158805702 +0100
+@@ -54,7 +54,7 @@
+ *c = '\0';
+
+ maps[this] = malloc(strlen(line) + 8);
+- strcpy(maps[this], "maps/");
++ strcpy(maps[this], "/usr/share/caph/maps/");
+ strcat(maps[this++], line);
+ }
+
================================================================
Index: packages/caph/caph-sysdatadir.patch
diff -u /dev/null packages/caph/caph-sysdatadir.patch:1.1
--- /dev/null Sun Feb 7 16:10:42 2010
+++ packages/caph/caph-sysdatadir.patch Sun Feb 7 16:10:37 2010
@@ -0,0 +1,24 @@
+--- caph-src-orig/src/caph.c 2010-02-07 15:33:02.375626732 +0100
++++ caph-src/src/caph.c 2010-02-07 15:50:56.599688478 +0100
+@@ -37,7 +37,7 @@
+ #endif
+
+ #define SYS_PRINT 1
+-#define SYS_DATA_DIR "../share/caph/"
++#define SYS_DATA_DIR "/usr/share/caph/"
+
+ static const char *
+ sys_get_data_dir()
+@@ -198,9 +198,9 @@
+ #endif
+ }
+
+-#define DATA_CONFIG "caph.conf"
+-#define DATA_PAPER "paper.png"
+-#define DATA_MAPS_LIST "maps/maps.list"
++#define DATA_CONFIG SYS_DATA_DIR "caph.conf"
++#define DATA_PAPER SYS_DATA_DIR "paper.png"
++#define DATA_MAPS_LIST SYS_DATA_DIR "maps/maps.list"
+
+ int main(int argc, char *argv[])
+ {
================================================================
More information about the pld-cvs-commit
mailing list