[starcal] Updated to upstream version 1.9.3
Hedayat Vatankhah
hedayat at fedoraproject.org
Sat Jul 23 20:15:01 UTC 2011
commit 8a04540260290143b57c572d2f9e3d88621a3e3f
Author: Hedayat Vatankhah <hedayat.fwd at gmail.com>
Date: Sun Jul 24 00:33:29 2011 +0430
Updated to upstream version 1.9.3
extension.js | 10 +++
metadata.json | 1 +
starcal-1.9.3-compilefix.patch | 26 ++++++++
starcal.spec | 105 +++++++++++++++++++++----------
starcal.desktop => starcal2-qt.desktop | 10 ++--
starcal.desktop => starcal2.desktop | 4 +-
6 files changed, 115 insertions(+), 41 deletions(-)
---
diff --git a/extension.js b/extension.js
new file mode 100644
index 0000000..3ac08f5
--- /dev/null
+++ b/extension.js
@@ -0,0 +1,10 @@
+// Thanks to:
+// http://blog.fpmurphy.com/2011/05/more-gnome-shell-customization.html
+// By: Hedayat Vatankhah <hedayat.fwd at gmail.com>, 2011
+const Panel = imports.ui.panel;
+const StatusIconDispatcher = imports.ui.statusIconDispatcher;
+
+function main() {
+ StatusIconDispatcher.STANDARD_TRAY_ICON_IMPLEMENTATIONS['starcal2.py'] = 'starcal2.py';
+ StatusIconDispatcher.STANDARD_TRAY_ICON_IMPLEMENTATIONS['starcal.py'] = 'starcal.py';
+}
diff --git a/metadata.json b/metadata.json
new file mode 100644
index 0000000..ca92f8b
--- /dev/null
+++ b/metadata.json
@@ -0,0 +1 @@
+{"shell-version": ["3.0"], "uuid": "starcal at hedayatvk.wordpress.com", "name": "StarCal Integration", "description": "Integrate StarCal with Gnome Shell's top bar"}
diff --git a/starcal-1.9.3-compilefix.patch b/starcal-1.9.3-compilefix.patch
new file mode 100644
index 0000000..965211e
--- /dev/null
+++ b/starcal-1.9.3-compilefix.patch
@@ -0,0 +1,26 @@
+diff -up starcal2-1.9.2/scal2/ui_gtk/tinycal.py.compilefix starcal2-1.9.2/scal2/ui_gtk/tinycal.py
+--- starcal2-1.9.2/scal2/ui_gtk/tinycal.py.compilefix 2011-05-30 09:32:37.000000000 +0430
++++ starcal2-1.9.2/scal2/ui_gtk/tinycal.py 2011-06-10 14:48:11.332619796 +0430
+@@ -1,3 +1,4 @@
++#!/usr/bin/python
+ # -*- coding: utf-8 -*-
+ #
+ # Copyright (C) 2009-2011 Saeed Rasooli <saeed.gnu at gmail.com> (ilius)
+@@ -66,7 +67,7 @@ class TextObject():
+ ###############
+ self.color = color
+ self.layout = widget.create_pango_layout('')
+- if font!None:
++ if font!=None:
+ self.setFont(font)
+ self.center = center ## ???????????????????
+ #self.xAlign = 0.5
+@@ -133,7 +134,7 @@ class TinyCal(gtk.Window):## (gtk.Drawin
+ self.objects = []
+ def startEditing(self):
+ pass
+- def endEditing(self)
++ def endEditing(self):
+ pass
+
+
diff --git a/starcal.spec b/starcal.spec
index 9acd368..692a48d 100644
--- a/starcal.spec
+++ b/starcal.spec
@@ -1,64 +1,101 @@
+%global pkg_name %{name}2
+
Name: starcal
-Version: 1.5.3
+Version: 1.9.3
Release: 1%{?dist}
-Summary: A desktop calendar with Gregorian, Jalali and Hijri support
+Summary: A full-featured international calendar written in Python
Group: User Interface/Desktops
License: GPLv3+
URL: http://sourceforge.net/projects/starcal/
-Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}-src.tar.gz
-# Source 1 is created by me.
-Source1: %{name}.desktop
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Source0: http://downloads.sourceforge.net/%{name}/%{pkg_name}-%{version}.zip
+# Following Sources are created by me. All of the following were sent upstream
+Source1: %{pkg_name}.desktop
+Source2: %{pkg_name}-qt.desktop
+Source3: extension.js
+Source4: metadata.json
+Patch0: %{name}-1.9.3-compilefix.patch
Requires: pygtk2
+#Requires(post): chkconfig
+#Requires(preun): chkconfig
+# This is for /sbin/service
+#Requires(preun): initscripts
+
BuildArch: noarch
-BuildRequires: python2-devel desktop-file-utils
+BuildRequires: python2-devel desktop-file-utils gettext
%description
-A perfect calendar with Gregorian, Jalali and Hijri support for GNU/Linux.
-It is written in PyGTK and can reside in system tray like an applet.
+StarCalendar is a full-featured international calendar written in Python,
+with both PyGTK and PyQt interfaces, that supports Jalai(Iranian),
+Hijri(Islamic), and Indian National calendars, as well as common
+English(Gregorian) calendar
%prep
-%setup -q -n %{name}-%{version}-src
-find -type f -not -name "*.py" -exec chmod a-x {} \;
-chmod a+x src/lang
+%setup -q -n %{pkg_name}-%{version}
+%patch0 -p1 -b .compilefix
+sed -i.sudo "s/sudo//" locale.d/install
+
+#find -type f -not -name "*.py" -exec chmod a-x {} \;
find -name "*.py" -exec sh -c 'if ! grep "^#\!" {} &> /dev/null; then \
sed -i -e "1i#!/usr/bin/python" {}; fi' \;
%build
-rm -f src/{customday-new.py,htmlview.py,starcal_main.py}
-cat > starcal <<EOF
-#!/bin/sh
-SRC_DIR="%{_datadir}/starcal/src"
-python "\$SRC_DIR/starcal.py" "\$@"
-EOF
-chmod a+x starcal
%install
-rm -rf %{buildroot}
-mkdir -p %{buildroot}%{_datadir}/%{name} %{buildroot}%{_bindir}\
- %{buildroot}%{_datadir}/pixmaps/
-cp -a pixmaps plugins src %{buildroot}%{_datadir}/%{name}
-cp -p %{name} %{buildroot}%{_bindir}
-ln -s %{_datadir}/%{name}/pixmaps/%{name}.png %{buildroot}%{_datadir}/pixmaps/
+./install %{buildroot} --for-pkg
+
+# install Gnome shell's extension
+mkdir -p %{buildroot}%{_datadir}/gnome-shell/extensions/starcal at hedayatvk.wordpress.com
+install -p -m 644 %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/gnome-shell/extensions/starcal at hedayatvk.wordpress.com/
+
+# cleanups
+rm -rf %{buildroot}%{_datadir}/doc/
+rm -rf %{buildroot}/etc/init.d/ %{buildroot}%{_prefix}/lib/
+rm -rf \
+ %{buildroot}%{_datadir}/%{pkg_name}/{*install*,README,about,donate,license} \
+ %{buildroot}%{_datadir}/%{pkg_name}/locale.d
+find %{buildroot}%{_datadir}/%{pkg_name} -name "*compilefix" -delete
+
+#mkdir -p %{buildroot}%{_initddir}/
+#cp scripts/starcal2d %{buildroot}%{_initddir}
desktop-file-install \
- --dir=%{buildroot}/%{_datadir}/applications %{SOURCE1}
-
-%clean
-rm -rf %{buildroot}
+ --dir=%{buildroot}/%{_datadir}/applications %{SOURCE1} %{SOURCE2}
+%find_lang %{pkg_name}
-%files
-%defattr(-,root,root,-)
-%doc ChangeLog src/license
+#%post
+#/sbin/chkconfig --add starcal2d
+
+#%preun
+#if [ $1 -eq 0 ] ; then
+# /sbin/service starcal2d stop >/dev/null 2>&1
+# /sbin/chkconfig --del starcal2d
+#fi
+
+%files -f %{pkg_name}.lang
+%doc ChangeLog authors license copyright donate README
%{_bindir}/*
-%{_datadir}/%{name}
-%{_datadir}/pixmaps/*
+%{_datadir}/%{pkg_name}
%{_datadir}/applications/*
+%{_datadir}/pixmaps/*
+#%{_prefix}/lib/bonobo/servers/GNOME_Starcal2Applet.server
+%{_datadir}/icons/hicolor/*/apps/starcal2.png
+#%{_initddir}/starcal2d
+%{_datadir}/gnome-shell/extensions/*
%changelog
+* Sat Jul 23 2011 Hedayat Vatankhah <hedayat.fwd+rpmchlog at gmail.com> - 1.9.3-1
+- Updated to 1.9.3
+- removed defattr
+- removed starcal daemon; doesn't seem to be reasonable (we don't have
+ system-wide events!)
+- added gnome-shell extension
+
+* Fri Jun 10 2011 Hedayat Vatankhah <hedayat.fwd+rpmchlog at gmail.com> - 1.9.2-1
+- Updated to 1.9.2 version
+
* Mon Feb 21 2011 Hedayat Vatankhah <hedayat.fwd+rpmchlog at gmail.com> - 1.5.3-1
- Initial version
diff --git a/starcal.desktop b/starcal2-qt.desktop
similarity index 52%
copy from starcal.desktop
copy to starcal2-qt.desktop
index 6dc60c0..6f2967a 100644
--- a/starcal.desktop
+++ b/starcal2-qt.desktop
@@ -1,8 +1,8 @@
[Desktop Entry]
-Name=StarCalendar
-Comment=A desktop calendar with Gregorian, Jalali and Hijri support
-Exec=starcal
-Icon=starcal
+Name=StarCalendar (Qt)
+Comment=A desktop calendar with Gregorian, Jalali and Hijri support (Qt Interface)
+Exec=starcal2-qt
+Icon=starcal2
Terminal=false
Type=Application
-Categories=Office;Calendar;GTK;
+Categories=Office;Calendar;
diff --git a/starcal.desktop b/starcal2.desktop
similarity index 85%
rename from starcal.desktop
rename to starcal2.desktop
index 6dc60c0..825d746 100644
--- a/starcal.desktop
+++ b/starcal2.desktop
@@ -1,8 +1,8 @@
[Desktop Entry]
Name=StarCalendar
Comment=A desktop calendar with Gregorian, Jalali and Hijri support
-Exec=starcal
-Icon=starcal
+Exec=starcal2
+Icon=starcal2
Terminal=false
Type=Application
Categories=Office;Calendar;GTK;
More information about the scm-commits
mailing list