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

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

%prep
%setup -q
%patch0
%patch1

%build
export SUSE_ASNEEDED=0

autoreconf -fiv
%configure
make

%install
%make_install
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}

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

%pre
/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 || :

%post
%fillup_and_insserv %{name}

%preun
%stop_on_removal %{name}

%postun
%restart_on_update %{name}
%insserv_cleanup

%files
%defattr(-,root,root)
%doc README AUTHORS COPYING NEWS TODO ChangeLog
%doc doc/*.html
%doc doc/*.jpg
%doc doc/*.css
%doc conf/*.dist
%config(noreplace) %attr(640,root,%{name}) %{_sysconfdir}/%{name}.xml
%{_bindir}/icecast
%{_datadir}/icecast
%{_sbindir}/rc%{name}
%{_sysconfdir}/init.d/%{name}
# TODO: enable chroot support in this dir
%{_localstatedir}/lib/%{name}
%attr(755,%{name},%{name}) %{_localstatedir}/log/%{name}

%changelog