summaryrefslogtreecommitdiffstats
path: root/kapow.spec
blob: e19a91df668da538ec71fe1addb0cc286e9c8c0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
%global commit0 63d1400e6036eba3998d2a327d68c6ff27be9d0a
%global gittag0 v1.5.0
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})

Name:           kapow
Version:        1.5.0
Release:        1%{?dist}
Summary:        A punch clock program

License:        GPLv3+
URL:            http://gottcode.org/%{name}
Source0:        https://github.com/gottcode/%{name}/archive/%{gittag0}.tar.gz#/%{name}-%{version}.tar.gz

# Pull request: https://github.com/gottcode/kapow/pull/33
Source1:        %{name}.appdata.xml

BuildRequires:  qt5-qtbase-devel desktop-file-utils
Requires:       hicolor-icon-theme

%description
Kapow is a punch clock program designed to easily keep track of your hours,
whether you're working on one project or many. Simply clock in and out with the
Start/Stop button. If you make a mistake in your hours, you can go back and
edit any of the entries by double-clicking on the session in question. Kapow
also allows you to easily keep track of the hours since you last billed a
client, by providing a helpful "Billed" check box--the totals will reflect your
work after the last billed session. 

%prep
%autosetup -n %{name}-%{version}

%build
%{qmake_qt5} %{name}.pro PREFIX=%{_prefix}
make %{?_smp_mflags}

%install
make install INSTALL_ROOT=%{buildroot} 

mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata/
cp -v %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/appdata/

%find_lang %{name} --with-qt

%check
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop

%post
/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 || :

%files -f %{name}.lang
%license COPYING
%doc CREDITS NEWS README
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_mandir}/man1/%{name}.1*

%dir %{_datadir}/appdata/
%{_datadir}/appdata/%{name}.appdata.xml

%{_datadir}/icons/hicolor/*/apps/%{name}.*

%{_datadir}/pixmaps/%{name}.xpm

# Find lang doesn't find these two files, so I place them manually
%{_datadir}/%{name}/translations/qt_it.qm
%{_datadir}/%{name}/translations/qt_nl.qm
%dir %{_datadir}/%{name}/
%dir %{_datadir}/%{name}/translations

%changelog
* Sun Sep 18 2016 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.5.0-1
- Update to 1.5.0

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.4.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Mon Feb 01 2016 Rex Dieter <rdieter@fedoraproject.org> 1.4.4.2-6
- use %%qmake_qt5 macro to ensure proper build flags

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.4.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1.4.4.2-4
- Rebuilt for GCC 5 C++11 ABI change

* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.4.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.4.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun May 25 2014 Ankur Sinha <ankursinha AT fedoraproject DOT org> 1.4.4.2-1
- Update to new upstream release

* Mon Nov 11 2013 Rex Dieter <rdieter@fedoraproject.org> 1.4.4.1-2
- rebuild (qt5 qreal/arm)

* Tue Oct 22 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 1.4.4.1-1
- Correct directory ownership
- Correct ld flags
- https://bugzilla.redhat.com/show_bug.cgi?id=979767#c8

* Mon Oct 21 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 1.4.4.1-1
- Update as per https://bugzilla.redhat.com/show_bug.cgi?id=979767#c6
- Remove comments 
- Own datadir/name directory
- Own icon directories
- Add an appdata file

* Sun Jun 30 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 1.4.4.1-1
- Initial build
- Cosmetic changes #979767