-
Notifications
You must be signed in to change notification settings - Fork 1
/
deepin-movie.spec
123 lines (99 loc) · 3.4 KB
/
deepin-movie.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
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
Name: deepin-movie
Version: 2.2.14
Release: 2%{?dist}
Summary: Deepin Movie based on QtAV
Summary(zh_CN): 深度影音
License: GPLv3
URL: https://github.com/linuxdeepin/deepin-movie
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: gettext
BuildRequires: deepin-gettext-tools
BuildRequires: desktop-file-utils
Requires: dbus-python
Requires: mediainfo
Requires: python-qt5
Requires: python-xpyb
Requires: python-magic
Requires: python2-ass
Requires: python2-pysrt
Requires: python2-peewee
Requires: python2-requests
Requires: python2-bottle
Requires: python2-pyopengl
Requires: qtav-qml-module
Requires: python2-xpybutil
Requires: python2-deepin-utils
Requires: deepin-menu
Requires: deepin-qml-widgets
Requires: deepin-qml-dbus-factory
Requires: deepin-qt5integration
Recommends: deepin-manual
%description
Deepin movie for deepin desktop environment.
%description -l zh_CN
深度影音播放器, 后端基于QtAV, 支持解码大多数视频格式.
%prep
%setup -q
%build
%{__python2} configure.py
deepin-generate-mo locale/locale_config.ini
chmod 0755 src/main.py
# Make python shebang uniq
find -iname "*.py" | xargs sed -i '1s@^#!/usr/bin/python@#!/usr/bin/python2@'
find -iname "*.py" | xargs sed -i '1s@^#!/usr/bin/env python@#!/usr/bin/python2@'
sed -i '1s@^#! /usr/bin/env python@#!/usr/bin/python2@' src/utils/misc.py
for lib in $(find -iname "*.py" -perm 644) ; do
sed '1{\@^#!/usr/bin/python2@d}' $lib > $lib.new &&
touch -r $lib $lib.new &&
mv $lib.new $lib
done
%install
%make_install PREFIX="%{_prefix}"
# Fix cannot register existing type 'GdkDisplayManager'
# https://bbs.archlinux.org/viewtopic.php?id=214147&p=2
rm -f %{buildroot}%{_bindir}/%{name}
cat > %{buildroot}%{_bindir}/%{name} << EOF
#!/bin/bash
QT_QPA_PLATFORMTHEME=deepin %{_datadir}/%{name}/main.py
EOF
chmod 0755 %{buildroot}%{_bindir}/%{name} \
%{buildroot}%{_datadir}/%{name}/main.py
%find_lang %{name}
%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null ||:
/usr/bin/update-desktop-database -q ||:
%postun
if [ $1 -eq 0 ]; then
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null ||:
/usr/bin/gtk-update-icon-cache -f -t -q %{_datadir}/icons/hicolor ||:
fi
/usr/bin/update-desktop-database -q ||:
%posttrans
/usr/bin/gtk-update-icon-cache -f -t -q %{_datadir}/icons/hicolor ||:
%files -f %{name}.lang
%doc README.md
%license LICENSE
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_datadir}/dman/%{name}/
%{_datadir}/applications/*
%{_datadir}/icons/hicolor/*
%changelog
* Sun Aug 06 2017 Zamir SUN <[email protected]> - 2.2.14-2
- Remove group tag
- Fix rpmlint shebang error
* Fri Jul 14 2017 mosquito <[email protected]> - 2.2.14-1.git69123ed
- Update to 2.2.14
* Fri May 19 2017 mosquito <[email protected]> - 2.2.13-1.gita1ba8c3
- Update to 2.2.13
* Sat Jan 28 2017 mosquito <[email protected]> - 2.2.11-2.git7896696
- Fix cannot register existing type 'GdkDisplayManager'
* Tue Jan 17 2017 mosquito <[email protected]> - 2.2.11-1.git7896696
- Update to 2.2.11
* Thu Jul 16 2015 mosquito <[email protected]> - 2.2.2-2.git53adfc6
- python-peewee(>=2.3.0,<=2.4.4)
- remove some depends
* Sat Jul 4 2015 mosquito <[email protected]> - 2.2.2-1.git53adfc6
- Initial build