]> git.pld-linux.org Git - packages/darkice.git/blob - darkice.spec
- rel 1 with init script, dropping privs and logging
[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 Summary:        DarkIce live IceCast / ShoutCast streamer
7 Summary(pl):    DarkIce - dostarczyciel strumieni IceCast/ShoutCast
8 Name:           darkice
9 Version:        0.17.1
10 Release:        1
11 License:        GPL
12 Group:          Networking/Daemons
13 Source0:        http://dl.sourceforge.net/darkice/%{name}-%{version}.tar.gz
14 # Source0-md5:  91221134cec3d52af842a9d50c06ee7d
15 Source1:        %{name}.init
16 Patch0:         %{name}-shared.patch
17 Patch1:         %{name}-no_libnsl.patch
18 Patch2:         %{name}-amd64.patch
19 URL:            http://darkice.sourceforge.net/
20 BuildRequires:  alsa-lib-devel
21 BuildRequires:  autoconf
22 BuildRequires:  automake
23 BuildRequires:  lame-libs-devel
24 BuildRequires:  libstdc++-devel
25 BuildRequires:  libvorbis-devel >= 1:1.0
26 BuildRequires:  pkgconfig
27 BuildRequires:  readline-devel
28 BuildRequires:  rpmbuild(macros) >= 1.165
29 Requires(post,preun):   /sbin/chkconfig
30 Requires(postun):       /usr/sbin/groupdel
31 Requires(postun):       /usr/sbin/userdel
32 Requires(pre):  /bin/id
33 Requires(pre):  /usr/bin/getgid
34 Requires(pre):  /usr/lib/rpm/user_group.sh
35 Requires(pre):  /usr/sbin/groupadd
36 Requires(pre):  /usr/sbin/useradd
37 Requires(pre):  /usr/sbin/usermod
38 Requires:       daemon
39 Requires:       rc-scripts
40 Provides:       group(darkice)
41 Provides:       user(darkice)
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
45 DarkIce is an IceCast, IceCast2 and ShoutCast live audio streamer. It
46 takes audio input from a sound card, encodes it into MP3 and/or Ogg
47 Vorbis, and sends the MP3 stream to one or more IceCast and/or
48 ShoutCast servers, the Ogg Vorbis stream to one or more IceCast2
49 servers.
50
51 %description -l pl
52 DarkIce to dostarczyciel strumienia audio IceCast, IceCast2 oraz
53 ShoutCast. DarkIce enkoduje dane z karty d¼wiêkowej do MP3 i/lub Ogg
54 Vorbis, a nastêpnie wysy³a strumieñ MP3 do jednego lub wiêcej serwerów
55 IceCast i/lub ShoutCast, strumieñ Ogg Vorbis do jednego lub wiêcej
56 serwerów IceCast2.
57
58 %prep
59 %setup -q
60 %patch0 -p1
61 %patch1 -p1
62 %patch2 -p1
63
64 %build
65 %{__aclocal}
66 %{__autoconf}
67 %{__automake}
68 %configure \
69         --with-lame \
70         --with-vorbis \
71         --with-alsa \
72         --without-twolame \
73         --without-faac
74
75 %{__make}
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/run/darkice,/var/log}
80
81 %{__make} install \
82         DESTDIR=$RPM_BUILD_ROOT
83
84 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/darkice
85 touch $RPM_BUILD_ROOT/var/log/darkice.log
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %pre
91 %groupadd -g 85 darkice
92 %useradd -u 59 -r -d /usr/share/empty -s /bin/false -c "Darkice" -g darkice darkice
93 %addusertogroup darkice audio
94
95 %post
96 /sbin/chkconfig --add darkice
97 %service darkice restart "darkice daemon"
98
99 %preun
100 if [ "$1" = "0" ] ; then
101         %service darkice stop
102         /sbin/chkconfig --del darkice >&2
103 fi
104
105 %postun
106 if [ "$1" = "0" ]; then
107         %userremove darkice
108         %groupremove darkice
109 fi
110
111 %files
112 %defattr(644,root,root,755)
113 %doc AUTHORS ChangeLog NEWS README TODO
114 %config(noreplace) %attr(640,root,darkice) %{_sysconfdir}/*.cfg
115 %attr(754,root,root) /etc/rc.d/init.d/darkice
116 %attr(755,root,root) %{_bindir}/*
117 %{_mandir}/man?/*
118 %dir %attr(775,root,darkice) /var/run/darkice
119 %attr(660,root,darkice) /var/log/darkice.log
This page took 0.078788 seconds and 3 git commands to generate.