aboutsummaryrefslogtreecommitdiffstats
path: root/scudcloud-1.1/scudcloud.spec
blob: a7a5f1fa95d930d2e0b293689fac730120a96cb6 (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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#
# spec file for package scudcloud
#
# Copyright (c) 2015 Marcin Trendota (moonwolf@poczta.onet.pl)
# Copyright (c) 2015 Marcin Bajor (marcin.bajor@gmail.com)
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           scudcloud
Version:        1.0
Release:        2%{?dist}
Summary:        Non official desktop client for SlackĀ©
License:        MIT
Group:          Applications/Internet
BuildRequires:  python

%if (0%{?suse_version} || 0%{?fedora_version})
BuildRequires:  fdupes
%endif

%if 0%{?suse_version}
BuildRequires: update-desktop-files
BuildRequires: hicolor-icon-theme
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils
%else
Requires(post): xdg-utils
Requires(postun): xdg-utils
%endif

Url:            https://github.com/raelgc/scudcloud/
Source:         %{name}-%{version}.tar.gz
Requires:       python3
Requires:       python3-qt4
%if 0%{?suse_version}
Requires:       google-lato-fonts
%else
Requires:       lato-fonts
%endif
Requires:       libqt4-webkit-qupzillaplugins
Requires:       python3-hunspell
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
ScudCloud uses the QT library + Webkit to render the web version of Slack,
but using the QWebkit-Native bridge to improve desktop integration with:
* multiple teams support,
* native system notifications,
* count of unread direct mentions at launcher/sytray icon,
* alert/wobbling on new messages,
* channels quicklist (Unity only),
* optional "Close to Tray".

%prep
%setup -q

%install
INSTALL="/opt/scudcloud"
cd scudcloud-1.0

mkdir -p %{buildroot}/$INSTALL/lib
mkdir -p %{buildroot}/$INSTALL/resources
mkdir -p %{buildroot}%{_prefix}/bin
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
mkdir -p %{buildroot}%{_datadir}/icons/mono-dark/scalable/apps
mkdir -p %{buildroot}%{_datadir}/icons/mono-light/scalable/apps


install -m0644 lib/*.py %{buildroot}/$INSTALL/lib
install -m0644 resources/* %{buildroot}/$INSTALL/resources
install -m0755 scudcloud %{buildroot}/$INSTALL
install -m0644 LICENSE %{buildroot}/$INSTALL

install -m0644 systray/hicolor/* %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
install -m0644 systray/mono-dark/* %{buildroot}%{_datadir}/icons/mono-dark/scalable/apps
install -m0644 systray/mono-light/* %{buildroot}%{_datadir}/icons/mono-light/scalable/apps

%if 0%{!?suse_version}
install -m0644 scudcloud.desktop %{buildroot}%{_datadir}/applications
%endif

ln -sf $INSTALL/scudcloud %{buildroot}%{_bindir}/scudcloud

%if 0%{?suse_version}
%suse_update_desktop_file -i %{name} Network InstantMessaging
%else
desktop-file-install --dir %{buildroot}%{_datadir}/applications %{name}.desktop
%endif

%if (0%{?suse_version} || 0%{?fedora_version})
%fdupes %{buildroot}/%{_prefix}
%endif

%post
%if 0%{?suse_version}
%desktop_database_post
%icon_theme_cache_post
%else
xdg-icon-resource forceupdate --theme hicolor 2> /dev/null || :
xdg-icon-resource forceupdate --theme mono-dark 2> /dev/null || :
xdg-icon-resource forceupdate --theme mono-light 2> /dev/null || :
xdg-desktop-menu forceupdate 2> /dev/null || :
%endif


%postun
%if 0%{?suse_version}
%desktop_database_postun
%icon_theme_cache_postun
%else
if [ $1 -eq 0 ] ; then
xdg-icon-resource forceupdate --theme hicolor 2> /dev/null || :
xdg-icon-resource forceupdate --theme mono-dark 2> /dev/null || :
xdg-icon-resource forceupdate --theme mono-light 2> /dev/null || :
xdg-desktop-menu forceupdate 2> /dev/null || :
fi
%endif


%files
%defattr(-,root,root)
%dir /opt/scudcloud
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps
%dir %{_datadir}/icons/mono-dark
%dir %{_datadir}/icons/mono-dark/scalable
%dir %{_datadir}/icons/mono-dark/scalable/apps
%dir %{_datadir}/icons/mono-light
%dir %{_datadir}/icons/mono-light/scalable
%dir %{_datadir}/icons/mono-light/scalable/apps
/opt/scudcloud/*
%{_datadir}/applications/scudcloud.desktop
%{_datadir}/icons/hicolor/scalable/apps/*
%{_datadir}/icons/mono-dark/scalable/apps/*
%{_datadir}/icons/mono-light/scalable/apps/*
%{_bindir}/scudcloud

%changelog
* Sat Sep 26 2015 Marcin Bajor <marcin.bajor@gmail.com>
- Added dependencies: libqt4-webkit-qupzillaplugins and python3-hunspell 
* Mon Sep 21 2015 Marcin Trendota <moonwolf@poczta.onet.pl>
- Add lato-fonts dependency
* Mon Aug 10 2015 Marcin Bajor <marcin.bajor@gmail.com>
- Now build for CentOS, Red Hat Enterprise Linux, openSUSE, SUSE Linux Enterprise Server and others is possible
* Mon May 18 2015 Marcin Trendota <moonwolf@poczta.onet.pl>
- First version