-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfortuner2.spec
77 lines (61 loc) · 1.93 KB
/
fortuner2.spec
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
# RPM spec file for fortuner2.
# It's written by upstream and tries to be usable for many distros and
# should be updated at every release.
# Installation directories for the Makefile of the package.
%global fortuner2_directories prefix=%{_prefix} sysconfdir=%{_sysconfdir}
Name: fortuner2
Version: 2014.11.1
Release: 0.2%{?dist}
Summary: Shows fortunes as notifications
License: GPLv3+
%if 0%{?mdkver}
Group: Toys
%else
%if 0%{?suse_version}
Group: Amusements/Toys/Other
%else
Group: Amusements/Games
%endif
%endif
URL: https://github.com/jnumm/fortuner2
Source: https://github.com/jnumm/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: /usr/bin/msgfmt
%if 0%{?suse_version}
Requires: fortune
%else
Requires: fortune-mod
%endif
Requires: /usr/bin/gettext.sh
Requires: /usr/bin/notify-send
%description
fortuner2 displays a notification containing a random adage. The adages
come from fortune program.
It uses notify-send to deliver the adages to the notification daemon
which in turn shows them to the user.
It has about the same functionality as fortuner, but the implementation
is lighter. fortuner is a C++ application and fortuner2 is a shell
script.
%prep
%setup -q
%build
make %{?_smp_mflags} %{fortuner2_directories}
%install
make install DESTDIR=%{buildroot} %{fortuner2_directories}
%find_lang %{name}
%files -f %{name}.lang
%doc README.md COPYING doc/fortuner2.conf.ex
%{_bindir}/*
%{_datadir}/appdata/*
%{_datadir}/applications/*
%{_datadir}/icons/hicolor/*
%{_mandir}/man6/*
%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 || :