Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > b2d0ad48edaa5bf1065c42c1d7b8a34d > files > 6

mediatomb-0.10.0-1mdv2008.0.src.rpm

# Spec file taken from upstream, thanks. -AdamW 2007/06

%define name mediatomb 
%define version 0.10.0
%define release %mkrel 1

Version: %{version}
Summary: UPnP AV MediaServer 
Name: %{name}
Release: %{release}
License: GPLv2
Group: Networking/Remote access
Source0: http://downloads.sourceforge.net/mediatomb/%{name}-%{version}.tar.gz
Source1: mediatomb.logrotate
# Adds parallel init info to init.d script - AdamW 2007/06
Patch0: mediatomb-0.9.1-initinfo.patch
# Patches it to use our new config directory - AdamW 2007/06
Patch1: mediatomb-0.9.1-config.patch
# Fixes IP address test in spec for non-English locales (I hope all of them)
# - thanks to Erwan for the pointer
Patch2: mediatomb-0.10.0-ip_address.patch
URL: http://mediatomb.cc
Buildroot: %{_tmppath}/%{name}-%{version}-buildroot 
BuildRequires: sqlite3-devel
BuildRequires: libmagic-devel
BuildRequires: js-devel
BuildRequires: libid3-devel
BuildRequires: taglib-devel
BuildRequires: libexif-devel

BuildRequires: file

%description
MediaTomb - UPnP AV Mediaserver for Linux.

%prep 
%setup -q
%patch0 -p1 -b .init
%patch1 -p1 -b .config
%patch2 -p1 -b .ip

%build
# configure script doesn't know where we keep the libjs headers - AdamW 2007/06
export JS_SEARCH_HEADERS=/usr/include/js-1.5 
%configure

%make

%install
rm -rf $RPM_BUILD_ROOT

install -D -m0755 scripts/mediatomb-service-fedora %{buildroot}%{_initrddir}/%{name}
install -D -m0755 config/mediatomb-conf-fedora %{buildroot}%{_sysconfdir}/%{name}.conf

%makeinstall_std

mkdir -p $RPM_BUILD_ROOT%{_logdir}
touch $RPM_BUILD_ROOT%{_logdir}/%{name}
install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}

%clean
rm -rf $RPM_BUILD_ROOT

%pre

# Create a user
%_pre_useradd %{name} %{_localstatedir}/%{name} /bin/false

%post
%_post_service %{name}

# Create initial log file so that logrotate doesn't complain
if [ $1 = 1 ]; then
   %create_ghostfile %{_logdir}/%{name} root root 644
fi

%preun
%_preun_service %{name}

%postun
%_postun_userdel %{name}

%files
%defattr(-,root,root)
%doc README README.UTF_8 AUTHORS ChangeLog INSTALL doc/doxygen.conf
%doc doc/scripting.txt doc/scripting_utf8.txt
%{_sysconfdir}/logrotate.d/%{name}
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_mandir}/man1/*
%{_initrddir}/%{name}
%defattr(-,%{name},%{name})
%config(noreplace) %{_sysconfdir}/%{name}.conf
%ghost %{_logdir}/%{name}


%changelog
* Wed Aug 08 2007 Adam Williamson <awilliamson@mandriva.com> 0.10.0-1mdv2008.0
+ Revision: 60077
- apply Fedora license policy (specify GPLv2)
- add patch2 to fix IP address check for non-English locales (thanks Erwan)
- new release 0.10.0

* Wed Jul 04 2007 Adam Williamson <awilliamson@mandriva.com> 0.9.1-1mdv2008.0
+ Revision: 47790
- Import mediatomb