]> git.pld-linux.org Git - packages/darkice.git/blob - darkice.spec
0ece9dd101b4eac1bf319552d2c1414e59784578
[packages/darkice.git] / darkice.spec
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
6 # - add patch for dropping privs *after* turning on real-time scheduling
7 Summary:        DarkIce live IceCast / ShoutCast streamer
8 Summary(pl.UTF-8):   DarkIce - dostarczyciel strumieni IceCast/ShoutCast
9 Name:           darkice
10 Version:        0.17.1
11 Release:        2
12 License:        GPL
13 Group:          Networking/Daemons
14 Source0:        http://dl.sourceforge.net/darkice/%{name}-%{version}.tar.gz
15 # Source0-md5:  91221134cec3d52af842a9d50c06ee7d
16 Source1:        %{name}.init
17 Patch0:         %{name}-shared.patch
18 Patch1:         %{name}-no_libnsl.patch
19 Patch2:         %{name}-amd64.patch
20 URL:            http://darkice.sourceforge.net/
21 BuildRequires:  alsa-lib-devel
22 BuildRequires:  autoconf
23 BuildRequires:  automake
24 BuildRequires:  lame-libs-devel
25 BuildRequires:  libstdc++-devel
26 BuildRequires:  libvorbis-devel >= 1:1.0
27 BuildRequires:  pkgconfig
28 BuildRequires:  readline-devel
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)
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 DarkIce is an IceCast, IceCast2 and ShoutCast live audio streamer. It
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
49 ShoutCast servers, the Ogg Vorbis stream to one or more IceCast2
50 servers.
51
52 %description -l pl.UTF-8
53 DarkIce to dostarczyciel strumienia audio IceCast, IceCast2 oraz
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.
58
59 %prep
60 %setup -q
61 %patch0 -p1
62 %patch1 -p1
63 %patch2 -p1
64
65 %build
66 %{__aclocal}
67 %{__autoconf}
68 %{__automake}
69 %configure \
70         --with-lame \
71         --with-vorbis \
72         --with-alsa \
73         --without-twolame \
74         --without-faac
75
76 %{__make}
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/run/darkice,/var/log}
81
82 %{__make} install \
83         DESTDIR=$RPM_BUILD_ROOT
84
85 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/darkice
86 touch $RPM_BUILD_ROOT/var/log/darkice.log
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
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
103         /sbin/chkconfig --del darkice
104 fi
105
106 %postun
107 if [ "$1" = "0" ]; then
108         %userremove darkice
109         %groupremove darkice
110 fi
111
112 %files
113 %defattr(644,root,root,755)
114 %doc AUTHORS ChangeLog NEWS README TODO
115 %config(noreplace) %attr(640,root,darkice) %{_sysconfdir}/*.cfg
116 %attr(754,root,root) /etc/rc.d/init.d/darkice
117 %attr(755,root,root) %{_bindir}/*
118 %{_mandir}/man?/*
119 %dir %attr(775,root,darkice) /var/run/darkice
120 %attr(660,root,darkice) %ghost /var/log/darkice.log
This page took 0.072605 seconds and 2 git commands to generate.