]> git.pld-linux.org Git - packages/caph.git/commitdiff
- initial
authorZsolt Udvari <uzsolt@pld-linux.org>
Sun, 7 Feb 2010 15:10:37 +0000 (15:10 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    caph-libpng.patch -> 1.1
    caph-mapsdir.patch -> 1.1
    caph-sysdatadir.patch -> 1.1
    caph.spec -> 1.1

caph-libpng.patch [new file with mode: 0644]
caph-mapsdir.patch [new file with mode: 0644]
caph-sysdatadir.patch [new file with mode: 0644]
caph.spec [new file with mode: 0644]

diff --git a/caph-libpng.patch b/caph-libpng.patch
new file mode 100644 (file)
index 0000000..8a0e1ef
--- /dev/null
@@ -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);
+       }
diff --git a/caph-mapsdir.patch b/caph-mapsdir.patch
new file mode 100644 (file)
index 0000000..dcb473d
--- /dev/null
@@ -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);
+       }
diff --git a/caph-sysdatadir.patch b/caph-sysdatadir.patch
new file mode 100644 (file)
index 0000000..8890181
--- /dev/null
@@ -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[])
+ {
diff --git a/caph.spec b/caph.spec
new file mode 100644 (file)
index 0000000..992b0bf
--- /dev/null
+++ b/caph.spec
@@ -0,0 +1,60 @@
+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}
This page took 0.066296 seconds and 4 git commands to generate.