Blob Blame History Raw
%global srcname   hamster
%global candidate rc1

%global srcurl{srcname}/%{srcname}

Name:       %{srcname}-time-tracker
Version:    2.0
Release:    0.8.%{candidate}%{?dist}
Summary:    The Linux time tracker

License:    GPLv3+
URL:        http://project%{srcname}
Source0:    %{srcurl}/archive/v%{version}-%{candidate}.tar.gz#/%{name}-%{version}-%{candidate}.tar.gz
Source1:    %{name}.appdata.xml

# Move service files to bindir rather than libdir
# Stop gschema installation etc.
Patch0:     %{name}-1.03.3-file-locations.patch

# Correct service files to point to BINDIR rather than LIBDIR
Patch1:     %{name}-1.03.3-service-dbus1.patch
Patch2:     %{name}-1.03.3-service-dbus2.patch

# issue #254: temp remove WATCH_HARD_LINKS flag from file monitor
# as it causes segfaults on gnome 3.18
Patch3:     %{srcurl}/commit/d869f7da0eec48df1f52771fed8ed12b12fbab61.patch
# fix warnings in the console (gnome 3.18; should be backwards compat)
Patch4:     %{srcurl}/commit/03546fd08d4ef88b75f12430940b1c9bd9ac18b2.patch
# Fix division by zero (#245).  PR#296
# rhbz#1317087 -part1, lib/ Fix version warning
# rhbz#1317087 -part2, Fix TargetFlags. Should fix issue#306, PR#307

BuildArch:  noarch

BuildRequires:    gettext intltool
BuildRequires:    glib2-devel dbus-glib
BuildRequires:    docbook-utils gnome-doc-utils libxslt

BuildRequires:    desktop-file-utils

Requires:         dbus
Requires:         hicolor-icon-theme
Requires:         bash-completion

Requires:         gnome-python2-gconf
Requires:         pyxdg

# FIXME unknown dependency for introspection on epel
%if 0%{?fedora} >= 23
Requires:         python-gobject
%if 0%{?fedora} == 22
Requires:         pygobject3

# disable workspaces at epel cause lack of gnome, rhbz#1046077
%if 0%{?fedora}
Requires:         gnome-python2-libwnck

# rhbz#1285405 - hamster requires python dbus module
Requires:         dbus-python

BuildRequires:    GConf2
Requires(pre):    GConf2
Requires(post):   GConf2
Requires(preun):  GConf2

Project %{srcname} 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 %{srcname}. 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. 

%autosetup -p1 -n%{srcname}-%{version}-%{candidate}
# remove shebang
sed -ibackup '1d' src/%{srcname}/ # src/%{srcname}/

export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
export LINKFLAGS="-Wl,-z,relro"
./waf configure -vv --prefix=%{_prefix} --datadir=%{_datadir} 
./waf build -vv %{?_smp_mflags}

./waf install --destdir=%{buildroot}
install -p -m0644 %{SOURCE1} -D %{buildroot}/%{_datadir}/appdata/%{name}.appdata.xml
%find_lang %{name} --with-gnome

# Fedora 19's build barfs if I mention them all together using a wildcard.
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}-overview.desktop
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{srcname}-windows-service.desktop

%gconf_schema_prepare %{name}
%gconf_schema_obsolete %{name}

%gconf_schema_upgrade %{name}
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

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 || :

/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :

%gconf_schema_remove %{name}

%files -f %{name}.lang
%license COPYING

# schema and bash completion files do not need to be %%config


# FIXME not sure about ownership for gnome/help
%dir %{_datadir}/gnome/help


* Mon Mar 21 2016 Raphael Groner <> - 2.0-0.8.rc1
- ugly workaround for different package name in f22 to satisfy depcheck

* Sat Mar 12 2016 Raphael Groner <> - 2.0-0.7.rc1
- fix version warning and TargetFlags, rhbz#1317087
- consolidate patches to same patch level and use autosetup macro

* Sat Mar 12 2016 Raphael Groner <> - 2.0-0.6.rc1
- add R: python-gobject, rhbz#1316230

* Thu Mar 03 2016 Raphael Groner <> - 2.0-0.5.rc1
- apply patch against ZeroDivisionError, rhbz#1309613

* Mon Feb 15 2016 Raphael Groner <> - 2.0-0.4.rc1
- readd lost build conditional for epel, rhbz#1046077

* Mon Feb 15 2016 Raphael Groner <> - 2.0-0.3.rc1
- add upstream patches for GNOME 3.18, rhbz#1074967, rhbz#1307256

* Tue Feb 02 2016 Raphael Groner <> - 2.0-0.2.rc1
- R: dbus-python, rhbz#1285405

* Mon Dec 21 2015 Raphael Groner <> - 2.0-0.1.rc1
- bump to version 2.0-rc1
- small modernization

* Wed Jun 17 2015 Fedora Release Engineering <> - 1.04-5
- Rebuilt for

* Sun Nov 23 2014 Ankur Sinha <ankursinha AT fedoraproject DOT org> 1.04-4
- Patch for rhbz#1074967

* Tue Jul 15 2014 Ankur Sinha <ankursinha AT fedoraproject DOT org> 1.04-3
- Add requires on pyxdg

* Sat Jun 07 2014 Fedora Release Engineering <> - 1.04-2
- Rebuilt for

* Mon Feb 10 2014 Ankur Sinha <ankursinha AT fedoraproject DOT org> 1.04-1
- Update to latest upstream release. 

* Mon Dec 30 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 1.03.3-6
- Update desktop-file-validate command for F19

* Sat Dec 28 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 1.03.3-5
- Add patch for notification fix
- rhbz#1046991
- upstream issue #127
- upstream issue #117

* Tue Dec 24 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 1.03.3-4
- Add wnck dependency so users can use workspaces out of the box

* Tue Dec 17 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 1.03.3-3
- Add missing gnome-python2-gconf requirement

* Mon Dec 02 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 1.03.3-2
- Fixes as per rhbz#1036254
- Correct schame functions
- Own gnome help dir
- Own bash completion dir
- schema and bash completion files do not need to be %%config

* Sat Nov 30 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 1.03.3-1
- Initial rpm build