[hamster-time-tracker] Initial commit. rhbz #1036254

Ankur Sinha ankursinha at fedoraproject.org
Wed Dec 4 01:11:14 UTC 2013


commit 4645dbcf91c34a1b43ac1238ac3f80872d576840
Author: Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur at gmail.com>
Date:   Wed Dec 4 12:11:00 2013 +1100

    Initial commit. rhbz #1036254

 .gitignore                                       |    1 +
 hamster-time-tracker-1.03.3-file-locations.patch |   20 ++++
 hamster-time-tracker-1.03.3-service-dbus1.patch  |    7 +
 hamster-time-tracker-1.03.3-service-dbus2.patch  |    7 +
 hamster-time-tracker.appdata.xml                 |   24 ++++
 hamster-time-tracker.spec                        |  131 ++++++++++++++++++++++
 sources                                          |    1 +
 7 files changed, 191 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..fa4fc3a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/hamster-hamster-time-tracker-1.03.3.tar.gz
diff --git a/hamster-time-tracker-1.03.3-file-locations.patch b/hamster-time-tracker-1.03.3-file-locations.patch
new file mode 100644
index 0000000..c8d4658
--- /dev/null
+++ b/hamster-time-tracker-1.03.3-file-locations.patch
@@ -0,0 +1,20 @@
+--- wscript.orig	2013-11-30 16:25:29.490867297 +1100
++++ wscript	2013-11-30 16:25:58.016648492 +1100
+@@ -42,7 +42,7 @@
+ 
+ 
+ def build(bld):
+-    bld.install_files('${LIBDIR}/hamster-time-tracker',
++    bld.install_files('${BINDIR}/',
+                       """src/hamster-service
+                          src/hamster-windows-service
+                       """,
+@@ -85,7 +85,7 @@
+     def post(ctx):
+         # Postinstall tasks:
+         # gnome.postinstall_scrollkeeper('hamster-time-tracker') # Installing the user docs
+-        gnome.postinstall_schemas('hamster-time-tracker') # Installing GConf schemas
++        #gnome.postinstall_schemas('hamster-time-tracker') # Installing GConf schemas
+         gnome.postinstall_icons() # Updating the icon cache
+ 
+ 
diff --git a/hamster-time-tracker-1.03.3-service-dbus1.patch b/hamster-time-tracker-1.03.3-service-dbus1.patch
new file mode 100644
index 0000000..f5294de
--- /dev/null
+++ b/hamster-time-tracker-1.03.3-service-dbus1.patch
@@ -0,0 +1,7 @@
+--- org.gnome.hamster.service.in.orig	2013-11-30 17:09:02.817831314 +1100
++++ org.gnome.hamster.service.in	2013-11-30 17:09:17.150721499 +1100
+@@ -1,3 +1,3 @@
+ [D-BUS Service]
+ Name=org.gnome.Hamster
+-Exec=@LIBDIR@/hamster-time-tracker/hamster-service
++Exec=@BINDIR@/hamster-service
diff --git a/hamster-time-tracker-1.03.3-service-dbus2.patch b/hamster-time-tracker-1.03.3-service-dbus2.patch
new file mode 100644
index 0000000..d5734f5
--- /dev/null
+++ b/hamster-time-tracker-1.03.3-service-dbus2.patch
@@ -0,0 +1,7 @@
+--- org.gnome.hamster.Windows.service.in.orig	2013-11-30 17:09:25.866654724 +1100
++++ org.gnome.hamster.Windows.service.in	2013-11-30 17:09:39.247552206 +1100
+@@ -1,3 +1,3 @@
+ [D-BUS Service]
+ Name=org.gnome.Hamster.WindowServer
+-Exec=@LIBDIR@/hamster-time-tracker/hamster-windows-service
++Exec=@BINDIR@/hamster-windows-service
diff --git a/hamster-time-tracker.appdata.xml b/hamster-time-tracker.appdata.xml
new file mode 100644
index 0000000..2548ca4
--- /dev/null
+++ b/hamster-time-tracker.appdata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application>
+    <id type="desktop">hamster-time-tracker.desktop</id>
+    <licence>CC0</licence>
+    <description>
+        <p>
+            Project Hamster is time tracking for individuals. It helps you to keep track on
+            how much time you have spent during the day on activities you choose to track. 
+        </p>
+        <p>
+            Whenever you change from doing one task to other, you change your current
+            activity in Hamster. After a while you can see how many hours you have spent on
+            what. Maybe print it out, or export to some suitable format, if time reporting
+            is a request of your employee. 
+        </p>
+    </description>
+    <url type="homepage">http://projecthamster.wordpress.com/</url>
+    <screenshots>
+        <screenshot type="default">http://farm3.staticflickr.com/2715/4332774392_1302c2922e_o_d.png</screenshot>
+        <screenshot>http://farm5.staticflickr.com/4046/5160499613_576efc8441_b_d.jpg</screenshot>
+    </screenshots>
+    <updatecontact>toms.baugis at gmail.com</updatecontact>
+</application>
+
diff --git a/hamster-time-tracker.spec b/hamster-time-tracker.spec
new file mode 100644
index 0000000..e4cb526
--- /dev/null
+++ b/hamster-time-tracker.spec
@@ -0,0 +1,131 @@
+Name:        hamster-time-tracker
+Version:    1.03.3
+Release:    2%{?dist}
+Summary:    The Linux time tracker
+
+License:    GPLv3+
+URL:        http://projecthamster.wordpress.com/
+# wget --content-disposition https://github.com/projecthamster/hamster/archive/%{name}-%{version}.tar.gz
+Source0:    hamster-%{name}-%{version}.tar.gz
+Source1:    %{name}.appdata.xml
+
+# Move service files to bindir rather than libdir
+# Stop gschema installation etc.
+# http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#GConf
+Patch0:     %{name}-1.03.3-file-locations.patch
+
+# Not required. Packaging SIG cleared this up:
+# https://lists.fedoraproject.org/pipermail/packaging/2013-December/009836.html
+# Only the gconf registration is to be done via scriptlets
+#Patch1:     %{name}-1.03.3-no-install-schemas.patch
+
+# Correct service files to point to BINDIR rather than LIBDIR
+Patch2:     %{name}-1.03.3-service-dbus1.patch
+Patch3:     %{name}-1.03.3-service-dbus2.patch
+
+BuildArch:  noarch
+BuildRequires:    desktop-file-utils
+BuildRequires:    gettext intltool
+BuildRequires:    glib2-devel dbus-glib
+BuildRequires:    docbook-utils gnome-doc-utils libxslt
+Requires:         dbus
+Requires:         hicolor-icon-theme
+Requires:         bash-completion
+
+BuildRequires: GConf2
+Requires(pre): GConf2
+Requires(post): GConf2
+Requires(preun): GConf2
+
+
+%description
+Project Hamster is time tracking for individuals. It helps you to keep track on
+how much time you have spent during the day on activities you choose to track. 
+
+Whenever you change from doing one task to other, you change your current
+activity in Hamster. After a while you can see how many hours you have spent on
+what. Maybe print it out, or export to some suitable format, if time reporting
+is a request of your employee. 
+
+%prep
+%setup -q -n hamster-%{name}-%{version}
+%patch0
+#%patch1
+%patch2
+%patch3
+
+# remove shebang
+sed -ibackup '1d' src/hamster/today.py
+
+%build
+export CFLAGS="%{optflags}"
+export CXXFLAGS="%{optflags}"
+export LINKFLAGS="-Wl,-z,relro"
+
+./waf configure -vv --prefix=%{_prefix} --datadir=%{_datadir} 
+./waf build -vv %{?_smp_mflags}
+
+
+%install
+./waf install --destdir=%{buildroot}
+
+mkdir -p %{buildroot}/%{_datadir}/appdata/
+cp %{SOURCE1} %{buildroot}/%{_datadir}/appdata/  -v
+
+%find_lang %{name} --with-gnome
+
+desktop-file-validate %{buildroot}/%{_datadir}/applications/hamster*desktop
+
+%pre
+%gconf_schema_prepare %{name}
+%gconf_schema_obsolete %{name}
+
+%post
+%gconf_schema_upgrade %{name}
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun
+if [ $1 -eq 0 ] ; then
+    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+
+%posttrans
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
+%preun
+%gconf_schema_remove %{name}
+
+%files -f %{name}.lang
+%doc AUTHORS COPYING MAINTAINERS NEWS 
+%{_bindir}/hamster*
+%{python_sitelib}/hamster
+%{_datadir}/%{name}/
+%{_datadir}/dbus-1/services/*hamster*.service
+
+%dir %{_sysconfdir}/bash_completion.d
+%{_sysconfdir}/bash_completion.d/hamster.bash
+
+%{_sysconfdir}/gconf/schemas/hamster-time-tracker.schemas
+
+%{_datadir}/applications/hamster*desktop
+%{_datadir}/icons/hicolor/*/apps/%{name}.*
+
+%dir %{_datadir}/gnome/help
+
+%{_datadir}/appdata/
+%{_datadir}/appdata/%{name}.appdata.xml
+
+
+%changelog
+* Mon Dec 02 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 1.03.3-2
+- Fixes as per https://bugzilla.redhat.com/show_bug.cgi?id=1036254
+- Correct schame functions
+- Own gnome help dir
+- Own bash completion dir
+- schema and bash completion files do not need to be %config
+- https://lists.fedoraproject.org/pipermail/packaging/2013-December/009834.html
+
+* Sat Nov 30 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 1.03.3-1
+- Initial rpm build
+
diff --git a/sources b/sources
index e69de29..190ba9e 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+dfb44bbf7c6d31d08134a022e8a2a984  hamster-hamster-time-tracker-1.03.3.tar.gz


More information about the scm-commits mailing list