]>
Commit | Line | Data |
---|---|---|
e6928a7e MM |
1 | # TODO: |
2 | # - logrotate support? | |
3 | # - add /etc/sysconfig/darkice with log level selection and maybe not dropping | |
4 | # privs (so that realtime=yes could work) | |
5 | # - or some other way to keep realtime scheduling while not running as root | |
48085180 | 6 | # - add patch for dropping privs *after* turning on real-time scheduling |
63d732eb | 7 | Summary: DarkIce live IceCast / ShoutCast streamer |
85f606ac | 8 | Summary(pl.UTF-8): DarkIce - dostarczyciel strumieni IceCast/ShoutCast |
63d732eb | 9 | Name: darkice |
d6b12c70 | 10 | Version: 0.17.1 |
48085180 | 11 | Release: 2 |
63d732eb AM |
12 | License: GPL |
13 | Group: Networking/Daemons | |
abb87a42 | 14 | Source0: http://dl.sourceforge.net/darkice/%{name}-%{version}.tar.gz |
0a93c7b8 | 15 | # Source0-md5: 91221134cec3d52af842a9d50c06ee7d |
e6928a7e | 16 | Source1: %{name}.init |
63d732eb | 17 | Patch0: %{name}-shared.patch |
32f0dbe9 | 18 | Patch1: %{name}-no_libnsl.patch |
d6b12c70 | 19 | Patch2: %{name}-amd64.patch |
63d732eb | 20 | URL: http://darkice.sourceforge.net/ |
d6b12c70 | 21 | BuildRequires: alsa-lib-devel |
63d732eb AM |
22 | BuildRequires: autoconf |
23 | BuildRequires: automake | |
58db8d31 | 24 | BuildRequires: lame-libs-devel |
63d732eb | 25 | BuildRequires: libstdc++-devel |
32f0dbe9 | 26 | BuildRequires: libvorbis-devel >= 1:1.0 |
d6b12c70 | 27 | BuildRequires: pkgconfig |
32f0dbe9 | 28 | BuildRequires: readline-devel |
e6928a7e MM |
29 | BuildRequires: rpmbuild(macros) >= 1.165 |
30 | Requires(post,preun): /sbin/chkconfig | |
31 | Requires(postun): /usr/sbin/groupdel | |
32 | Requires(postun): /usr/sbin/userdel | |
33 | Requires(pre): /bin/id | |
34 | Requires(pre): /usr/bin/getgid | |
35 | Requires(pre): /usr/lib/rpm/user_group.sh | |
36 | Requires(pre): /usr/sbin/groupadd | |
37 | Requires(pre): /usr/sbin/useradd | |
38 | Requires(pre): /usr/sbin/usermod | |
39 | Requires: daemon | |
40 | Requires: rc-scripts | |
41 | Provides: group(darkice) | |
42 | Provides: user(darkice) | |
9ab7471f | 43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
63d732eb AM |
44 | |
45 | %description | |
46 | DarkIce is an IceCast, IceCast2 and ShoutCast live audio streamer. It | |
cebd12c4 | 47 | takes audio input from a sound card, encodes it into MP3 and/or Ogg |
48 | Vorbis, and sends the MP3 stream to one or more IceCast and/or | |
63d732eb AM |
49 | ShoutCast servers, the Ogg Vorbis stream to one or more IceCast2 |
50 | servers. | |
51 | ||
c2902673 | 52 | %description -l pl.UTF-8 |
63d732eb | 53 | DarkIce to dostarczyciel strumienia audio IceCast, IceCast2 oraz |
c2902673 JR |
54 | ShoutCast. DarkIce enkoduje dane z karty dźwiękowej do MP3 i/lub Ogg |
55 | Vorbis, a następnie wysyła strumień MP3 do jednego lub więcej serwerów | |
56 | IceCast i/lub ShoutCast, strumień Ogg Vorbis do jednego lub więcej | |
57 | serwerów IceCast2. | |
63d732eb AM |
58 | |
59 | %prep | |
60 | %setup -q | |
61 | %patch0 -p1 | |
32f0dbe9 | 62 | %patch1 -p1 |
d6b12c70 | 63 | %patch2 -p1 |
63d732eb AM |
64 | |
65 | %build | |
f19279be | 66 | %{__aclocal} |
0afcc822 | 67 | %{__autoconf} |
68 | %{__automake} | |
63d732eb AM |
69 | %configure \ |
70 | --with-lame \ | |
e6928a7e MM |
71 | --with-vorbis \ |
72 | --with-alsa \ | |
73 | --without-twolame \ | |
74 | --without-faac | |
63d732eb AM |
75 | |
76 | %{__make} | |
77 | ||
78 | %install | |
79 | rm -rf $RPM_BUILD_ROOT | |
e6928a7e | 80 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/run/darkice,/var/log} |
63d732eb AM |
81 | |
82 | %{__make} install \ | |
83 | DESTDIR=$RPM_BUILD_ROOT | |
84 | ||
e6928a7e MM |
85 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/darkice |
86 | touch $RPM_BUILD_ROOT/var/log/darkice.log | |
87 | ||
63d732eb | 88 | %clean |
02951a29 | 89 | rm -rf $RPM_BUILD_ROOT |
63d732eb | 90 | |
e6928a7e MM |
91 | %pre |
92 | %groupadd -g 85 darkice | |
93 | %useradd -u 59 -r -d /usr/share/empty -s /bin/false -c "Darkice" -g darkice darkice | |
94 | %addusertogroup darkice audio | |
95 | ||
96 | %post | |
97 | /sbin/chkconfig --add darkice | |
98 | %service darkice restart "darkice daemon" | |
99 | ||
100 | %preun | |
101 | if [ "$1" = "0" ] ; then | |
102 | %service darkice stop | |
285ddb95 | 103 | /sbin/chkconfig --del darkice |
e6928a7e MM |
104 | fi |
105 | ||
106 | %postun | |
107 | if [ "$1" = "0" ]; then | |
108 | %userremove darkice | |
109 | %groupremove darkice | |
110 | fi | |
111 | ||
a40ecc41 | 112 | %files |
63d732eb | 113 | %defattr(644,root,root,755) |
32f0dbe9 | 114 | %doc AUTHORS ChangeLog NEWS README TODO |
e6928a7e MM |
115 | %config(noreplace) %attr(640,root,darkice) %{_sysconfdir}/*.cfg |
116 | %attr(754,root,root) /etc/rc.d/init.d/darkice | |
63d732eb AM |
117 | %attr(755,root,root) %{_bindir}/* |
118 | %{_mandir}/man?/* | |
e6928a7e | 119 | %dir %attr(775,root,darkice) /var/run/darkice |
48085180 | 120 | %attr(660,root,darkice) %ghost /var/log/darkice.log |