packages: librsvg/librsvg.spec, librsvg/rsvg (NEW)=?UTF-8?Q?=20?=- up to 2.35.2 - remove ...

adwol adwol at pld-linux.org
Sun Mar 11 16:32:27 CET 2012


Author: adwol                        Date: Sun Mar 11 15:32:27 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- up to 2.35.2
- remove bcond gtk3 (default build with gtk+3)
- added bcond gtk2 (default without, probably -gtk+2 package obsoleted)
- added rpm macro for version
- keeped legacy rsvg python script from former versions

---- Files affected:
packages/librsvg:
   librsvg.spec (1.156 -> 1.157) , rsvg (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/librsvg/librsvg.spec
diff -u packages/librsvg/librsvg.spec:1.156 packages/librsvg/librsvg.spec:1.157
--- packages/librsvg/librsvg.spec:1.156	Wed Nov 16 19:07:28 2011
+++ packages/librsvg/librsvg.spec	Sun Mar 11 16:32:22 2012
@@ -2,24 +2,29 @@
 #
 # Conditional build
 %bcond_without	apidocs		# disable gtk-doc
-%bcond_without	gtk3		# disable gtk+3
+%bcond_with	gtk2		# enable gtk+2
 %bcond_without	libgsf		# build without libgsf (used for run-time decompression)
 %bcond_without	libcroco	# build without CSS support through libcroco
 %bcond_without	static_libs	# don't build static library
 #
+
+%define		ver	2.35
+%define		pver	2
+
 Summary:	A Raph's Library for Rendering SVG Data
 Summary(pl.UTF-8):	Biblioteka Raph's SVG do renderowania danych SVG
 Summary(pt_BR.UTF-8):	Biblioteca SVG
 Summary(ru.UTF-8):	SVG библиотека
 Summary(uk.UTF-8):	SVG бібліотека
 Name:		librsvg
-Version:	2.34.2
+Version:	%{ver}.%{pver}
 Release:	1
 Epoch:		1
 License:	LGPL v2+
 Group:		X11/Libraries
-Source0:	http://ftp.gnome.org/pub/GNOME/sources/librsvg/2.34/%{name}-%{version}.tar.xz
-# Source0-md5:	5287d0066eb9e3ac55d4e3597694232b
+Source0:	http://ftp.gnome.org/pub/GNOME/sources/librsvg/%{ver}/%{name}-%{version}.tar.xz
+# Source0-md5:	1e06889f88b42c9ed5c021a5847dfb45
+Source1:	rsvg
 URL:		http://librsvg.sourceforge.net/
 BuildRequires:	autoconf
 BuildRequires:	automake >= 1:1.9
@@ -27,8 +32,8 @@
 BuildRequires:	gdk-pixbuf2-devel >= 2.0
 BuildRequires:	glib2-devel >= 1:2.24.0
 BuildRequires:	gobject-introspection-devel >= 0.18.8
-BuildRequires:	gtk+2-devel >= 2:2.16.0
-%{?with_gtk3:BuildRequires:	gtk+3-devel >= 3.0.0}
+%{?with_gtk2:BuildRequires:	gtk+2-devel >= 2:2.16.0}
+BuildRequires:	gtk+3-devel >= 3.0.0
 %{?with_apidocs:BuildRequires:	gtk-doc >= 1.13}
 %{?with_apidocs:BuildRequires:	gtk-doc-automake >= 1.13}
 %{?with_libcroco:BuildRequires:	libcroco-devel >= 0.6.1}
@@ -86,7 +91,7 @@
 Requires:	%{name} = %{epoch}:%{version}-%{release}
 Requires:	glib2-devel >= 1:2.24.0
 Requires:	gdk-pixbuf2-devel >= 2.0
-Requires:	gtk+2-devel >= 2:2.16.0
+Requires:	gtk+3-devel >= 3.0.0
 %{?with_libcroco:Requires:	libcroco-devel >= 0.6.1}
 %{?with_libgsf:Requires:	libgsf-devel >= 1.14.4}
 Requires:	libxml2-devel >= 1:2.6.31
@@ -208,6 +213,10 @@
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/*.{la,a}
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/librsvg-2.la
 
+%{__ln_s} rsvg-view-3 $RPM_BUILD_ROOT%{_bindir}/rsvg-view
+
+install %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -234,7 +243,7 @@
 %attr(755,root,root) %{_libdir}/gdk-pixbuf-2.0/2.*.*/loaders/libpixbufloader-svg.so
 %dir %{_datadir}/themes/bubble
 %{_mandir}/man1/rsvg.1*
-%{_pixmapsdir}/svg-viewer.svg
+#%{_pixmapsdir}/svg-viewer.svg
 
 %files devel
 %defattr(644,root,root,755)
@@ -255,18 +264,18 @@
 %{_gtkdocdir}/%{name}
 %endif
 
+%if %{with gtk2}
 %files gtk+2
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/rsvg-view
 %attr(755,root,root) %{_libdir}/gtk-2.0/2.*/engines/libsvg.so
 %{_datadir}/themes/bubble/gtk-2.0
+%endif
 
-%if %{with gtk3}
 %files gtk+3
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/rsvg-view-3
+%attr(755,root,root) %{_bindir}/rsvg-view
 %{_datadir}/themes/bubble/gtk-3.0
-%endif
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -274,6 +283,13 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.157  2012/03/11 15:32:22  adwol
+- up to 2.35.2
+- remove bcond gtk3 (default build with gtk+3)
+- added bcond gtk2 (default without, probably -gtk+2 package obsoleted)
+- added rpm macro for version
+- keeped legacy rsvg python script from former versions
+
 Revision 1.156  2011/11/16 18:07:28  qboosh
 - build introspection bindings
 

================================================================
Index: packages/librsvg/rsvg
diff -u /dev/null packages/librsvg/rsvg:1.1
--- /dev/null	Sun Mar 11 16:32:27 2012
+++ packages/librsvg/rsvg	Sun Mar 11 16:32:22 2012
@@ -0,0 +1,73 @@
+#!/usr/bin/env python
+
+#
+# This python script subsumes the old 'rsvg' C-based command-line program.
+# It should be considered deprecated in favor of 'rsvg-convert'.
+#
+
+import getopt, sys, os
+
+def usage():
+    print >> sys.stdout, """Usage: rsvg [-v?] [-d|--dpi-x <float>] [-p|--dpi-y <float>]
+        [-x|--x-zoom <float>] [-y|--y-zoom <float>] [-w|--width <int>]
+        [-h|--height <int>] [-q|--quality <int>] [-f|--format [png, jpeg]]
+        [-v|--version] [-?|--help] [--usage] [OPTIONS...] file.svg file.png"""
+
+def help():
+    print >> sys.stdout, """Usage: rsvg [OPTIONS...] file.svg file.png
+  -d, --dpi-x=<float>          pixels per inch
+  -p, --dpi-y=<float>          pixels per inch
+  -x, --x-zoom=<float>         x zoom factor
+  -y, --y-zoom=<float>         y zoom factor
+  -w, --width=<int>            width
+  -h, --height=<int>           height
+  -q, --quality=<int>          JPEG quality
+  -f, --format=[png, jpeg]     save format
+  -v, --version                show version information
+
+Help options:
+  -?, --help                   Show this help message
+  --usage                      Display brief usage message
+""",
+
+def shellEscape(param):
+    """Escape a string parameter for the shell."""
+    return "'" + param.replace("'", "'\\''") + "'"
+
+def main():
+    try:
+        opts, args = getopt.getopt(sys.argv[1:], "d:p:x:y:w:h:q:f:v?", ["dpi-x=", "dpi-y=", "x-zoom=", "y-zoom=", "width=", "height=", "quality=", "format=", "version", "usage"])
+    except getopt.GetoptError:
+        help()
+        sys.exit(1)
+
+    command_str = ""
+    
+    for o, a in opts:
+        if o in ("-v", "--version"):
+            print "rsvg version %s" % ("2.34.2")
+            sys.exit(0)
+        elif o in ("--usage"):
+            usage()
+            sys.exit(0)
+        elif o in ("-?", "--help"):
+            help()
+            sys.exit(0)
+        elif (o in ("-f", "--format")):
+            if a in ("jpg", "jpeg"):
+                print >> sys.stderr, "The JPEG output format is no longer supported"
+                sys.exit(1)
+        elif (o in ("-q", "--quality")):
+            print "The --quality option is no longer supported"
+            sys.exit(1)
+        else:
+            command_str += " " + shellEscape(o) + " " + shellEscape(a)
+
+    if len(args) != 2:
+        help()
+        sys.exit(1)
+
+    return os.system("%s %s -o %s %s" % (shellEscape(os.path.join("/usr", "bin", "rsvg-convert")), command_str, shellEscape(args[1]), shellEscape(args[0])))
+
+if __name__ == "__main__":
+    main()
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/librsvg/librsvg.spec?r1=1.156&r2=1.157&f=u



More information about the pld-cvs-commit mailing list