[packages/galculator] up to 2.1.2, supports gtk3, but build for gtk2 for now

glen glen at pld-linux.org
Sat May 10 13:20:34 CEST 2014


commit 41b360e04c9e080c08d584067a0101ce101b6d02
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat May 10 14:20:05 2014 +0300

    up to 2.1.2, supports gtk3, but build for gtk2 for now

 galculator-desktop.patch | 12 +++++-------
 galculator.spec          | 37 +++++++++++++++++++++++++++----------
 2 files changed, 32 insertions(+), 17 deletions(-)
---
diff --git a/galculator.spec b/galculator.spec
index 8f03313..4c64f53 100644
--- a/galculator.spec
+++ b/galculator.spec
@@ -1,12 +1,16 @@
+#
+# Conditional build:
+%bcond_with	gtk3	# use GTK+ 3.x instead of 2.x
+
 Summary:	A GTK+ 2 based scientific calculator
 Summary(pl.UTF-8):	Kalkulator naukowy bazujący na GTK+ 2
 Name:		galculator
-Version:	1.3.1
-Release:	2
-License:	GPL
+Version:	2.1.2
+Release:	1
+License:	GPL v2+
 Group:		Applications/Math
-Source0:	http://dl.sourceforge.net/galculator/%{name}-%{version}.tar.bz2
-# Source0-md5:	683a4f0c2cb3d1f56b4c5610fc495c5f
+Source0:	http://downloads.sourceforge.net/galculator/%{name}-%{version}.tar.bz2
+# Source0-md5:	01c97ec3e18c26c64af78dca9f700d43
 Patch0:		%{name}-desktop.patch
 URL:		http://galculator.sourceforge.net/
 BuildRequires:	autoconf
@@ -14,6 +18,9 @@ BuildRequires:	automake
 BuildRequires:	flex
 BuildRequires:	libglade2-devel >= 1:2.0.1
 BuildRequires:	pkgconfig
+Requires:	desktop-file-utils
+Requires:	gtk-update-icon-cache
+Requires:	hicolor-icon-theme
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -35,12 +42,12 @@ gradus).
 %{__aclocal}
 %{__autoconf}
 %{__automake}
-%configure
+%configure \
+	%{__enable_disable gtk3}
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
@@ -49,10 +56,20 @@ rm -rf $RPM_BUILD_ROOT
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+%update_desktop_database
+%update_icon_cache hicolor
+
+%postun
+%update_desktop_database
+%update_icon_cache hicolor
+
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/%{name}
-%{_desktopdir}/%{name}.desktop
-%{_datadir}/%{name}
 %{_mandir}/man1/%{name}.1*
-%{_pixmapsdir}/%{name}
+%{_datadir}/%{name}
+%{_desktopdir}/%{name}.desktop
+%{_pixmapsdir}/%{name}.xpm
+%{_iconsdir}/hicolor/*/apps/galculator.png
+%{_iconsdir}/hicolor/*/apps/galculator.svg
diff --git a/galculator-desktop.patch b/galculator-desktop.patch
index 02b2e34..6465dda 100644
--- a/galculator-desktop.patch
+++ b/galculator-desktop.patch
@@ -1,11 +1,9 @@
-diff -ur galculator-1.2.3.orig/galculator.desktop.in galculator-1.2.3/galculator.desktop.in
---- galculator-1.2.3.orig/galculator.desktop.in	2004-05-22 19:02:28.000000000 +0200
-+++ galculator-1.2.3/galculator.desktop.in	2004-09-15 22:17:18.198331504 +0200
-@@ -5,6 +5,6 @@
- Icon=gnome-calc2.png
+--- galculator-2.1.2/galculator.desktop.in~	2012-12-15 12:37:03.000000000 +0200
++++ galculator-2.1.2/galculator.desktop.in	2014-05-10 13:01:48.034202211 +0300
+@@ -6,5 +6,5 @@
+ Icon=galculator
  Terminal=false
  Type=Application
--Categories=Application;Utility;
+-Categories=Utility;
 +Categories=GTK;Utility;Calculator;
  StartupNotify=true
- Encoding=UTF-8
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/galculator.git/commitdiff/41b360e04c9e080c08d584067a0101ce101b6d02



More information about the pld-cvs-commit mailing list