]>
Commit | Line | Data |
---|---|---|
60f06724 AF |
1 | Summary: Automagically add titles to mpd playlist |
2 | Name: mpd_sima | |
18004edd AF |
3 | Version: 0.10.0 |
4 | Release: 1 | |
60f06724 AF |
5 | License: GPL v3+ |
6 | Group: Applications | |
f796ba50 | 7 | Source0: http://codingteam.net/project/sima/download/file/%{name}_%{version}.tar.xz |
18004edd | 8 | # Source0-md5: 606a7202bea64830237e79f7cb20dc92 |
60f06724 | 9 | Source1: %{name}.service |
60f06724 AF |
10 | URL: http://codingteam.net/project/sima |
11 | BuildRequires: rpm-pythonprov | |
12 | BuildRequires: sed >= 4.0 | |
f796ba50 AF |
13 | BuildRequires: tar >= 1:1.22 |
14 | BuildRequires: xz | |
4cee60f1 | 15 | Requires(post,preun,postun): systemd-units >= 38 |
60f06724 | 16 | Requires: python-mpd |
4cee60f1 | 17 | Requires: systemd-units >= 38 |
60f06724 AF |
18 | Provides: group(mpd_sima) |
19 | Provides: user(mpd_sima) | |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | %description | |
23 | MPD Sima is a python daemon meant to feed MPD playlist with artist | |
24 | similar to your currently playing track, provided that this artist is | |
25 | found in MPD library. | |
26 | ||
27 | This python code allows you to never run out of music when your | |
28 | playlist queue is getting short. | |
29 | ||
30 | %prep | |
31 | %setup -q -n %{name}_%{version} | |
60f06724 AF |
32 | for f in src/mpd_sima src/simadb_cli; do |
33 | sed -i -e 's=#!/usr/bin/env python=#!/usr/bin/python=' $f | |
34 | done | |
35 | for f in data/wrappers/mpd-sima data/wrappers/simadb_cli; do | |
36 | sed -i -e 's=#!/usr/bin/env sh=#!/bin/sh=' $f | |
37 | done | |
38 | ||
39 | %build | |
40 | %{__make} PREFIX=%{_prefix} | |
41 | ||
42 | %install | |
43 | rm -rf $RPM_BUILD_ROOT | |
44 | install -d $RPM_BUILD_ROOT{%{_sharedstatedir}/%{name},%{_sysconfdir},%{systemdunitdir}} | |
45 | ||
46 | %{__make} install \ | |
47 | PREFIX=%{_prefix} \ | |
48 | DESTDIR=$RPM_BUILD_ROOT | |
49 | ||
50 | install doc/examples/mpd_sima.cfg $RPM_BUILD_ROOT%{_sysconfdir}/mpd-sima.cfg | |
51 | install %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service | |
52 | %py_comp $RPM_BUILD_ROOT%{_datadir}/mpd-sima | |
53 | %py_ocomp $RPM_BUILD_ROOT%{_datadir}/mpd-sima | |
54 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/mpd-sima/{lib,utils}/*.py | |
55 | ||
56 | %clean | |
57 | rm -rf $RPM_BUILD_ROOT | |
58 | ||
59 | %pre | |
60 | %groupadd -g 275 mpd_sima | |
61 | %useradd -u 275 -r -d /home/services/mpd_sima -s /bin/false -c "MPD_sima user" -g mpd_sima mpd_sima | |
62 | ||
63 | %post | |
64 | %systemd_post %{name}.service | |
65 | ||
66 | %preun | |
67 | %systemd_preun %{name}.service | |
68 | ||
69 | %postun | |
70 | if [ "$1" = "0" ]; then | |
71 | %userremove mpd_sima | |
72 | %groupremove mpd_sima | |
73 | fi | |
74 | %systemd_reload | |
75 | ||
76 | %files | |
77 | %defattr(644,root,root,755) | |
78 | %doc doc/AUTHORS doc/Changelog doc/copyright_holders doc/examples doc/FAQ doc/README.* doc/THANKS doc/sima_db.dia | |
79 | %attr(600,mpd_sima,mpd_sima) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd-sima.cfg | |
80 | %attr(755,root,root) %{_bindir}/mpd-sima | |
81 | %attr(755,root,root) %{_bindir}/simadb_cli | |
82 | %dir %{_datadir}/mpd-sima | |
83 | %attr(755,root,root) %{_datadir}/mpd-sima/mpd_sima | |
84 | %attr(755,root,root) %{_datadir}/mpd-sima/simadb_cli | |
85 | %dir %{_datadir}/mpd-sima/lib | |
86 | %{_datadir}/mpd-sima/lib/*.py[co] | |
87 | %dir %{_datadir}/mpd-sima/utils | |
88 | %{_datadir}/mpd-sima/utils/*.py[co] | |
89 | %{_mandir}/man1/mpd-sima.1* | |
60f06724 | 90 | %{_mandir}/man1/simadb_cli.1* |
37b4f333 | 91 | %{_mandir}/man5/mpd-sima.cfg.5* |
60f06724 AF |
92 | %{systemdunitdir}/%{name}.service |
93 | %attr(770,mpd_sima,mpd_sima) %{_sharedstatedir}/mpd_sima |