1 |
%define tarball_name Coherence |
2 |
|
3 |
Name: python-coherence |
4 |
Summary: Python framework to participate in digital living networks |
5 |
Version: 0.6.6.2 |
6 |
Release: %mkrel 4 |
7 |
Group: Development/Python |
8 |
URL: https://coherence.beebits.net/ |
9 |
Source0: https://coherence.beebits.net/download/%{tarball_name}-%{version}.tar.gz |
10 |
Source1: coherence.conf |
11 |
Source2: coherence-32x32.png |
12 |
Patch0: Coherence-0.6.0-daemon_name_fix.diff |
13 |
BuildArch: noarch |
14 |
License: MIT |
15 |
Provides: coherence = %version |
16 |
Requires: python-twisted-core |
17 |
Requires: python-twisted-web |
18 |
Requires: python-twisted-conch >= 0.8 |
19 |
#Requires: python-louie |
20 |
Requires: python-axiom >= 0.5.7 |
21 |
Requires: python-epsilon >= 0.5.8 |
22 |
Requires: python-configobj |
23 |
Requires: python-celementtree |
24 |
Requires: python-elementtree |
25 |
Requires: python-dbus |
26 |
Requires: python-mechanize |
27 |
Requires: pyid3lib |
28 |
# Gstreamer |
29 |
Requires: gstreamer0.10-python |
30 |
Requires: gstreamer0.10-flac |
31 |
Requires: gstreamer0.10-plugins-base |
32 |
|
33 |
Requires: python-pkg-resources |
34 |
Requires: python-nose |
35 |
Requires: python-sqlite2 |
36 |
Requires(post): rpm-helper |
37 |
Requires(preun): rpm-helper |
38 |
BuildRequires: python-setuptools, imagemagick |
39 |
BuildRequires: python-twisted-core |
40 |
BuildRequires: python-twisted-web |
41 |
BuildRequires: python-devel |
42 |
|
43 |
%description |
44 |
Coherence is a framework written in Python enabling applications to participate |
45 |
in digital living networks, such as the UPnP universe. |
46 |
|
47 |
%files |
48 |
%defattr(-,root,root) |
49 |
%doc docs/coherence.conf.example |
50 |
%py_puresitedir/* |
51 |
|
52 |
|
53 |
#------------------------------------------------------------ |
54 |
|
55 |
%package -n coherence-applet |
56 |
Summary: Applet for controlling coherence |
57 |
Group: Networking/File transfer |
58 |
Requires: coherence-mediaserver |
59 |
Requires: python-qt4 |
60 |
Obsoletes: %name-applet |
61 |
|
62 |
%description -n coherence-applet |
63 |
A simple desktop applet to control (start/stop) coherence |
64 |
|
65 |
%files -n coherence-applet |
66 |
%defattr(-,root,root) |
67 |
%_bindir/applet-coherence |
68 |
%{_iconsdir}/coherence/* |
69 |
%{_datadir}/applications/coherence-applet.desktop |
70 |
%{_iconsdir}/coherence.png |
71 |
%{_liconsdir}/coherence.png |
72 |
%{_miconsdir}/coherence.png |
73 |
|
74 |
#------------------------------------------------------------ |
75 |
|
76 |
%package -n coherence-mediaserver |
77 |
Summary: A DLNA/UPnP MediaServer/MediaRenderer |
78 |
Group: Networking/File transfer |
79 |
Requires: %name |
80 |
|
81 |
%description -n coherence-mediaserver |
82 |
As a stand-alone application Coherence acts as a DLNA/UPnP MediaServer and |
83 |
exports local and remote media files via its plugins to other UPnP clients. |
84 |
|
85 |
%files -n coherence-mediaserver |
86 |
%_bindir/coherence |
87 |
%_initrddir/coherence |
88 |
%config(noreplace) %_sysconfdir/coherence/*conf |
89 |
/srv/public |
90 |
%{_datadir}/dbus-1/services/ |
91 |
|
92 |
%post -n coherence-mediaserver |
93 |
%_post_service coherence |
94 |
|
95 |
%preun -n coherence-mediaserver |
96 |
%_preun_service coherence |
97 |
|
98 |
#------------------------------------------------------------ |
99 |
%prep |
100 |
%setup -q -n %{tarball_name}-%version |
101 |
%patch0 -p0 |
102 |
|
103 |
%build |
104 |
%{__python} setup.py build |
105 |
|
106 |
%install |
107 |
rm -rf %buildroot |
108 |
mkdir -p %buildroot/%_initrddir |
109 |
mkdir -p %buildroot/%_sysconfdir/coherence |
110 |
mkdir -p %buildroot/usr/share/icons/coherence |
111 |
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications/ |
112 |
mkdir -p $RPM_BUILD_ROOT/srv/public |
113 |
# Install the D-Bus service file |
114 |
%{__mkdir_p} %{buildroot}/%{_datadir}/dbus-1/services |
115 |
|
116 |
PYTHONDONTWRITEBYTECODE= %{__python} setup.py install -O1 --root=%buildroot --skip-build |
117 |
install -m 755 misc/coherence-initscript.sh %buildroot/%_initrddir/coherence |
118 |
install -m 644 %SOURCE1 %buildroot/%_sysconfdir/coherence |
119 |
mv "%buildroot/%py_puresitedir/misc/Desktop-Applet/tango-system-file-manager.png" %buildroot/usr/share/icons/coherence |
120 |
install -m 644 misc/org.Coherence.service %{buildroot}/%{_datadir}/dbus-1/services/ |
121 |
|
122 |
# install icons |
123 |
mkdir -p %{buildroot}%{_miconsdir} |
124 |
mkdir -p %{buildroot}%{_iconsdir} |
125 |
mkdir -p %{buildroot}%{_liconsdir} |
126 |
install -m 644 %SOURCE2 %{buildroot}%{_iconsdir}/coherence.png |
127 |
convert -scale 16x16 %SOURCE2 $RPM_BUILD_ROOT%{_miconsdir}/coherence.png |
128 |
convert -scale 48x48 %SOURCE2 $RPM_BUILD_ROOT%{_liconsdir}/coherence.png |
129 |
|
130 |
# menu |
131 |
cat > $RPM_BUILD_ROOT%{_datadir}/applications/coherence-applet.desktop <<EOF |
132 |
[Desktop Entry] |
133 |
Encoding=UTF-8 |
134 |
Name=Coherence |
135 |
Comment=DLNA/UPnP MediaServer/MediaRenderer |
136 |
Exec=applet-coherence |
137 |
Icon=coherence |
138 |
StartupNotify=true |
139 |
Terminal=false |
140 |
Type=Application |
141 |
Categories=X-MandrivaLinux-Internet;X-MandrivaLinux-CrossDesktop; |
142 |
EOF |
143 |
|
144 |
|