LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File icecast.spec of Package icecast (Project home:lemmy04)

# spec file for package icecast
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/

Name:           icecast
Version:        2.3.2
Release:        62
License:        GPLv2+
Summary:        Audio Streaming Server
Url:            http://www.icecast.org/
Group:          Productivity/Networking/Web/Servers
Source:         %{name}-%{version}.tar.bz2
Source1:        icecast.init
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch0:         icecast-2.3.1_runas_icecast_user.patch
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch1:         icecast-fix-no-add-needed.patch
BuildRequires:  curl-devel
BuildRequires:  libtheora-devel
BuildRequires:  libvorbis-devel
BuildRequires:  libxslt-devel
BuildRequires:  libtool
BuildRequires:  speex-devel
BuildRequires:  openssl-devel
PreReq:         %fillup_prereq
PreReq:         %insserv_prereq
PreReq:         /usr/sbin/groupadd
PreReq:         /usr/sbin/useradd
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Icecast is a MP3 and OGG streaming server able to serve many clients
with MP3 and OGG audio.

%setup -q


autoreconf -fiv

rm -rf %{buildroot}%{_datadir}/doc/%{name}
# init script
install -d -m 0755 %{buildroot}%{_sbindir}
install -D -m 0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/%{name}
ln -s -f %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
# create missing dirs
install -d -m 0755 %{buildroot}%{_localstatedir}/{lib,log}/%{name}

[ %{buildroot} != "/" -a -d %{buildroot} ] && rm -rf %{buildroot}

/usr/sbin/groupadd   -r %{name} &>/dev/null || :
/usr/sbin/useradd -o -g %{name} -s /bin/false -r -c "Icecast streaming server" -d %{_localstatedir}/lib/%{name} %{name} &>/dev/null || :

%fillup_and_insserv %{name}

%stop_on_removal %{name}

%restart_on_update %{name}

%doc doc/*.html
%doc doc/*.jpg
%doc doc/*.css
%doc conf/*.dist
%config(noreplace) %attr(640,root,%{name}) %{_sysconfdir}/%{name}.xml
# TODO: enable chroot support in this dir
%attr(755,%{name},%{name}) %{_localstatedir}/log/%{name}