-
Notifications
You must be signed in to change notification settings - Fork 0
/
materialgram.spec
60 lines (49 loc) · 1.73 KB
/
materialgram.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
Name: materialgram
Version: 5.9.0.1
Release: 1%{?dist}
Summary: Telegram Desktop fork with material icons and some improvements
Vendor: burhancodes
Group: Applications/Internet
Packager: Burhanverse <[email protected]>
License: GPLv3
URL: https://github.com/kukuruzka165/materialgram
Source0: https://github.com/kukuruzka165/materialgram/releases/download/v%{version}/materialgram-v%{version}.tar.gz
%description
Telegram Desktop fork with Material Design and other improvements, which is based on the Telegram API and the MTProto secure protocol.
Author: kukuruzka <[email protected]>
%prep
tar -xvf %{_sourcedir}/materialgram-v%{version}.tar.gz -C %{_sourcedir}
cd %{_sourcedir}/
# Fix for Mageia 8
%if 0%{?mageia_version} == 8
sed -i 's/^SingleMainWindow=/X-SingleMainWindow=/' \
%{buildroot}/usr/share/applications/io.github.kukuruzka165.materialgram.desktop
%endif
%build
%install
mkdir -p %{buildroot}/usr/bin
mkdir -p %{buildroot}/usr/share/applications
mkdir -p %{buildroot}/usr/share/dbus-1
mkdir -p %{buildroot}/usr/share/icons
mkdir -p %{buildroot}/usr/share/metainfo
cp -a %{_sourcedir}/usr/bin/materialgram %{buildroot}/usr/bin/
cp -a %{_sourcedir}/usr/share/* %{buildroot}/usr/share/
%files
/usr/bin/materialgram
%dir /usr/share/applications
/usr/share/applications/*
%dir /usr/share/dbus-1
/usr/share/dbus-1/*
%dir /usr/share/icons
/usr/share/icons/*
%dir /usr/share/metainfo
/usr/share/metainfo/*
%preun
pkill -f '/usr/bin/materialgram' || true
%postun
if [ "$1" -eq 0 ]; then
USER_HOME="/home/${SUDO_USER:-$USER}"
if [ -d "$USER_HOME/.local/share/materialgram" ]; then
rm -rf "$USER_HOME/.local/share/materialgram"
fi
fi