Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 4e1bf49691e04740a93c43e49d7bf0a8 > files > 4

mt-daapd-0.2.4.2-6.fc12.src.rpm

%bcond_without fedora

%{?FE_USERADD_REQ}

%global uid 72
%global username mt-daapd
%global homedir %_var/lib/%username
%global gecos mt-daapd

Summary: An iTunes-compatible media server
Name: mt-daapd
Epoch: 1
Version: 0.2.4.2
Release: 6%{?dist}
License: GPLv2+
Group: Applications/Multimedia
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Patch0: mt-daapd-0.2.4.2-defaults.patch
Patch1: mt-daapd-0.2.4.2-fedora.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Url: http://www.fireflymediaserver.org/
BuildRequires: fedora-usermgmt-devel
BuildRequires: gdbm-devel, avahi-devel, zlib-devel
BuildRequires: flac-devel, libogg-devel, libvorbis-devel
BuildRequires: libid3tag-devel, sqlite-devel
Requires(pre):   /usr/sbin/useradd
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
Requires(postun): /sbin/service
Requires(post): /sbin/chkconfig
Provides: group(%username) = %uid
Provides: user(%username) = %uid

%description
The purpose of this project is built the best server software to serve
digital music to the Roku Soundbridge and iTunes; to be able to serve
the widest variety of digital music content over the widest range of
devices.

%prep
%setup -q
%patch0 -p1 -b .defaults
%patch1 -p1 -b .fedora

%build
%configure --enable-avahi --enable-oggvorbis --enable-sqlite3 --enable-flac
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install
mkdir -p %{buildroot}%{_initrddir}
mkdir -p %{buildroot}%{_localstatedir}/cache/mt-daapd
install contrib/mt-daapd %{buildroot}%{_sysconfdir}/rc.d/init.d/mt-daapd
install -m 0640 contrib/mt-daapd.conf %{buildroot}%{_sysconfdir}/mt-daapd.conf

%pre
%__fe_groupadd %uid -r %username &>/dev/null || :
%__fe_useradd  %uid -r -s /sbin/nologin -d %homedir -M -c '%gecos' -g %username %username &>/dev/null || :

%preun
if [ $1 = 0 ]; then
        /sbin/service mt-daapd stop >/dev/null 2>&1
	/sbin/chkconfig --del mt-daapd
fi

%post
/sbin/chkconfig --add mt-daapd

%postun
if [ "$1" -ge "1" ]; then
        /sbin/service mt-daapd condrestart >/dev/null 2>&1 || :
fi
%__fe_userdel  %username &>/dev/null || :
%__fe_groupdel %username &>/dev/null || :

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/mt-daapd.conf
%{_sbindir}/mt-daapd
%{_datadir}/mt-daapd
%{_sysconfdir}/rc.d/init.d/mt-daapd
%attr(0700,mt-daapd,root) %{_localstatedir}/cache/mt-daapd
%doc AUTHORS COPYING CREDITS INSTALL NEWS README TODO

%changelog
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.2.4.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.2.4.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Oct 18 2008 W. Michael Petullo <mike[at]flyn.org> - 0.2.4.2-4
   - Change initscript priority to 98, so that mt-daapd starts after avahi.

* Fri Sep 26 2008 W. Michael Petullo <mike[at]flyn.org> - 0.2.4.2-3
   - Update init script, fix Fedora Bugzilla #461719.

* Thu May 15 2008 W. Michael Petullo <mike[at]flyn.org> - 0.2.4.2-2
   - Bump epoch.

* Wed May 14 2008 W. Michael Petullo <mike[at]flyn.org> - 0.2.4.2-1
   - New upstream version.
   - Remove check-input patch; it's upstream.

* Fri Apr 18 2008 W. Michael Petullo <mike[at]flyn.org> - 0.9-0.2.1696
   - Apply patch by Nico Golde to fix integer overflow, Bugzilla #442688.

* Tue Feb 26 2008 W. Michael Petullo <mike[at]flyn.org> - 0.9-0.1.1696
   - New upstream version.

* Mon Dec 24 2007 W. Michael Petullo <mike[at]flyn.org> - 0.2.4.1-5
   - Change license to GPLv2+.
   - Add requires(post) chkconfig.
   - Change permissions of mt-daapd.playlist.
   - Patch so that service is not enabled by default.

* Thu Dec 20 2007 W. Michael Petullo <mike[at]flyn.org> - 0.2.4.1-4
   - Build with --enable-avahi to avoid Apache / GPL license mix.
   - Build with Vorbis support.
   - Change BuildRequires accordingly.

* Sat Dec 15 2007 W. Michael Petullo <mike[at]flyn.org> - 0.2.4.1-3
   - Fix versions in changelog.
   - Use %%config(noreplace) for config files.   
   - Change group to Applications/Multimedia.
   - Don't chkconfig on.
   - Install mt-daapd.conf chmod 0640.
   - Set proper license.

* Thu Dec 13 2007 W. Michael Petullo <mike[at]flyn.org> - 0.2.4.1-2
   - BuildRequire zlib-devel, which is required for libid3tag-devel.

* Mon Dec 10 2007 W. Michael Petullo <mike[at]flyn.org> - 0.2.4.1-1
   - New upstream verion.

* Sat Jul 21 2007 W. Michael Petullo <mike[at]flyn.org> - 0.2.4-3
   - Own /usr/share/mt-daapd.

* Sun Jul 15 2007 W. Michael Petullo <mike[at]flyn.org> - 0.2.4-2
   - Use directory macros.
   - Don't use %%makeinstall.
   - use cp -P.

* Sat Jul 14 2007 W. Michael Petullo <mike[at]flyn.org> - 0.2.4-1
   - Initial Fedora RPM release candidate.