[packages/captury] - completed packaging - added libpng patch (fixes build with libpng 1.5+)
qboosh
qboosh at pld-linux.org
Sat Jan 18 21:58:12 CET 2014
commit c8d69450994f796762a9a1ddcd61528db11bc741
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Jan 18 21:59:17 2014 +0100
- completed packaging
- added libpng patch (fixes build with libpng 1.5+)
captury-libpng.patch | 29 +++++++++++++++++++
captury.spec | 78 +++++++++++++++++++++++++---------------------------
2 files changed, 67 insertions(+), 40 deletions(-)
---
diff --git a/captury.spec b/captury.spec
index 02bfb30..ce3e21f 100644
--- a/captury.spec
+++ b/captury.spec
@@ -1,70 +1,68 @@
-Summary: screen capture tool
-Summary(pl.UTF-8): Narzędzie do wykonywania zrzutów ekranu
+Summary: X11/GL screen capture tool
+Summary(pl.UTF-8): Narzędzie do wykonywania zrzutów ekranu X11/GL
Name: captury
Version: 0.3.0
-Release: 0.1
-License: GPL
-Group: Libraries
+Release: 1
+License: GPL v2
+Group: X11/Applications/Graphics
Source0: ftp://ftp.debian.org/debian/pool/main/c/captury/%{name}_%{version}~svn158.orig.tar.gz
# Source0-md5: 54b2de085bd83cb11da6598f6fa46198
+Patch0: %{name}-libpng.patch
URL: http://rm-rf.in/captury
+BuildRequires: OpenGL-devel
BuildRequires: autoconf >= 2.53
BuildRequires: automake
+BuildRequires: elfutils-devel
BuildRequires: libcaptury-devel
+BuildRequires: libpng-devel >= 1.2
+BuildRequires: pkgconfig >= 1:0.17.2
+BuildRequires: xorg-lib-libX11-devel
+Requires: /usr/%{_lib}/libGL.so.1
+Requires: /usr/%{_lib}/libX11.so.6
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Captury is a screen capture application, primarly done for recording
-OpenGl games.
+OpenGL games.
-%package devel
-Summary: Header files and develpment documentation for captury
-Summary(pl.UTF-8): Pliki nagłówkowe i dokumetacja do captury
-Group: Development/Libraries
-Requires: %{name} = %{epoch}:%{version}-%{release}
-
-%description devel
-Header files and develpment documentation for captury.
-
-%description devel -l pl.UTF-8
-Pliki nagłówkowe i dokumentacja do captury.
-
-%package static
-Summary: Static captury library
-Summary(pl.UTF-8): Biblioteka statyczna captury
-Group: Development/Libraries
-Requires: %{name}-devel = %{epoch}:%{version}-%{release}
-
-%description static
-Static captury library.
+%description -l pl.UTF-8
+Captury to aplikacja do wykonywania zrzutów ekranów, przeznaczona
+głównie do nagrywania gier OpenGL
%prep
%setup -q -n %{name}-%{version}~svn158.orig
+%patch0 -p1
%build
%configure
-%{__make}
+# override NATIVE_ paths to symlink sonames and avoid depending on -devel packages
+%{__make} \
+ NATIVE_LIBGL=/usr/%{_lib}/libGL.so.1 \
+ NATIVE_LIBX11=/usr/%{_lib}/libX11.so.6
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
- DESTDIR=$RPM_BUILD_ROOT
+ DESTDIR=$RPM_BUILD_ROOT \
+ NATIVE_LIBGL=/usr/%{_lib}/libGL.so.1 \
+ NATIVE_LIBX11=/usr/%{_lib}/libX11.so.6
%clean
rm -rf $RPM_BUILD_ROOT
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
-
%files
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/captury.so.*.*
-
-%files devel
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/captury.so
-
-%files static
-%defattr(644,root,root,755)
-%{_libdir}/captury.a
+%doc AUTHORS ChangeLog
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/captury.conf
+%attr(755,root,root) %{_bindir}/captury
+%dir %{_libdir}/captury
+%attr(755,root,root) %{_libdir}/captury/libGLcaptury.so
+# symlinks to libGLcaptury
+%attr(755,root,root) %{_libdir}/captury/libGL.so.1
+%attr(755,root,root) %{_libdir}/captury/libGL.so
+%attr(755,root,root) %{_libdir}/captury/libX11.so.6
+%attr(755,root,root) %{_libdir}/captury/libX11.so
+# symlinks to system libGL and libX11
+%attr(755,root,root) %{_libdir}/captury/libGLnative.so
+%attr(755,root,root) %{_libdir}/captury/libX11native.so
diff --git a/captury-libpng.patch b/captury-libpng.patch
new file mode 100644
index 0000000..8f34022
--- /dev/null
+++ b/captury-libpng.patch
@@ -0,0 +1,29 @@
+--- captury-0.3.0~svn158.orig/src/libGLcaptury/TScreenshot.cpp.orig 2007-06-13 11:42:56.000000000 +0200
++++ captury-0.3.0~svn158.orig/src/libGLcaptury/TScreenshot.cpp 2014-01-18 21:16:13.203428852 +0100
+@@ -63,7 +63,7 @@
+ }
+
+ void TScreenshot::onWritePNG(png_structp APng, png_bytep ABuffer, png_size_t ASize) {
+- int fd = *static_cast<int *>(APng->io_ptr);
++ int fd = *static_cast<int *>(png_get_io_ptr(APng));
+ write(fd, ABuffer, ASize);
+ }
+
+@@ -103,15 +103,12 @@
+ png_set_write_fn(png, &fd, &TScreenshot::onWritePNG, &TScreenshot::onFlushPNG);
+ png_set_compression_level(png, 4);
+
+- info->width = width;
+- info->height = height;
+- info->bit_depth = 8;
+- info->color_type = PNG_COLOR_TYPE_RGB;
++ png_set_IHDR(png, info, width, height, 8, PNG_COLOR_TYPE_RGB, 0, 0, 0);
+
+ png_write_info(png, info);
+
+ const int lineStride = width * 3;
+- for (int y = info->height - 1; y >= 0; --y)
++ for (int y = height - 1; y >= 0; --y)
+ png_write_row(png, (png_bytep)buffer + y * lineStride);
+
+ png_write_end(png, info);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/captury.git/commitdiff/c8d69450994f796762a9a1ddcd61528db11bc741
More information about the pld-cvs-commit
mailing list