rpms/pdflib-lite/devel pdflib-lite-gcc43.patch, NONE, 1.1 pdflib-lite.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
by Remi Collet
Author: remi
Update of /cvs/nonfree/rpms/pdflib-lite/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv8725
Modified Files:
.cvsignore sources
Added Files:
pdflib-lite-gcc43.patch pdflib-lite.spec
Log Message:
initial import
pdflib-lite-gcc43.patch:
--- NEW FILE pdflib-lite-gcc43.patch ---
diff -up bind/pdflib/cpp/pdflib.hpp.gcc43 bind/pdflib/cpp/pdflib.hpp
--- bind/pdflib/cpp/pdflib.hpp.gcc43 2008-02-28 10:43:00.000000000 +0100
+++ bind/pdflib/cpp/pdflib.hpp 2008-02-29 21:47:34.000000000 +0100
@@ -28,6 +28,8 @@
#endif
#include <string>
+#include <cstring>
+#include <cstdlib>
#include "pdflib.h"
#if defined(_MSC_VER) && defined(_MANAGED)
--- NEW FILE pdflib-lite.spec ---
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%{!?python_include: %define python_include %(%{__python} -c "from distutils.sysconfig import get_python_inc; print get_python_inc(0)")}
Summary: Portable C library for dynamically generating PDF files
Name: pdflib-lite
# Remenber to check the URL after changing this...
Version: 7.0.3
Release: 1%{?dist}
License: Distributable
Group: System Environment/Libraries
URL: http://www.pdflib.com/
Source: http://www.pdflib.com/binaries/PDFlib/703/PDFlib-Lite-%{version}.tar.gz
Patch0: pdflib-lite-gcc43.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
PDFlib is a development tool for PDF-enabling your software,
or generating PDF on your server. PDFlib offers a simple-to-use API
for programmatically creating PDF files from within your own server-
or client-side software. PDFlib doesn't make use of third-party software
for generating PDF, nor does it require any other tools.
%package devel
Summary: Development files for pdflib
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
PDFlib is a development tool for PDF-enabling your software,
or generating PDF on your server. PDFlib offers a simple-to-use API
for programmatically creating PDF files from within your own server-
or client-side software. PDFlib doesn't make use of third-party software
for generating PDF, nor does it require any other tools.
This package contains the files needed for compiling programs that will use
the PDFlib library.
%package python
Summary: Python shared library for pdflib
Group: System Environment/Libraries
BuildRequires: python-devel
Requires: %{name} = %{version}-%{release}
Provides: python-pdflib = %{version}-%{release}
%description python
PDFlib is a development tool for PDF-enabling your software,
or generating PDF on your server. PDFlib offers a simple-to-use API
for programmatically creating PDF files from within your own server-
or client-side software. PDFlib doesn't make use of third-party software
for generating PDF, nor does it require any other tools.
This package contains the library needed for python programs
that will use the PDFlib library.
%package perl
Summary: Perl shared library for pdflib
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Provides: perl-pdflib = %{version}-%{release}
%if 0%{?fedora} >= 7
BuildRequires: perl-devel
%endif
%description perl
PDFlib is a development tool for PDF-enabling your software,
or generating PDF on your server. PDFlib offers a simple-to-use API
for programmatically creating PDF files from within your own server-
or client-side software. PDFlib doesn't make use of third-party software
for generating PDF, nor does it require any other tools.
This package contains the library needed for perl programs
that will use the PDFlib library.
%prep
%setup -q -n PDFlib-Lite-%{version}
%patch0 -p0 -b .gcc43
sed -i -e 's,^PYTHONLIBDIR.*,PYTHONLIBDIR = %{python_sitearch},' \
-e 's,^PERLLIBDIR.*,PERLLIBDIR = %{perl_vendorarch},' \
config/mkcommon.inc.in
%build
# C, CPP, perl and python bindings enabled
# java, ruby and tcl disabled
# File a bug with RFE and patch if you need it
%configure \
--with-pyincl=%{python_include} \
--with-java=no \
--with-ruby=no \
--with-tcl=no \
--enable-large_files --enable-tiffwrite
# for x86_64 build
sed -i -e s@/usr/lib@%{_libdir}@ libtool
%{__make} %{?_smp_mflags}
%install
rm -rf %{buildroot} examples
mkdir -p %{buildroot}%{python_sitearch}
mkdir -p %{buildroot}%{perl_vendorarch}
make install DESTDIR=%{buildroot}
install -p -m 0644 bind/pdflib/cpp/pdflib.hpp %{buildroot}%{_includedir}/pdflib.hpp
rm %{buildroot}%{_libdir}/*.{la,a}
rm %{buildroot}%{python_sitearch}/*.{la,a}
rm %{buildroot}%{perl_vendorarch}/*.{la,a}
# require to extract debuginfo
chmod +x %{buildroot}%{_libdir}/libpdf*
chmod +x %{buildroot}%{python_sitearch}/pdflib_py.so*
chmod +x %{buildroot}%{perl_vendorarch}/pdflib_pl.so*
# Only sources
mkdir -p examples/{c,cpp,perl,php,python}
cp -r bind/pdflib/data examples/data
cp bind/pdflib/c/*.c \
bind/pdflib/c/Makefile \
bind/pdflib/c/readme.txt \
examples/c
cp bind/pdflib/cpp/*.cpp \
bind/pdflib/cpp/Makefile \
bind/pdflib/cpp/readme.txt \
examples/cpp
cp bind/pdflib/perl/*.pl \
bind/pdflib/perl/Makefile \
bind/pdflib/perl/readme.txt \
examples/perl
cp bind/pdflib/python/*.py \
bind/pdflib/python/Makefile \
bind/pdflib/python/readme.txt \
examples/python
cp bind/pdflib/php/*.php \
bind/pdflib/php/readme.txt \
examples/php
# overwrite the default php4 one
cp bind/pdflib/php/examples.php5/*.php \
examples/php
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-, root, root, -)
%doc readme.txt doc/pdflib/PDFlib-Lite-license.pdf
%{_bindir}/pdfimage
%{_libdir}/*.so.*
%files devel
%defattr(-, root, root, -)
%doc doc/pdflib/PDFlib-Lite-license.pdf
%doc doc/pdflib/changes.txt doc/pdflib/compatibility.txt examples
%doc doc/pdflib/PDFlib-API-reference.pdf doc/pdflib/PDFlib-tutorial.pdf doc/pdflib/readme-source-unix.txt
%{_bindir}/pdflib-config
%{_includedir}/*
%{_libdir}/*.so
%files python
%defattr(-, root, root, -)
%doc doc/pdflib/PDFlib-Lite-license.pdf
%{python_sitearch}/pdflib_py.so*
%files perl
%defattr(-, root, root, -)
%doc doc/pdflib/PDFlib-Lite-license.pdf
%{perl_vendorarch}/pdflib_pl.*
%changelog
* Fri Mar 28 2008 Remi Collet <Fedora(a)FamilleCollet.com> 7.0.3-1
- update to 7.0.3
- fix CVE-2007-6561: PDFlib stack-based buffer overflows
* Sat Mar 15 2008 Thorsten Leemhuis <fedora at leemhuis.info> 7.0.2p8-2
- rebuild for new perl
* Fri Feb 29 2008 Remi Collet <Fedora(a)FamilleCollet.com> 7.0.2p8-1
- update to 7.0.2p8
- del destdir.patch ("make install DESTDIR" is now ok)
- add gcc43.patch for Fedora 9
* Thu Aug 16 2007 Remi Collet <Fedora(a)FamilleCollet.com> 7.0.2-1
- Add BR perl-devel for fedora >= 7
* Thu Aug 16 2007 Remi Collet <Fedora(a)FamilleCollet.com> 7.0.2-1
- update to 7.0.2
* Thu Mar 15 2007 Remi Collet <Fedora(a)FamilleCollet.com> 7.0.1-1
- update to 7.0.1
* Mon Dec 18 2006 Remi Collet <Fedora(a)FamilleCollet.com> 7.0.0p3-3
- review for Livna
- Requires/BuildRequires cleanup
- Change License = Distributable, include PDFlib-Lite-license.pdf in sub-packages
- add --with-pyinc, python2.5 not defined in configure
- add some comments
* Sun Dec 10 2006 Remi Collet <Fedora(a)FamilleCollet.com> 7.0.0p3-2
- add python subpackage
- add perl subpackage
* Sat Dec 09 2006 Remi Collet <Fedora(a)FamilleCollet.com> 7.0.0p3-1
- initial release for Extras
Index: .cvsignore
===================================================================
RCS file: /cvs/nonfree/rpms/pdflib-lite/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 22 Jul 2008 16:40:53 -0000 1.1
+++ .cvsignore 26 Jul 2008 10:25:53 -0000 1.2
@@ -0,0 +1 @@
+PDFlib-Lite-7.0.3.tar.gz
Index: sources
===================================================================
RCS file: /cvs/nonfree/rpms/pdflib-lite/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 22 Jul 2008 16:40:53 -0000 1.1
+++ sources 26 Jul 2008 10:25:53 -0000 1.2
@@ -0,0 +1 @@
+97bcdd73206bae30b322f49d2c0d852b PDFlib-Lite-7.0.3.tar.gz
16 years, 4 months
rpms/mpg321/F-8 mpg321.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
by Adrian Reber
Author: adrian
Update of /cvs/free/rpms/mpg321/F-8
In directory se02.es.rpmfusion.net:/tmp/cvs-serv27340/F-8
Modified Files:
.cvsignore sources
Added Files:
mpg321.spec
Log Message:
initial
--- NEW FILE mpg321.spec ---
Name: mpg321
Version: 0.2.10.4
Release: 1%{?dist}
Summary: Command line MPEG audio player
Group: Applications/Multimedia
License: GPLv2+
URL: http://mpg321.sourceforge.net/
Source0: http://ftp.debian.org/debian/pool/main/m/mpg321/%{name}_%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: libao-devel
BuildRequires: libmad-devel
BuildRequires: libid3tag-devel
BuildRequires: zlib-devel
Requires(post): /usr/sbin/update-alternatives
Requires(postun): /usr/sbin/update-alternatives
Provides: mp3-cmdline
Obsoletes: mpg123
%description
mpg321 is a replacement for mpg123, a very popular command-line
mp3 player. mpg123 is used for frontends, as an mp3 player and as an
mp3 to wave file decoder (primarily for use with CD-recording
software.) In all of these capacities, mpg321 can be used as a drop-in
replacement for mpg123.
%prep
%setup -q
%build
%configure --with-default-audio=alsa09
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
ln -s mpg321.1 $RPM_BUILD_ROOT%{_mandir}/man1/mpg123.1
%clean
rm -rf $RPM_BUILD_ROOT
%post
/usr/sbin/update-alternatives --install %{_bindir}/mp3-cmdline \
mp3-cmdline %{_bindir}/mpg321 40
%postun
if [ $1 -eq 0 ] ; then
/usr/sbin/update-alternatives --remove mp3-cmdline %{_bindir}/mpg321
fi
%files
%defattr(-,root,root,-)
%doc AUTHORS BUGS ChangeLog COPYING HACKING NEWS README* THANKS TODO
%{_bindir}/mpg321
%{_bindir}/mpg123
%{_mandir}/man1/mpg321.1*
%{_mandir}/man1/mpg123.1*
%changelog
* Sat Oct 13 2007 Adrian Reber <adrian(a)lisas.de> - 0.2.10.4-1
- updated to debian's 0.2.10.4
- updated License
- adapted %%description, to make it not sound like mpg123 is non-free
- rebuilt for rpmfusion
* Fri Oct 06 2006 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> 0.2.10.3-3
- rebuilt for unwind info generation, broken in gcc-4.1.1-21
* Wed Sep 20 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.2.10.3-2
- Avoid broken Requires(foo,bar) syntax.
- Specfile cleanups.
- Improve summary.
* Thu Mar 09 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- switch to new release field
- drop Epoch
* Tue Feb 28 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- add dist
* Fri Jan 9 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:0.2.10.3-0.lvn.1
- Update to 0.2.10.3 (from Debian), fixes CAN-2003-0969.
- Make alsa09 the default output device.
- Install mpg123 manpage symlink.
* Sun Apr 20 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:0.2.10.1-0.fdr.1
- Update to 0.2.10.1 (from Debian).
- Rebuild using reorganized libmad.
- Provide mp3-cmdline virtual package and alternative.
- Save .spec in UTF-8.
* Fri Apr 4 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:0.2.10-0.fdr.1
- Update to current Fedora guidelines.
* Thu Feb 20 2003 Ville Skyttä <ville.skytta at iki.fi> - 0.2.10-1.fedora.1
- First Fedora release, based on Matthias Saou's work.
- Added zlib-devel build requirement.
* Mon Sep 30 2002 Matthias Saou <matthias.saou(a)est.une.marmotte.net>
- Update to 0.2.10.
- Spec file cleanup.
* Tue Apr 9 2002 Bill Nottingham <notting(a)redhat.com> 0.2.9-3
- add patch from author to fix id3 segfaults (#62714)
- fix audio device fallback to match upstream behavior
* Thu Mar 14 2002 Bill Nottingham <notting(a)redhat.com> 0.2.9-2
- fix possible format string exploit
- add simple audio device fallback
* Tue Mar 12 2002 Bill Nottingham <notting(a)redhat.com> 0.2.9-1
- update to 0.2.9
* Thu Feb 21 2002 Bill Nottingham <notting(a)redhat.com>
- rebuild
* Mon Jan 28 2002 Bill Nottingham <notting(a)redhat.com>
- update to 0.2.3, libmad is now separate
* Mon Aug 13 2001 Bill Nottingham <notting(a)redhat.com>
- update to 0.1.5
- fix build with new libao
* Fri Jul 20 2001 Bill Nottingham <notting(a)redhat.com>
- initial build
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/mpg321/F-8/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 22 Jul 2008 16:53:48 -0000 1.1
+++ .cvsignore 25 Jul 2008 20:27:52 -0000 1.2
@@ -0,0 +1 @@
+mpg321_0.2.10.4.tar.gz
Index: sources
===================================================================
RCS file: /cvs/free/rpms/mpg321/F-8/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 22 Jul 2008 16:53:48 -0000 1.1
+++ sources 25 Jul 2008 20:27:52 -0000 1.2
@@ -0,0 +1 @@
+6514c5502f544ffdbb7a4c05858c2454 mpg321_0.2.10.4.tar.gz
16 years, 4 months
rpms/mpg321/F-9 mpg321.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
by Adrian Reber
Author: adrian
Update of /cvs/free/rpms/mpg321/F-9
In directory se02.es.rpmfusion.net:/tmp/cvs-serv26910/F-9
Modified Files:
.cvsignore sources
Added Files:
mpg321.spec
Log Message:
initial
--- NEW FILE mpg321.spec ---
Name: mpg321
Version: 0.2.10.4
Release: 1%{?dist}
Summary: Command line MPEG audio player
Group: Applications/Multimedia
License: GPLv2+
URL: http://mpg321.sourceforge.net/
Source0: http://ftp.debian.org/debian/pool/main/m/mpg321/%{name}_%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: libao-devel
BuildRequires: libmad-devel
BuildRequires: libid3tag-devel
BuildRequires: zlib-devel
Requires(post): /usr/sbin/update-alternatives
Requires(postun): /usr/sbin/update-alternatives
Provides: mp3-cmdline
Obsoletes: mpg123
%description
mpg321 is a replacement for mpg123, a very popular command-line
mp3 player. mpg123 is used for frontends, as an mp3 player and as an
mp3 to wave file decoder (primarily for use with CD-recording
software.) In all of these capacities, mpg321 can be used as a drop-in
replacement for mpg123.
%prep
%setup -q
%build
%configure --with-default-audio=alsa09
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
ln -s mpg321.1 $RPM_BUILD_ROOT%{_mandir}/man1/mpg123.1
%clean
rm -rf $RPM_BUILD_ROOT
%post
/usr/sbin/update-alternatives --install %{_bindir}/mp3-cmdline \
mp3-cmdline %{_bindir}/mpg321 40
%postun
if [ $1 -eq 0 ] ; then
/usr/sbin/update-alternatives --remove mp3-cmdline %{_bindir}/mpg321
fi
%files
%defattr(-,root,root,-)
%doc AUTHORS BUGS ChangeLog COPYING HACKING NEWS README* THANKS TODO
%{_bindir}/mpg321
%{_bindir}/mpg123
%{_mandir}/man1/mpg321.1*
%{_mandir}/man1/mpg123.1*
%changelog
* Sat Oct 13 2007 Adrian Reber <adrian(a)lisas.de> - 0.2.10.4-1
- updated to debian's 0.2.10.4
- updated License
- adapted %%description, to make it not sound like mpg123 is non-free
- rebuilt for rpmfusion
* Fri Oct 06 2006 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> 0.2.10.3-3
- rebuilt for unwind info generation, broken in gcc-4.1.1-21
* Wed Sep 20 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.2.10.3-2
- Avoid broken Requires(foo,bar) syntax.
- Specfile cleanups.
- Improve summary.
* Thu Mar 09 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- switch to new release field
- drop Epoch
* Tue Feb 28 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- add dist
* Fri Jan 9 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:0.2.10.3-0.lvn.1
- Update to 0.2.10.3 (from Debian), fixes CAN-2003-0969.
- Make alsa09 the default output device.
- Install mpg123 manpage symlink.
* Sun Apr 20 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:0.2.10.1-0.fdr.1
- Update to 0.2.10.1 (from Debian).
- Rebuild using reorganized libmad.
- Provide mp3-cmdline virtual package and alternative.
- Save .spec in UTF-8.
* Fri Apr 4 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:0.2.10-0.fdr.1
- Update to current Fedora guidelines.
* Thu Feb 20 2003 Ville Skyttä <ville.skytta at iki.fi> - 0.2.10-1.fedora.1
- First Fedora release, based on Matthias Saou's work.
- Added zlib-devel build requirement.
* Mon Sep 30 2002 Matthias Saou <matthias.saou(a)est.une.marmotte.net>
- Update to 0.2.10.
- Spec file cleanup.
* Tue Apr 9 2002 Bill Nottingham <notting(a)redhat.com> 0.2.9-3
- add patch from author to fix id3 segfaults (#62714)
- fix audio device fallback to match upstream behavior
* Thu Mar 14 2002 Bill Nottingham <notting(a)redhat.com> 0.2.9-2
- fix possible format string exploit
- add simple audio device fallback
* Tue Mar 12 2002 Bill Nottingham <notting(a)redhat.com> 0.2.9-1
- update to 0.2.9
* Thu Feb 21 2002 Bill Nottingham <notting(a)redhat.com>
- rebuild
* Mon Jan 28 2002 Bill Nottingham <notting(a)redhat.com>
- update to 0.2.3, libmad is now separate
* Mon Aug 13 2001 Bill Nottingham <notting(a)redhat.com>
- update to 0.1.5
- fix build with new libao
* Fri Jul 20 2001 Bill Nottingham <notting(a)redhat.com>
- initial build
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/mpg321/F-9/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 22 Jul 2008 16:53:48 -0000 1.1
+++ .cvsignore 25 Jul 2008 20:25:26 -0000 1.2
@@ -0,0 +1 @@
+mpg321_0.2.10.4.tar.gz
Index: sources
===================================================================
RCS file: /cvs/free/rpms/mpg321/F-9/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 22 Jul 2008 16:53:48 -0000 1.1
+++ sources 25 Jul 2008 20:25:26 -0000 1.2
@@ -0,0 +1 @@
+6514c5502f544ffdbb7a4c05858c2454 mpg321_0.2.10.4.tar.gz
16 years, 4 months
rpms/mpg321/devel mpg321.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
by Adrian Reber
Author: adrian
Update of /cvs/free/rpms/mpg321/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv26725/devel
Modified Files:
.cvsignore sources
Added Files:
mpg321.spec
Log Message:
initial
--- NEW FILE mpg321.spec ---
Name: mpg321
Version: 0.2.10.4
Release: 1%{?dist}
Summary: Command line MPEG audio player
Group: Applications/Multimedia
License: GPLv2+
URL: http://mpg321.sourceforge.net/
Source0: http://ftp.debian.org/debian/pool/main/m/mpg321/%{name}_%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: libao-devel
BuildRequires: libmad-devel
BuildRequires: libid3tag-devel
BuildRequires: zlib-devel
Requires(post): /usr/sbin/update-alternatives
Requires(postun): /usr/sbin/update-alternatives
Provides: mp3-cmdline
Obsoletes: mpg123
%description
mpg321 is a replacement for mpg123, a very popular command-line
mp3 player. mpg123 is used for frontends, as an mp3 player and as an
mp3 to wave file decoder (primarily for use with CD-recording
software.) In all of these capacities, mpg321 can be used as a drop-in
replacement for mpg123.
%prep
%setup -q
%build
%configure --with-default-audio=alsa09
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
ln -s mpg321.1 $RPM_BUILD_ROOT%{_mandir}/man1/mpg123.1
%clean
rm -rf $RPM_BUILD_ROOT
%post
/usr/sbin/update-alternatives --install %{_bindir}/mp3-cmdline \
mp3-cmdline %{_bindir}/mpg321 40
%postun
if [ $1 -eq 0 ] ; then
/usr/sbin/update-alternatives --remove mp3-cmdline %{_bindir}/mpg321
fi
%files
%defattr(-,root,root,-)
%doc AUTHORS BUGS ChangeLog COPYING HACKING NEWS README* THANKS TODO
%{_bindir}/mpg321
%{_bindir}/mpg123
%{_mandir}/man1/mpg321.1*
%{_mandir}/man1/mpg123.1*
%changelog
* Sat Oct 13 2007 Adrian Reber <adrian(a)lisas.de> - 0.2.10.4-1
- updated to debian's 0.2.10.4
- updated License
- adapted %%description, to make it not sound like mpg123 is non-free
- rebuilt for rpmfusion
* Fri Oct 06 2006 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> 0.2.10.3-3
- rebuilt for unwind info generation, broken in gcc-4.1.1-21
* Wed Sep 20 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.2.10.3-2
- Avoid broken Requires(foo,bar) syntax.
- Specfile cleanups.
- Improve summary.
* Thu Mar 09 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- switch to new release field
- drop Epoch
* Tue Feb 28 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- add dist
* Fri Jan 9 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:0.2.10.3-0.lvn.1
- Update to 0.2.10.3 (from Debian), fixes CAN-2003-0969.
- Make alsa09 the default output device.
- Install mpg123 manpage symlink.
* Sun Apr 20 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:0.2.10.1-0.fdr.1
- Update to 0.2.10.1 (from Debian).
- Rebuild using reorganized libmad.
- Provide mp3-cmdline virtual package and alternative.
- Save .spec in UTF-8.
* Fri Apr 4 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:0.2.10-0.fdr.1
- Update to current Fedora guidelines.
* Thu Feb 20 2003 Ville Skyttä <ville.skytta at iki.fi> - 0.2.10-1.fedora.1
- First Fedora release, based on Matthias Saou's work.
- Added zlib-devel build requirement.
* Mon Sep 30 2002 Matthias Saou <matthias.saou(a)est.une.marmotte.net>
- Update to 0.2.10.
- Spec file cleanup.
* Tue Apr 9 2002 Bill Nottingham <notting(a)redhat.com> 0.2.9-3
- add patch from author to fix id3 segfaults (#62714)
- fix audio device fallback to match upstream behavior
* Thu Mar 14 2002 Bill Nottingham <notting(a)redhat.com> 0.2.9-2
- fix possible format string exploit
- add simple audio device fallback
* Tue Mar 12 2002 Bill Nottingham <notting(a)redhat.com> 0.2.9-1
- update to 0.2.9
* Thu Feb 21 2002 Bill Nottingham <notting(a)redhat.com>
- rebuild
* Mon Jan 28 2002 Bill Nottingham <notting(a)redhat.com>
- update to 0.2.3, libmad is now separate
* Mon Aug 13 2001 Bill Nottingham <notting(a)redhat.com>
- update to 0.1.5
- fix build with new libao
* Fri Jul 20 2001 Bill Nottingham <notting(a)redhat.com>
- initial build
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/mpg321/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 22 Jul 2008 16:53:48 -0000 1.1
+++ .cvsignore 25 Jul 2008 20:24:23 -0000 1.2
@@ -0,0 +1 @@
+mpg321_0.2.10.4.tar.gz
Index: sources
===================================================================
RCS file: /cvs/free/rpms/mpg321/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 22 Jul 2008 16:53:48 -0000 1.1
+++ sources 25 Jul 2008 20:24:23 -0000 1.2
@@ -0,0 +1 @@
+6514c5502f544ffdbb7a4c05858c2454 mpg321_0.2.10.4.tar.gz
16 years, 4 months
rpms/mpd/F-9 95-grant-audio-devices-to-mpd.fdi, NONE, 1.1 mpd.git-1f620ed803e4b5c69b875bb36519c3299022fe9d.patch, NONE, 1.1 mpd.git-ab00513022af940b398601556bfb6256ff220546.patch, NONE, 1.1 mpd.git-de2e69945604f831ece2c4dacf5a545ff1c80056.patch, NONE, 1.1 mpd.init, NONE, 1.1 mpd.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
by Adrian Reber
Author: adrian
Update of /cvs/free/rpms/mpd/F-9
In directory se02.es.rpmfusion.net:/tmp/cvs-serv26288
Modified Files:
.cvsignore sources
Added Files:
95-grant-audio-devices-to-mpd.fdi
mpd.git-1f620ed803e4b5c69b875bb36519c3299022fe9d.patch
mpd.git-ab00513022af940b398601556bfb6256ff220546.patch
mpd.git-de2e69945604f831ece2c4dacf5a545ff1c80056.patch
mpd.init mpd.spec
Log Message:
Initial thing
--- NEW FILE 95-grant-audio-devices-to-mpd.fdi ---
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<!-- grant access to sound devices to mpd user.. -->
<match key="info.capabilities" contains="access_control">
<match key="info.capabilities" contains="alsa">
<append key="access_control.grant_user" type="strlist">mpd</append>
</match>
<match key="info.capabilities" contains="oss">
<append key="access_control.grant_user" type="strlist">mpd</append>
</match>
</match>
</device>
</deviceinfo>
mpd.git-1f620ed803e4b5c69b875bb36519c3299022fe9d.patch:
--- NEW FILE mpd.git-1f620ed803e4b5c69b875bb36519c3299022fe9d.patch ---
From: jat <jat@09075e82-0dd4-0310-85a5-a0d7c8717e4f>
Date: Mon, 4 Jun 2007 22:29:55 +0000 (+0000)
Subject: Don't kill the player process (and effectively the decode process) when
X-Git-Url: http://git.infradead.org/?p=users%2Fdwmw2%2Fmpd.git;a=commitdiff_plain;h=...
Don't kill the player process (and effectively the decode process) when
completely stopped. Instead, send them SIGSTOP to pause the process until
they're needed again. Then send them SIGCONT instead of re-spawning them.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6485 09075e82-0dd4-0310-85a5-a0d7c8717e4f
---
diff --git a/src/decode.c b/src/decode.c
index 8ed5776..ce94833 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -75,6 +75,8 @@ static void stopDecode(DecoderControl * dc)
static void quitDecode(PlayerControl * pc, DecoderControl * dc)
{
+ int pid;
+
stopDecode(dc);
pc->state = PLAYER_STATE_STOP;
dc->seek = 0;
@@ -82,6 +84,10 @@ static void quitDecode(PlayerControl * pc, DecoderControl * dc)
pc->stop = 0;
pc->pause = 0;
kill(getppid(), SIGUSR1);
+
+ pid = decode_pid;
+ if (pid > 0)
+ kill(pid, SIGSTOP);
}
static int calculateCrossFadeChunks(PlayerControl * pc, AudioFormat * af)
@@ -396,6 +402,14 @@ static void decodeStart(PlayerControl * pc, OutputBuffer * cb,
static int decoderInit(PlayerControl * pc, OutputBuffer * cb,
DecoderControl * dc)
{
+ int pid;
+
+ pid = decode_pid;
+ if (pid > 0) {
+ kill(pid, SIGCONT);
+ return 0;
+ }
+
blockSignals();
getPlayerData()->playerControl.decode_pid = 0;
decode_pid = fork();
@@ -691,10 +705,8 @@ void decode(void)
dc->stop = 0;
dc->start = 1;
- if (decode_pid <= 0) {
- if (decoderInit(pc, cb, dc) < 0)
- return;
- }
+ if (decoderInit(pc, cb, dc) < 0)
+ return;
decodeParent(pc, dc, cb);
}
diff --git a/src/player.c b/src/player.c
index e2dc210..beff9b3 100644
--- a/src/player.c
+++ b/src/player.c
@@ -110,6 +110,14 @@ void player_sigChldHandler(int pid, int status)
int playerInit(void)
{
+ int pid;
+
+ pid = player_pid;
+ if (pid > 0) {
+ kill(pid, SIGCONT);
+ return 0;
+ }
+
blockSignals();
player_pid = fork();
if (player_pid==0)
@@ -155,9 +163,6 @@ int playerInit(void)
} else if (pc->cycleLogFiles) {
cycle_log_files();
pc->cycleLogFiles = 0;
- } else if (pc->quit) {
- pc->quit = 0;
- break;
} else
my_usleep(10000);
}
@@ -177,20 +182,18 @@ int playerInit(void)
return 0;
}
-int playerQuit(int fd)
+int playerWait(int fd)
{
- PlayerControl *pc = &(getPlayerData()->playerControl);
+ int pid;
if (playerStop(fd) < 0)
return -1;
playerCloseAudio();
- if (player_pid > 0) {
- pc->quit = 1;
- while (player_pid > 0 && pc->quit)
- my_usleep(1000);
- }
+ pid = player_pid;
+ if (pid > 0)
+ kill(pid, SIGSTOP);
return 0;
}
@@ -212,7 +215,7 @@ int playerPlay(int fd, Song * song)
pathcpy_trunc(pc->utf8url, getSongUrl(song));
pc->play = 1;
- if (player_pid == 0 && playerInit() < 0) {
+ if (playerInit() < 0) {
pc->play = 0;
return -1;
}
@@ -245,8 +248,10 @@ void playerKill(void)
int pid;
pid = player_pid;
- if (pid > 0)
+ if (pid > 0) {
+ kill(pid, SIGCONT);
kill(pid, SIGTERM);
+ }
}
int playerPause(int fd)
diff --git a/src/player.h b/src/player.h
index ce7eebc..de44f8e 100644
--- a/src/player.h
+++ b/src/player.h
@@ -57,7 +57,6 @@
#define PLAYER_METADATA_STATE_WRITE 2
typedef struct _PlayerControl {
- volatile mpd_sint8 quit;
volatile mpd_sint8 stop;
volatile mpd_sint8 play;
volatile mpd_sint8 pause;
@@ -122,7 +121,7 @@ int getPlayerError(void);
int playerInit(void);
-int playerQuit(int fd);
+int playerWait(int fd);
int queueSong(Song * song);
diff --git a/src/playerData.c b/src/playerData.c
index e4506c1..30ff6d6 100644
--- a/src/playerData.c
+++ b/src/playerData.c
@@ -118,7 +118,6 @@ void initPlayerData(void)
buffered_chunks * sizeof(mpd_sint8));
buffer->acceptMetadata = 0;
- playerData_pd->playerControl.quit = 0;
playerData_pd->playerControl.stop = 0;
playerData_pd->playerControl.pause = 0;
playerData_pd->playerControl.play = 0;
diff --git a/src/playlist.c b/src/playlist.c
index f6ae8ab..8b2bc1f 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -788,7 +788,7 @@ int deleteFromPlaylist(int fd, int song)
&& playlist.current == songOrder) {
/*if(playlist.current>=playlist.length) return playerStop(fd);
else return playPlaylistOrderNumber(fd,playlist.current); */
- playerQuit(STDERR_FILENO);
+ playerWait(STDERR_FILENO);
playlist_noGoToNext = 1;
}
@@ -829,7 +829,7 @@ void deleteASongFromPlaylist(Song * song)
int stopPlaylist(int fd)
{
DEBUG("playlist: stop\n");
- if (playerQuit(fd) < 0)
+ if (playerWait(fd) < 0)
return -1;
playlist.queued = -1;
playlist_state = PLAYLIST_STATE_STOP;
mpd.git-ab00513022af940b398601556bfb6256ff220546.patch:
--- NEW FILE mpd.git-ab00513022af940b398601556bfb6256ff220546.patch ---
From: jat <jat@09075e82-0dd4-0310-85a5-a0d7c8717e4f>
Date: Fri, 1 Jun 2007 18:10:13 +0000 (+0000)
Subject: Tell the player process (and thus also the decode process) to quit when
X-Git-Url: http://git.infradead.org/?p=users%2Fdwmw2%2Fmpd.git;a=commitdiff_plain;h=...
Tell the player process (and thus also the decode process) to quit when
playback is stopped completely. This means the player process will no
longer have to wake up 100 times per second to see if it's been told to
start playing (the main process will just spawn a new player process when
it needs to). On the downside, this means an extra pair of forks() and the
re-initializing of the player and decode processes each time playback is
restarted.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6446 09075e82-0dd4-0310-85a5-a0d7c8717e4f
---
diff --git a/src/player.c b/src/player.c
index 4870dc7..e2dc210 100644
--- a/src/player.c
+++ b/src/player.c
@@ -155,6 +155,9 @@ int playerInit(void)
} else if (pc->cycleLogFiles) {
cycle_log_files();
pc->cycleLogFiles = 0;
+ } else if (pc->quit) {
+ pc->quit = 0;
+ break;
} else
my_usleep(10000);
}
@@ -174,6 +177,24 @@ int playerInit(void)
return 0;
}
+int playerQuit(int fd)
+{
+ PlayerControl *pc = &(getPlayerData()->playerControl);
+
+ if (playerStop(fd) < 0)
+ return -1;
+
+ playerCloseAudio();
+
+ if (player_pid > 0) {
+ pc->quit = 1;
+ while (player_pid > 0 && pc->quit)
+ my_usleep(1000);
+ }
+
+ return 0;
+}
+
int playerPlay(int fd, Song * song)
{
PlayerControl *pc = &(getPlayerData()->playerControl);
@@ -341,6 +362,8 @@ void playerCloseAudio(void)
if (playerStop(STDERR_FILENO) < 0)
return;
pc->closeAudio = 1;
+ while (player_pid > 0 && pc->closeAudio)
+ my_usleep(1000);
}
}
diff --git a/src/player.h b/src/player.h
index b62fab2..ce7eebc 100644
--- a/src/player.h
+++ b/src/player.h
@@ -57,6 +57,7 @@
#define PLAYER_METADATA_STATE_WRITE 2
typedef struct _PlayerControl {
+ volatile mpd_sint8 quit;
volatile mpd_sint8 stop;
volatile mpd_sint8 play;
volatile mpd_sint8 pause;
@@ -121,6 +122,8 @@ int getPlayerError(void);
int playerInit(void);
+int playerQuit(int fd);
+
int queueSong(Song * song);
int getPlayerQueueState(void);
diff --git a/src/playerData.c b/src/playerData.c
index 30ff6d6..e4506c1 100644
--- a/src/playerData.c
+++ b/src/playerData.c
@@ -118,6 +118,7 @@ void initPlayerData(void)
buffered_chunks * sizeof(mpd_sint8));
buffer->acceptMetadata = 0;
+ playerData_pd->playerControl.quit = 0;
playerData_pd->playerControl.stop = 0;
playerData_pd->playerControl.pause = 0;
playerData_pd->playerControl.play = 0;
diff --git a/src/playlist.c b/src/playlist.c
index de5a2a3..d68033e 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -786,7 +786,7 @@ int deleteFromPlaylist(int fd, int song)
&& playlist.current == songOrder) {
/*if(playlist.current>=playlist.length) return playerStop(fd);
else return playPlaylistOrderNumber(fd,playlist.current); */
- playerStop(STDERR_FILENO);
+ playerQuit(STDERR_FILENO);
playlist_noGoToNext = 1;
}
@@ -827,9 +827,8 @@ void deleteASongFromPlaylist(Song * song)
int stopPlaylist(int fd)
{
DEBUG("playlist: stop\n");
- if (playerStop(fd) < 0)
+ if (playerQuit(fd) < 0)
return -1;
- playerCloseAudio();
playlist.queued = -1;
playlist_state = PLAYLIST_STATE_STOP;
playlist_noGoToNext = 0;
mpd.git-de2e69945604f831ece2c4dacf5a545ff1c80056.patch:
--- NEW FILE mpd.git-de2e69945604f831ece2c4dacf5a545ff1c80056.patch ---
From: jat <jat@09075e82-0dd4-0310-85a5-a0d7c8717e4f>
Date: Mon, 4 Jun 2007 23:14:38 +0000 (+0000)
Subject: Set a flag if we've sent the player process SIGSTOP so that we know not to
X-Git-Url: http://git.infradead.org/?p=users%2Fdwmw2%2Fmpd.git;a=commitdiff_plain;h=...
Set a flag if we've sent the player process SIGSTOP so that we know not to
wait for it to complete an action which it never will.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6488 09075e82-0dd4-0310-85a5-a0d7c8717e4f
---
diff --git a/src/player.c b/src/player.c
index beff9b3..096503b 100644
--- a/src/player.c
+++ b/src/player.c
@@ -110,11 +110,13 @@ void player_sigChldHandler(int pid, int status)
int playerInit(void)
{
+ PlayerControl *pc = &(getPlayerData()->playerControl);
int pid;
pid = player_pid;
if (pid > 0) {
kill(pid, SIGCONT);
+ pc->wait = 0;
return 0;
}
@@ -124,8 +126,6 @@ int playerInit(void)
{
clock_t start = clock();
- PlayerControl *pc = &(getPlayerData()->playerControl);
-
unblockSignals();
setSigHandlersForDecoder();
@@ -184,16 +184,22 @@ int playerInit(void)
int playerWait(int fd)
{
+ PlayerControl *pc = &(getPlayerData()->playerControl);
int pid;
+ if (pc->wait)
+ return 0;
+
if (playerStop(fd) < 0)
return -1;
playerCloseAudio();
pid = player_pid;
- if (pid > 0)
+ if (pid > 0) {
+ pc->wait = 1;
kill(pid, SIGSTOP);
+ }
return 0;
}
diff --git a/src/player.h b/src/player.h
index de44f8e..17dcf16 100644
--- a/src/player.h
+++ b/src/player.h
@@ -57,6 +57,7 @@
#define PLAYER_METADATA_STATE_WRITE 2
typedef struct _PlayerControl {
+ volatile mpd_sint8 wait;
volatile mpd_sint8 stop;
volatile mpd_sint8 play;
volatile mpd_sint8 pause;
diff --git a/src/playerData.c b/src/playerData.c
index 30ff6d6..380e4a1 100644
--- a/src/playerData.c
+++ b/src/playerData.c
@@ -118,6 +118,7 @@ void initPlayerData(void)
buffered_chunks * sizeof(mpd_sint8));
buffer->acceptMetadata = 0;
+ playerData_pd->playerControl.wait = 0;
playerData_pd->playerControl.stop = 0;
playerData_pd->playerControl.pause = 0;
playerData_pd->playerControl.play = 0;
--- NEW FILE mpd.init ---
#!/bin/bash
#
# processname: mpd
# description: The Music Player Daemon
# chkconfig: - 85 15
. /etc/init.d/functions
RETVAL=0
prog="The Music Player Daemon"
mpd="@bindir@/mpd"
lockfile="@var@/lock/subsys/mpd"
start() {
echo -n $"Starting $prog: "
daemon $mpd
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $lockfile
echo
}
stop() {
echo -n $"Stopping $prog: "
killproc $mpd
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f $lockfile
echo
}
#
# See how we were called.
#
case "$1" in
start)
start
;;
stop)
stop
;;
reload|restart)
stop
start
RETVAL=$?
;;
condrestart)
if [ -f $lockfile ]; then
stop
start
fi
;;
status)
status $mpd
RETVAL=$?
;;
*)
echo $"Usage: $0 {condrestart|start|stop|restart|reload|status}"
exit 1
esac
exit $RETVAL
--- NEW FILE mpd.spec ---
Name: mpd
Version: 0.13.2
Release: 1%{?dist}
Summary: The Music Player Daemon
License: GPLv2+
Group: Applications/Multimedia
URL: http://www.musicpd.org/
Source: http://www.musicpd.org/uploads/files/mpd-0.13.2.tar.gz
Source1: mpd.init
Source2: 95-grant-audio-devices-to-mpd.fdi
Patch0: mpd.git-ab00513022af940b398601556bfb6256ff220546.patch
Patch1: mpd.git-1f620ed803e4b5c69b875bb36519c3299022fe9d.patch
Patch2: mpd.git-de2e69945604f831ece2c4dacf5a545ff1c80056.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libao-devel
BuildRequires: libogg-devel
BuildRequires: libvorbis-devel
BuildRequires: flac-devel
BuildRequires: audiofile-devel
BuildRequires: libid3tag-devel
BuildRequires: mikmod-devel
BuildRequires: alsa-lib-devel
BuildRequires: zlib-devel
BuildRequires: libshout-devel
BuildRequires: libmpcdec-devel
BuildRequires: pulseaudio-lib-devel
BuildRequires: libsamplerate-devel
BuildRequires: avahi-devel
BuildRequires: jack-audio-connection-kit-devel
BuildRequires: faad2-devel
BuildRequires: libmad-devel
Requires(pre): shadow-utils
Requires(post): chkconfig
Requires(preun): chkconfig /sbin/service
Requires(postun): /sbin/service
%description
Music Player Daemon (MPD) allows remote access for playing music (MP3, Ogg
Vorbis, FLAC, Mod, AAC and wave files) and managing playlists. MPD is designed
for integrating a computer into a stereo system that provides control for music
playback over a local network. It is also makes a great desktop music player,
especially if your a console junkie, like frontend options, or restart X often.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%configure
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
# conf file
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/playlists
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/music
mkdir -p $RPM_BUILD_ROOT%{_datadir}/hal/fdi/policy/20thirdparty
touch $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/mpd.log
touch $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/mpd.error
touch $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/mpd.db
touch $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/mpdstate
install -p -m644 doc/mpdconf.example $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e "s,~/music,%{_localstatedir}/lib/%{name}/music,g" $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e "s,~/.mpd/playlists,%{_localstatedir}/lib/%{name}/playlists,g" $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e "s,~/.mpd/mpd.log,%{_localstatedir}/lib/%{name}/mpd.log,g" $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e "s,~/.mpd/mpd.error,%{_localstatedir}/lib/%{name}/mpd.error,g" $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e "s,~/.mpd/mpd.db,%{_localstatedir}/lib/%{name}/mpd.db,g" $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e "s,~/.mpd/mpdstate,%{_localstatedir}/lib/%{name}/mpdstate,g" $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e "s,#state_file,state_file,g" $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e 's,#user "nobody",user "mpd",g' $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -e "s,@bindir@,%{_bindir},g;s,@var@,%{_localstatedir},g" %{SOURCE1} > $RPM_BUILD_ROOT%{_initrddir}/%{name}
install -p -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/hal/fdi/policy/20thirdparty
rm -rf $RPM_BUILD_ROOT/%{_docdir}/%{name}/
%clean
rm -rf $RPM_BUILD_ROOT
%pre
#creating mpd user
getent group mpd >/dev/null || groupadd -r mpd
getent passwd mpd >/dev/null || \
useradd -r -g mpd -d %{_localstatedir}/lib/%{name} -s /sbin/nologin \
-c "Music Player Daemon" mpd
exit 0
%post
if [ "$1" -eq "1" ]; then
#register %{name} service
/sbin/chkconfig --add %{name}
else
# as we switched from running as root.root to mpd.mpd
# chown the db files and playlists on upgrades
chown -R mpd.mpd %{_localstatedir}/lib/%{name}/playlists > /dev/null 2>&1 ||:
chown mpd.mpd %{_localstatedir}/lib/%{name}/mpd.log > /dev/null 2>&1 ||:
chown mpd.mpd %{_localstatedir}/lib/%{name}/mpd.error > /dev/null 2>&1 ||:
chown mpd.mpd %{_localstatedir}/lib/%{name}/mpd.db > /dev/null 2>&1 ||:
chown mpd.mpd %{_localstatedir}/lib/%{name}/mpdstate > /dev/null 2>&1 ||:
fi
%preun
if [ "$1" -eq "0" ]; then
/sbin/service %{name} stop > /dev/null 2>&1
/sbin/chkconfig --del %{name}
fi
%postun
if [ "$1" -eq "1" ]; then
/sbin/service %{name} condrestart > /dev/null 2>&1
fi
%files
%defattr(-,root,root)
%doc README UPGRADING doc/COMMANDS AUTHORS COPYING ChangeLog
%{_bindir}/%name
%attr(755,root,root) %{_initrddir}/%{name}
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_datadir}/hal/fdi/policy/20thirdparty/*fdi
%defattr(-,mpd,mpd)
%config(noreplace) %{_sysconfdir}/mpd.conf
%dir %{_localstatedir}/lib/%{name}
%{_localstatedir}/lib/%{name}/playlists
%{_localstatedir}/lib/%{name}/music
%ghost %{_localstatedir}/lib/%{name}/mpd.log
%ghost %{_localstatedir}/lib/%{name}/mpd.error
%ghost %{_localstatedir}/lib/%{name}/mpd.db
%ghost %{_localstatedir}/lib/%{name}/mpdstate
%changelog
* Fri Jul 25 2008 Adrian Reber <adrian(a)lisas.de> - 0.13.2-1
- updated to 0.13.2
* Thu May 29 2008 Hans de Goede <j.w.r.degoede(a)hhs.nl> - 0.13.1-3
- Fix mpd crashing when reading in modtracker files (rh bug 448964)
* Thu Mar 06 2008 Adrian Reber <adrian(a)lisas.de> - 0.13.1-2
- added patches from Thomas Jansen to run mpd by default
not as root.root but as mpd.mpd
* Mon Feb 11 2008 Adrian Reber <adrian(a)lisas.de> - 0.13.1-1
- updated to 0.13.1
* Thu Nov 15 2007 Adrian Reber <adrian(a)lisas.de> - 0.13.0-4
- another rebuilt for faad2
* Fri Nov 09 2007 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 0.13.0-3
- rebuild after faad2 downgrade to fix undefined symbols
* Sat Oct 13 2007 Adrian Reber <adrian(a)lisas.de> - 0.13.0-2
- rebuilt for rpmfusion
- updated License
* Sun Jul 29 2007 Adrian Reber <adrian(a)lisas.de> - 0.13.0-1
- update to 0.13.0
- added dwmw2's patches (#1569)
- fixed rpmlint errors and warnings
- added libsamplerate-devel, avahi-devel and
jack-audio-connection-kit-devel as BR
* Tue Mar 06 2007 Adrian Reber <adrian(a)lisas.de> - 0.12.1-3
- added flac-1.1.4 patch
* Sat Mar 03 2007 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 0.12.1-2
- Rebuild
* Mon Nov 27 2006 Adrian Reber <adrian(a)lisas.de> - 0.12.1-1
- updated to 0.12.1
- added missing Requires
- removed deletion of user mpd during %%preun
- removed -m (create home) from useradd
* Wed Oct 11 2006 Adrian Reber <adrian(a)lisas.de> - 0.11.6-6
- rebuilt
* Tue Mar 21 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- Add missing BR zlib-devel
* Thu Mar 09 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- switch to new release field
* Mon Mar 06 2006 Thorsten Leemhuis <fedora[AT]livna.org>
- no build time defines anymore so adapt spec completely to livna
* Tue Feb 28 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- add dist
* Sun Nov 28 2004 Aurelien Bompard <gauret[AT]free.fr> 0:0.11.5-0.3
- Apply Adrian Reber's patch to use a system-wide daemon, see bug 2234
* Tue Nov 09 2004 Aurelien Bompard <gauret[AT]free.fr> 0:0.11.5-0.2
- Prepare for FC3 (different BuildRequires)
* Fri Nov 05 2004 Aurelien Bompard <gauret[AT]free.fr> 0:0.11.5-0.fdr.1
- Initial Fedora package (from Mandrake)
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/mpd/F-9/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 22 Jul 2008 16:53:40 -0000 1.1
+++ .cvsignore 25 Jul 2008 20:21:59 -0000 1.2
@@ -0,0 +1 @@
+mpd-0.13.2.tar.gz
Index: sources
===================================================================
RCS file: /cvs/free/rpms/mpd/F-9/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 22 Jul 2008 16:53:40 -0000 1.1
+++ sources 25 Jul 2008 20:22:00 -0000 1.2
@@ -0,0 +1 @@
+33d0c7b08e2c9e2a6ad55703cb0d18d0 mpd-0.13.2.tar.gz
16 years, 4 months
rpms/mpd/F-8 95-grant-audio-devices-to-mpd.fdi, NONE, 1.1 mpd.git-1f620ed803e4b5c69b875bb36519c3299022fe9d.patch, NONE, 1.1 mpd.git-ab00513022af940b398601556bfb6256ff220546.patch, NONE, 1.1 mpd.git-de2e69945604f831ece2c4dacf5a545ff1c80056.patch, NONE, 1.1 mpd.init, NONE, 1.1 mpd.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
by Adrian Reber
Author: adrian
Update of /cvs/free/rpms/mpd/F-8
In directory se02.es.rpmfusion.net:/tmp/cvs-serv26176
Modified Files:
.cvsignore sources
Added Files:
95-grant-audio-devices-to-mpd.fdi
mpd.git-1f620ed803e4b5c69b875bb36519c3299022fe9d.patch
mpd.git-ab00513022af940b398601556bfb6256ff220546.patch
mpd.git-de2e69945604f831ece2c4dacf5a545ff1c80056.patch
mpd.init mpd.spec
Log Message:
initial thing
--- NEW FILE 95-grant-audio-devices-to-mpd.fdi ---
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<!-- grant access to sound devices to mpd user.. -->
<match key="info.capabilities" contains="access_control">
<match key="info.capabilities" contains="alsa">
<append key="access_control.grant_user" type="strlist">mpd</append>
</match>
<match key="info.capabilities" contains="oss">
<append key="access_control.grant_user" type="strlist">mpd</append>
</match>
</match>
</device>
</deviceinfo>
mpd.git-1f620ed803e4b5c69b875bb36519c3299022fe9d.patch:
--- NEW FILE mpd.git-1f620ed803e4b5c69b875bb36519c3299022fe9d.patch ---
From: jat <jat@09075e82-0dd4-0310-85a5-a0d7c8717e4f>
Date: Mon, 4 Jun 2007 22:29:55 +0000 (+0000)
Subject: Don't kill the player process (and effectively the decode process) when
X-Git-Url: http://git.infradead.org/?p=users%2Fdwmw2%2Fmpd.git;a=commitdiff_plain;h=...
Don't kill the player process (and effectively the decode process) when
completely stopped. Instead, send them SIGSTOP to pause the process until
they're needed again. Then send them SIGCONT instead of re-spawning them.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6485 09075e82-0dd4-0310-85a5-a0d7c8717e4f
---
diff --git a/src/decode.c b/src/decode.c
index 8ed5776..ce94833 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -75,6 +75,8 @@ static void stopDecode(DecoderControl * dc)
static void quitDecode(PlayerControl * pc, DecoderControl * dc)
{
+ int pid;
+
stopDecode(dc);
pc->state = PLAYER_STATE_STOP;
dc->seek = 0;
@@ -82,6 +84,10 @@ static void quitDecode(PlayerControl * pc, DecoderControl * dc)
pc->stop = 0;
pc->pause = 0;
kill(getppid(), SIGUSR1);
+
+ pid = decode_pid;
+ if (pid > 0)
+ kill(pid, SIGSTOP);
}
static int calculateCrossFadeChunks(PlayerControl * pc, AudioFormat * af)
@@ -396,6 +402,14 @@ static void decodeStart(PlayerControl * pc, OutputBuffer * cb,
static int decoderInit(PlayerControl * pc, OutputBuffer * cb,
DecoderControl * dc)
{
+ int pid;
+
+ pid = decode_pid;
+ if (pid > 0) {
+ kill(pid, SIGCONT);
+ return 0;
+ }
+
blockSignals();
getPlayerData()->playerControl.decode_pid = 0;
decode_pid = fork();
@@ -691,10 +705,8 @@ void decode(void)
dc->stop = 0;
dc->start = 1;
- if (decode_pid <= 0) {
- if (decoderInit(pc, cb, dc) < 0)
- return;
- }
+ if (decoderInit(pc, cb, dc) < 0)
+ return;
decodeParent(pc, dc, cb);
}
diff --git a/src/player.c b/src/player.c
index e2dc210..beff9b3 100644
--- a/src/player.c
+++ b/src/player.c
@@ -110,6 +110,14 @@ void player_sigChldHandler(int pid, int status)
int playerInit(void)
{
+ int pid;
+
+ pid = player_pid;
+ if (pid > 0) {
+ kill(pid, SIGCONT);
+ return 0;
+ }
+
blockSignals();
player_pid = fork();
if (player_pid==0)
@@ -155,9 +163,6 @@ int playerInit(void)
} else if (pc->cycleLogFiles) {
cycle_log_files();
pc->cycleLogFiles = 0;
- } else if (pc->quit) {
- pc->quit = 0;
- break;
} else
my_usleep(10000);
}
@@ -177,20 +182,18 @@ int playerInit(void)
return 0;
}
-int playerQuit(int fd)
+int playerWait(int fd)
{
- PlayerControl *pc = &(getPlayerData()->playerControl);
+ int pid;
if (playerStop(fd) < 0)
return -1;
playerCloseAudio();
- if (player_pid > 0) {
- pc->quit = 1;
- while (player_pid > 0 && pc->quit)
- my_usleep(1000);
- }
+ pid = player_pid;
+ if (pid > 0)
+ kill(pid, SIGSTOP);
return 0;
}
@@ -212,7 +215,7 @@ int playerPlay(int fd, Song * song)
pathcpy_trunc(pc->utf8url, getSongUrl(song));
pc->play = 1;
- if (player_pid == 0 && playerInit() < 0) {
+ if (playerInit() < 0) {
pc->play = 0;
return -1;
}
@@ -245,8 +248,10 @@ void playerKill(void)
int pid;
pid = player_pid;
- if (pid > 0)
+ if (pid > 0) {
+ kill(pid, SIGCONT);
kill(pid, SIGTERM);
+ }
}
int playerPause(int fd)
diff --git a/src/player.h b/src/player.h
index ce7eebc..de44f8e 100644
--- a/src/player.h
+++ b/src/player.h
@@ -57,7 +57,6 @@
#define PLAYER_METADATA_STATE_WRITE 2
typedef struct _PlayerControl {
- volatile mpd_sint8 quit;
volatile mpd_sint8 stop;
volatile mpd_sint8 play;
volatile mpd_sint8 pause;
@@ -122,7 +121,7 @@ int getPlayerError(void);
int playerInit(void);
-int playerQuit(int fd);
+int playerWait(int fd);
int queueSong(Song * song);
diff --git a/src/playerData.c b/src/playerData.c
index e4506c1..30ff6d6 100644
--- a/src/playerData.c
+++ b/src/playerData.c
@@ -118,7 +118,6 @@ void initPlayerData(void)
buffered_chunks * sizeof(mpd_sint8));
buffer->acceptMetadata = 0;
- playerData_pd->playerControl.quit = 0;
playerData_pd->playerControl.stop = 0;
playerData_pd->playerControl.pause = 0;
playerData_pd->playerControl.play = 0;
diff --git a/src/playlist.c b/src/playlist.c
index f6ae8ab..8b2bc1f 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -788,7 +788,7 @@ int deleteFromPlaylist(int fd, int song)
&& playlist.current == songOrder) {
/*if(playlist.current>=playlist.length) return playerStop(fd);
else return playPlaylistOrderNumber(fd,playlist.current); */
- playerQuit(STDERR_FILENO);
+ playerWait(STDERR_FILENO);
playlist_noGoToNext = 1;
}
@@ -829,7 +829,7 @@ void deleteASongFromPlaylist(Song * song)
int stopPlaylist(int fd)
{
DEBUG("playlist: stop\n");
- if (playerQuit(fd) < 0)
+ if (playerWait(fd) < 0)
return -1;
playlist.queued = -1;
playlist_state = PLAYLIST_STATE_STOP;
mpd.git-ab00513022af940b398601556bfb6256ff220546.patch:
--- NEW FILE mpd.git-ab00513022af940b398601556bfb6256ff220546.patch ---
From: jat <jat@09075e82-0dd4-0310-85a5-a0d7c8717e4f>
Date: Fri, 1 Jun 2007 18:10:13 +0000 (+0000)
Subject: Tell the player process (and thus also the decode process) to quit when
X-Git-Url: http://git.infradead.org/?p=users%2Fdwmw2%2Fmpd.git;a=commitdiff_plain;h=...
Tell the player process (and thus also the decode process) to quit when
playback is stopped completely. This means the player process will no
longer have to wake up 100 times per second to see if it's been told to
start playing (the main process will just spawn a new player process when
it needs to). On the downside, this means an extra pair of forks() and the
re-initializing of the player and decode processes each time playback is
restarted.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6446 09075e82-0dd4-0310-85a5-a0d7c8717e4f
---
diff --git a/src/player.c b/src/player.c
index 4870dc7..e2dc210 100644
--- a/src/player.c
+++ b/src/player.c
@@ -155,6 +155,9 @@ int playerInit(void)
} else if (pc->cycleLogFiles) {
cycle_log_files();
pc->cycleLogFiles = 0;
+ } else if (pc->quit) {
+ pc->quit = 0;
+ break;
} else
my_usleep(10000);
}
@@ -174,6 +177,24 @@ int playerInit(void)
return 0;
}
+int playerQuit(int fd)
+{
+ PlayerControl *pc = &(getPlayerData()->playerControl);
+
+ if (playerStop(fd) < 0)
+ return -1;
+
+ playerCloseAudio();
+
+ if (player_pid > 0) {
+ pc->quit = 1;
+ while (player_pid > 0 && pc->quit)
+ my_usleep(1000);
+ }
+
+ return 0;
+}
+
int playerPlay(int fd, Song * song)
{
PlayerControl *pc = &(getPlayerData()->playerControl);
@@ -341,6 +362,8 @@ void playerCloseAudio(void)
if (playerStop(STDERR_FILENO) < 0)
return;
pc->closeAudio = 1;
+ while (player_pid > 0 && pc->closeAudio)
+ my_usleep(1000);
}
}
diff --git a/src/player.h b/src/player.h
index b62fab2..ce7eebc 100644
--- a/src/player.h
+++ b/src/player.h
@@ -57,6 +57,7 @@
#define PLAYER_METADATA_STATE_WRITE 2
typedef struct _PlayerControl {
+ volatile mpd_sint8 quit;
volatile mpd_sint8 stop;
volatile mpd_sint8 play;
volatile mpd_sint8 pause;
@@ -121,6 +122,8 @@ int getPlayerError(void);
int playerInit(void);
+int playerQuit(int fd);
+
int queueSong(Song * song);
int getPlayerQueueState(void);
diff --git a/src/playerData.c b/src/playerData.c
index 30ff6d6..e4506c1 100644
--- a/src/playerData.c
+++ b/src/playerData.c
@@ -118,6 +118,7 @@ void initPlayerData(void)
buffered_chunks * sizeof(mpd_sint8));
buffer->acceptMetadata = 0;
+ playerData_pd->playerControl.quit = 0;
playerData_pd->playerControl.stop = 0;
playerData_pd->playerControl.pause = 0;
playerData_pd->playerControl.play = 0;
diff --git a/src/playlist.c b/src/playlist.c
index de5a2a3..d68033e 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -786,7 +786,7 @@ int deleteFromPlaylist(int fd, int song)
&& playlist.current == songOrder) {
/*if(playlist.current>=playlist.length) return playerStop(fd);
else return playPlaylistOrderNumber(fd,playlist.current); */
- playerStop(STDERR_FILENO);
+ playerQuit(STDERR_FILENO);
playlist_noGoToNext = 1;
}
@@ -827,9 +827,8 @@ void deleteASongFromPlaylist(Song * song)
int stopPlaylist(int fd)
{
DEBUG("playlist: stop\n");
- if (playerStop(fd) < 0)
+ if (playerQuit(fd) < 0)
return -1;
- playerCloseAudio();
playlist.queued = -1;
playlist_state = PLAYLIST_STATE_STOP;
playlist_noGoToNext = 0;
mpd.git-de2e69945604f831ece2c4dacf5a545ff1c80056.patch:
--- NEW FILE mpd.git-de2e69945604f831ece2c4dacf5a545ff1c80056.patch ---
From: jat <jat@09075e82-0dd4-0310-85a5-a0d7c8717e4f>
Date: Mon, 4 Jun 2007 23:14:38 +0000 (+0000)
Subject: Set a flag if we've sent the player process SIGSTOP so that we know not to
X-Git-Url: http://git.infradead.org/?p=users%2Fdwmw2%2Fmpd.git;a=commitdiff_plain;h=...
Set a flag if we've sent the player process SIGSTOP so that we know not to
wait for it to complete an action which it never will.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6488 09075e82-0dd4-0310-85a5-a0d7c8717e4f
---
diff --git a/src/player.c b/src/player.c
index beff9b3..096503b 100644
--- a/src/player.c
+++ b/src/player.c
@@ -110,11 +110,13 @@ void player_sigChldHandler(int pid, int status)
int playerInit(void)
{
+ PlayerControl *pc = &(getPlayerData()->playerControl);
int pid;
pid = player_pid;
if (pid > 0) {
kill(pid, SIGCONT);
+ pc->wait = 0;
return 0;
}
@@ -124,8 +126,6 @@ int playerInit(void)
{
clock_t start = clock();
- PlayerControl *pc = &(getPlayerData()->playerControl);
-
unblockSignals();
setSigHandlersForDecoder();
@@ -184,16 +184,22 @@ int playerInit(void)
int playerWait(int fd)
{
+ PlayerControl *pc = &(getPlayerData()->playerControl);
int pid;
+ if (pc->wait)
+ return 0;
+
if (playerStop(fd) < 0)
return -1;
playerCloseAudio();
pid = player_pid;
- if (pid > 0)
+ if (pid > 0) {
+ pc->wait = 1;
kill(pid, SIGSTOP);
+ }
return 0;
}
diff --git a/src/player.h b/src/player.h
index de44f8e..17dcf16 100644
--- a/src/player.h
+++ b/src/player.h
@@ -57,6 +57,7 @@
#define PLAYER_METADATA_STATE_WRITE 2
typedef struct _PlayerControl {
+ volatile mpd_sint8 wait;
volatile mpd_sint8 stop;
volatile mpd_sint8 play;
volatile mpd_sint8 pause;
diff --git a/src/playerData.c b/src/playerData.c
index 30ff6d6..380e4a1 100644
--- a/src/playerData.c
+++ b/src/playerData.c
@@ -118,6 +118,7 @@ void initPlayerData(void)
buffered_chunks * sizeof(mpd_sint8));
buffer->acceptMetadata = 0;
+ playerData_pd->playerControl.wait = 0;
playerData_pd->playerControl.stop = 0;
playerData_pd->playerControl.pause = 0;
playerData_pd->playerControl.play = 0;
--- NEW FILE mpd.init ---
#!/bin/bash
#
# processname: mpd
# description: The Music Player Daemon
# chkconfig: - 85 15
. /etc/init.d/functions
RETVAL=0
prog="The Music Player Daemon"
mpd="@bindir@/mpd"
lockfile="@var@/lock/subsys/mpd"
start() {
echo -n $"Starting $prog: "
daemon $mpd
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $lockfile
echo
}
stop() {
echo -n $"Stopping $prog: "
killproc $mpd
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f $lockfile
echo
}
#
# See how we were called.
#
case "$1" in
start)
start
;;
stop)
stop
;;
reload|restart)
stop
start
RETVAL=$?
;;
condrestart)
if [ -f $lockfile ]; then
stop
start
fi
;;
status)
status $mpd
RETVAL=$?
;;
*)
echo $"Usage: $0 {condrestart|start|stop|restart|reload|status}"
exit 1
esac
exit $RETVAL
--- NEW FILE mpd.spec ---
Name: mpd
Version: 0.13.2
Release: 1%{?dist}
Summary: The Music Player Daemon
License: GPLv2+
Group: Applications/Multimedia
URL: http://www.musicpd.org/
Source: http://www.musicpd.org/uploads/files/mpd-0.13.2.tar.gz
Source1: mpd.init
Source2: 95-grant-audio-devices-to-mpd.fdi
Patch0: mpd.git-ab00513022af940b398601556bfb6256ff220546.patch
Patch1: mpd.git-1f620ed803e4b5c69b875bb36519c3299022fe9d.patch
Patch2: mpd.git-de2e69945604f831ece2c4dacf5a545ff1c80056.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libao-devel
BuildRequires: libogg-devel
BuildRequires: libvorbis-devel
BuildRequires: flac-devel
BuildRequires: audiofile-devel
BuildRequires: libid3tag-devel
BuildRequires: mikmod-devel
BuildRequires: alsa-lib-devel
BuildRequires: zlib-devel
BuildRequires: libshout-devel
BuildRequires: libmpcdec-devel
BuildRequires: pulseaudio-lib-devel
BuildRequires: libsamplerate-devel
BuildRequires: avahi-devel
BuildRequires: jack-audio-connection-kit-devel
BuildRequires: faad2-devel
BuildRequires: libmad-devel
Requires(pre): shadow-utils
Requires(post): chkconfig
Requires(preun): chkconfig /sbin/service
Requires(postun): /sbin/service
%description
Music Player Daemon (MPD) allows remote access for playing music (MP3, Ogg
Vorbis, FLAC, Mod, AAC and wave files) and managing playlists. MPD is designed
for integrating a computer into a stereo system that provides control for music
playback over a local network. It is also makes a great desktop music player,
especially if your a console junkie, like frontend options, or restart X often.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%configure
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
# conf file
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/playlists
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/music
mkdir -p $RPM_BUILD_ROOT%{_datadir}/hal/fdi/policy/20thirdparty
touch $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/mpd.log
touch $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/mpd.error
touch $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/mpd.db
touch $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/mpdstate
install -p -m644 doc/mpdconf.example $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e "s,~/music,%{_localstatedir}/lib/%{name}/music,g" $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e "s,~/.mpd/playlists,%{_localstatedir}/lib/%{name}/playlists,g" $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e "s,~/.mpd/mpd.log,%{_localstatedir}/lib/%{name}/mpd.log,g" $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e "s,~/.mpd/mpd.error,%{_localstatedir}/lib/%{name}/mpd.error,g" $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e "s,~/.mpd/mpd.db,%{_localstatedir}/lib/%{name}/mpd.db,g" $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e "s,~/.mpd/mpdstate,%{_localstatedir}/lib/%{name}/mpdstate,g" $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e "s,#state_file,state_file,g" $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e 's,#user "nobody",user "mpd",g' $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -e "s,@bindir@,%{_bindir},g;s,@var@,%{_localstatedir},g" %{SOURCE1} > $RPM_BUILD_ROOT%{_initrddir}/%{name}
install -p -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/hal/fdi/policy/20thirdparty
rm -rf $RPM_BUILD_ROOT/%{_docdir}/%{name}/
%clean
rm -rf $RPM_BUILD_ROOT
%pre
#creating mpd user
getent group mpd >/dev/null || groupadd -r mpd
getent passwd mpd >/dev/null || \
useradd -r -g mpd -d %{_localstatedir}/lib/%{name} -s /sbin/nologin \
-c "Music Player Daemon" mpd
exit 0
%post
if [ "$1" -eq "1" ]; then
#register %{name} service
/sbin/chkconfig --add %{name}
else
# as we switched from running as root.root to mpd.mpd
# chown the db files and playlists on upgrades
chown -R mpd.mpd %{_localstatedir}/lib/%{name}/playlists > /dev/null 2>&1 ||:
chown mpd.mpd %{_localstatedir}/lib/%{name}/mpd.log > /dev/null 2>&1 ||:
chown mpd.mpd %{_localstatedir}/lib/%{name}/mpd.error > /dev/null 2>&1 ||:
chown mpd.mpd %{_localstatedir}/lib/%{name}/mpd.db > /dev/null 2>&1 ||:
chown mpd.mpd %{_localstatedir}/lib/%{name}/mpdstate > /dev/null 2>&1 ||:
fi
%preun
if [ "$1" -eq "0" ]; then
/sbin/service %{name} stop > /dev/null 2>&1
/sbin/chkconfig --del %{name}
fi
%postun
if [ "$1" -eq "1" ]; then
/sbin/service %{name} condrestart > /dev/null 2>&1
fi
%files
%defattr(-,root,root)
%doc README UPGRADING doc/COMMANDS AUTHORS COPYING ChangeLog
%{_bindir}/%name
%attr(755,root,root) %{_initrddir}/%{name}
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_datadir}/hal/fdi/policy/20thirdparty/*fdi
%defattr(-,mpd,mpd)
%config(noreplace) %{_sysconfdir}/mpd.conf
%dir %{_localstatedir}/lib/%{name}
%{_localstatedir}/lib/%{name}/playlists
%{_localstatedir}/lib/%{name}/music
%ghost %{_localstatedir}/lib/%{name}/mpd.log
%ghost %{_localstatedir}/lib/%{name}/mpd.error
%ghost %{_localstatedir}/lib/%{name}/mpd.db
%ghost %{_localstatedir}/lib/%{name}/mpdstate
%changelog
* Fri Jul 25 2008 Adrian Reber <adrian(a)lisas.de> - 0.13.2-1
- updated to 0.13.2
* Thu May 29 2008 Hans de Goede <j.w.r.degoede(a)hhs.nl> - 0.13.1-3
- Fix mpd crashing when reading in modtracker files (rh bug 448964)
* Thu Mar 06 2008 Adrian Reber <adrian(a)lisas.de> - 0.13.1-2
- added patches from Thomas Jansen to run mpd by default
not as root.root but as mpd.mpd
* Mon Feb 11 2008 Adrian Reber <adrian(a)lisas.de> - 0.13.1-1
- updated to 0.13.1
* Thu Nov 15 2007 Adrian Reber <adrian(a)lisas.de> - 0.13.0-4
- another rebuilt for faad2
* Fri Nov 09 2007 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 0.13.0-3
- rebuild after faad2 downgrade to fix undefined symbols
* Sat Oct 13 2007 Adrian Reber <adrian(a)lisas.de> - 0.13.0-2
- rebuilt for rpmfusion
- updated License
* Sun Jul 29 2007 Adrian Reber <adrian(a)lisas.de> - 0.13.0-1
- update to 0.13.0
- added dwmw2's patches (#1569)
- fixed rpmlint errors and warnings
- added libsamplerate-devel, avahi-devel and
jack-audio-connection-kit-devel as BR
* Tue Mar 06 2007 Adrian Reber <adrian(a)lisas.de> - 0.12.1-3
- added flac-1.1.4 patch
* Sat Mar 03 2007 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 0.12.1-2
- Rebuild
* Mon Nov 27 2006 Adrian Reber <adrian(a)lisas.de> - 0.12.1-1
- updated to 0.12.1
- added missing Requires
- removed deletion of user mpd during %%preun
- removed -m (create home) from useradd
* Wed Oct 11 2006 Adrian Reber <adrian(a)lisas.de> - 0.11.6-6
- rebuilt
* Tue Mar 21 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- Add missing BR zlib-devel
* Thu Mar 09 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- switch to new release field
* Mon Mar 06 2006 Thorsten Leemhuis <fedora[AT]livna.org>
- no build time defines anymore so adapt spec completely to livna
* Tue Feb 28 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- add dist
* Sun Nov 28 2004 Aurelien Bompard <gauret[AT]free.fr> 0:0.11.5-0.3
- Apply Adrian Reber's patch to use a system-wide daemon, see bug 2234
* Tue Nov 09 2004 Aurelien Bompard <gauret[AT]free.fr> 0:0.11.5-0.2
- Prepare for FC3 (different BuildRequires)
* Fri Nov 05 2004 Aurelien Bompard <gauret[AT]free.fr> 0:0.11.5-0.fdr.1
- Initial Fedora package (from Mandrake)
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/mpd/F-8/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 22 Jul 2008 16:53:40 -0000 1.1
+++ .cvsignore 25 Jul 2008 20:21:29 -0000 1.2
@@ -0,0 +1 @@
+mpd-0.13.2.tar.gz
Index: sources
===================================================================
RCS file: /cvs/free/rpms/mpd/F-8/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 22 Jul 2008 16:53:40 -0000 1.1
+++ sources 25 Jul 2008 20:21:29 -0000 1.2
@@ -0,0 +1 @@
+33d0c7b08e2c9e2a6ad55703cb0d18d0 mpd-0.13.2.tar.gz
16 years, 4 months
rpms/mpd/devel 95-grant-audio-devices-to-mpd.fdi, NONE, 1.1 mpd.git-1f620ed803e4b5c69b875bb36519c3299022fe9d.patch, NONE, 1.1 mpd.git-ab00513022af940b398601556bfb6256ff220546.patch, NONE, 1.1 mpd.git-de2e69945604f831ece2c4dacf5a545ff1c80056.patch, NONE, 1.1 mpd.init, NONE, 1.1 mpd.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
by Adrian Reber
Author: adrian
Update of /cvs/free/rpms/mpd/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv25801/devel
Modified Files:
.cvsignore sources
Added Files:
95-grant-audio-devices-to-mpd.fdi
mpd.git-1f620ed803e4b5c69b875bb36519c3299022fe9d.patch
mpd.git-ab00513022af940b398601556bfb6256ff220546.patch
mpd.git-de2e69945604f831ece2c4dacf5a545ff1c80056.patch
mpd.init mpd.spec
Log Message:
initial thing
--- NEW FILE 95-grant-audio-devices-to-mpd.fdi ---
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<!-- grant access to sound devices to mpd user.. -->
<match key="info.capabilities" contains="access_control">
<match key="info.capabilities" contains="alsa">
<append key="access_control.grant_user" type="strlist">mpd</append>
</match>
<match key="info.capabilities" contains="oss">
<append key="access_control.grant_user" type="strlist">mpd</append>
</match>
</match>
</device>
</deviceinfo>
mpd.git-1f620ed803e4b5c69b875bb36519c3299022fe9d.patch:
--- NEW FILE mpd.git-1f620ed803e4b5c69b875bb36519c3299022fe9d.patch ---
From: jat <jat@09075e82-0dd4-0310-85a5-a0d7c8717e4f>
Date: Mon, 4 Jun 2007 22:29:55 +0000 (+0000)
Subject: Don't kill the player process (and effectively the decode process) when
X-Git-Url: http://git.infradead.org/?p=users%2Fdwmw2%2Fmpd.git;a=commitdiff_plain;h=...
Don't kill the player process (and effectively the decode process) when
completely stopped. Instead, send them SIGSTOP to pause the process until
they're needed again. Then send them SIGCONT instead of re-spawning them.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6485 09075e82-0dd4-0310-85a5-a0d7c8717e4f
---
diff --git a/src/decode.c b/src/decode.c
index 8ed5776..ce94833 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -75,6 +75,8 @@ static void stopDecode(DecoderControl * dc)
static void quitDecode(PlayerControl * pc, DecoderControl * dc)
{
+ int pid;
+
stopDecode(dc);
pc->state = PLAYER_STATE_STOP;
dc->seek = 0;
@@ -82,6 +84,10 @@ static void quitDecode(PlayerControl * pc, DecoderControl * dc)
pc->stop = 0;
pc->pause = 0;
kill(getppid(), SIGUSR1);
+
+ pid = decode_pid;
+ if (pid > 0)
+ kill(pid, SIGSTOP);
}
static int calculateCrossFadeChunks(PlayerControl * pc, AudioFormat * af)
@@ -396,6 +402,14 @@ static void decodeStart(PlayerControl * pc, OutputBuffer * cb,
static int decoderInit(PlayerControl * pc, OutputBuffer * cb,
DecoderControl * dc)
{
+ int pid;
+
+ pid = decode_pid;
+ if (pid > 0) {
+ kill(pid, SIGCONT);
+ return 0;
+ }
+
blockSignals();
getPlayerData()->playerControl.decode_pid = 0;
decode_pid = fork();
@@ -691,10 +705,8 @@ void decode(void)
dc->stop = 0;
dc->start = 1;
- if (decode_pid <= 0) {
- if (decoderInit(pc, cb, dc) < 0)
- return;
- }
+ if (decoderInit(pc, cb, dc) < 0)
+ return;
decodeParent(pc, dc, cb);
}
diff --git a/src/player.c b/src/player.c
index e2dc210..beff9b3 100644
--- a/src/player.c
+++ b/src/player.c
@@ -110,6 +110,14 @@ void player_sigChldHandler(int pid, int status)
int playerInit(void)
{
+ int pid;
+
+ pid = player_pid;
+ if (pid > 0) {
+ kill(pid, SIGCONT);
+ return 0;
+ }
+
blockSignals();
player_pid = fork();
if (player_pid==0)
@@ -155,9 +163,6 @@ int playerInit(void)
} else if (pc->cycleLogFiles) {
cycle_log_files();
pc->cycleLogFiles = 0;
- } else if (pc->quit) {
- pc->quit = 0;
- break;
} else
my_usleep(10000);
}
@@ -177,20 +182,18 @@ int playerInit(void)
return 0;
}
-int playerQuit(int fd)
+int playerWait(int fd)
{
- PlayerControl *pc = &(getPlayerData()->playerControl);
+ int pid;
if (playerStop(fd) < 0)
return -1;
playerCloseAudio();
- if (player_pid > 0) {
- pc->quit = 1;
- while (player_pid > 0 && pc->quit)
- my_usleep(1000);
- }
+ pid = player_pid;
+ if (pid > 0)
+ kill(pid, SIGSTOP);
return 0;
}
@@ -212,7 +215,7 @@ int playerPlay(int fd, Song * song)
pathcpy_trunc(pc->utf8url, getSongUrl(song));
pc->play = 1;
- if (player_pid == 0 && playerInit() < 0) {
+ if (playerInit() < 0) {
pc->play = 0;
return -1;
}
@@ -245,8 +248,10 @@ void playerKill(void)
int pid;
pid = player_pid;
- if (pid > 0)
+ if (pid > 0) {
+ kill(pid, SIGCONT);
kill(pid, SIGTERM);
+ }
}
int playerPause(int fd)
diff --git a/src/player.h b/src/player.h
index ce7eebc..de44f8e 100644
--- a/src/player.h
+++ b/src/player.h
@@ -57,7 +57,6 @@
#define PLAYER_METADATA_STATE_WRITE 2
typedef struct _PlayerControl {
- volatile mpd_sint8 quit;
volatile mpd_sint8 stop;
volatile mpd_sint8 play;
volatile mpd_sint8 pause;
@@ -122,7 +121,7 @@ int getPlayerError(void);
int playerInit(void);
-int playerQuit(int fd);
+int playerWait(int fd);
int queueSong(Song * song);
diff --git a/src/playerData.c b/src/playerData.c
index e4506c1..30ff6d6 100644
--- a/src/playerData.c
+++ b/src/playerData.c
@@ -118,7 +118,6 @@ void initPlayerData(void)
buffered_chunks * sizeof(mpd_sint8));
buffer->acceptMetadata = 0;
- playerData_pd->playerControl.quit = 0;
playerData_pd->playerControl.stop = 0;
playerData_pd->playerControl.pause = 0;
playerData_pd->playerControl.play = 0;
diff --git a/src/playlist.c b/src/playlist.c
index f6ae8ab..8b2bc1f 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -788,7 +788,7 @@ int deleteFromPlaylist(int fd, int song)
&& playlist.current == songOrder) {
/*if(playlist.current>=playlist.length) return playerStop(fd);
else return playPlaylistOrderNumber(fd,playlist.current); */
- playerQuit(STDERR_FILENO);
+ playerWait(STDERR_FILENO);
playlist_noGoToNext = 1;
}
@@ -829,7 +829,7 @@ void deleteASongFromPlaylist(Song * song)
int stopPlaylist(int fd)
{
DEBUG("playlist: stop\n");
- if (playerQuit(fd) < 0)
+ if (playerWait(fd) < 0)
return -1;
playlist.queued = -1;
playlist_state = PLAYLIST_STATE_STOP;
mpd.git-ab00513022af940b398601556bfb6256ff220546.patch:
--- NEW FILE mpd.git-ab00513022af940b398601556bfb6256ff220546.patch ---
From: jat <jat@09075e82-0dd4-0310-85a5-a0d7c8717e4f>
Date: Fri, 1 Jun 2007 18:10:13 +0000 (+0000)
Subject: Tell the player process (and thus also the decode process) to quit when
X-Git-Url: http://git.infradead.org/?p=users%2Fdwmw2%2Fmpd.git;a=commitdiff_plain;h=...
Tell the player process (and thus also the decode process) to quit when
playback is stopped completely. This means the player process will no
longer have to wake up 100 times per second to see if it's been told to
start playing (the main process will just spawn a new player process when
it needs to). On the downside, this means an extra pair of forks() and the
re-initializing of the player and decode processes each time playback is
restarted.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6446 09075e82-0dd4-0310-85a5-a0d7c8717e4f
---
diff --git a/src/player.c b/src/player.c
index 4870dc7..e2dc210 100644
--- a/src/player.c
+++ b/src/player.c
@@ -155,6 +155,9 @@ int playerInit(void)
} else if (pc->cycleLogFiles) {
cycle_log_files();
pc->cycleLogFiles = 0;
+ } else if (pc->quit) {
+ pc->quit = 0;
+ break;
} else
my_usleep(10000);
}
@@ -174,6 +177,24 @@ int playerInit(void)
return 0;
}
+int playerQuit(int fd)
+{
+ PlayerControl *pc = &(getPlayerData()->playerControl);
+
+ if (playerStop(fd) < 0)
+ return -1;
+
+ playerCloseAudio();
+
+ if (player_pid > 0) {
+ pc->quit = 1;
+ while (player_pid > 0 && pc->quit)
+ my_usleep(1000);
+ }
+
+ return 0;
+}
+
int playerPlay(int fd, Song * song)
{
PlayerControl *pc = &(getPlayerData()->playerControl);
@@ -341,6 +362,8 @@ void playerCloseAudio(void)
if (playerStop(STDERR_FILENO) < 0)
return;
pc->closeAudio = 1;
+ while (player_pid > 0 && pc->closeAudio)
+ my_usleep(1000);
}
}
diff --git a/src/player.h b/src/player.h
index b62fab2..ce7eebc 100644
--- a/src/player.h
+++ b/src/player.h
@@ -57,6 +57,7 @@
#define PLAYER_METADATA_STATE_WRITE 2
typedef struct _PlayerControl {
+ volatile mpd_sint8 quit;
volatile mpd_sint8 stop;
volatile mpd_sint8 play;
volatile mpd_sint8 pause;
@@ -121,6 +122,8 @@ int getPlayerError(void);
int playerInit(void);
+int playerQuit(int fd);
+
int queueSong(Song * song);
int getPlayerQueueState(void);
diff --git a/src/playerData.c b/src/playerData.c
index 30ff6d6..e4506c1 100644
--- a/src/playerData.c
+++ b/src/playerData.c
@@ -118,6 +118,7 @@ void initPlayerData(void)
buffered_chunks * sizeof(mpd_sint8));
buffer->acceptMetadata = 0;
+ playerData_pd->playerControl.quit = 0;
playerData_pd->playerControl.stop = 0;
playerData_pd->playerControl.pause = 0;
playerData_pd->playerControl.play = 0;
diff --git a/src/playlist.c b/src/playlist.c
index de5a2a3..d68033e 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -786,7 +786,7 @@ int deleteFromPlaylist(int fd, int song)
&& playlist.current == songOrder) {
/*if(playlist.current>=playlist.length) return playerStop(fd);
else return playPlaylistOrderNumber(fd,playlist.current); */
- playerStop(STDERR_FILENO);
+ playerQuit(STDERR_FILENO);
playlist_noGoToNext = 1;
}
@@ -827,9 +827,8 @@ void deleteASongFromPlaylist(Song * song)
int stopPlaylist(int fd)
{
DEBUG("playlist: stop\n");
- if (playerStop(fd) < 0)
+ if (playerQuit(fd) < 0)
return -1;
- playerCloseAudio();
playlist.queued = -1;
playlist_state = PLAYLIST_STATE_STOP;
playlist_noGoToNext = 0;
mpd.git-de2e69945604f831ece2c4dacf5a545ff1c80056.patch:
--- NEW FILE mpd.git-de2e69945604f831ece2c4dacf5a545ff1c80056.patch ---
From: jat <jat@09075e82-0dd4-0310-85a5-a0d7c8717e4f>
Date: Mon, 4 Jun 2007 23:14:38 +0000 (+0000)
Subject: Set a flag if we've sent the player process SIGSTOP so that we know not to
X-Git-Url: http://git.infradead.org/?p=users%2Fdwmw2%2Fmpd.git;a=commitdiff_plain;h=...
Set a flag if we've sent the player process SIGSTOP so that we know not to
wait for it to complete an action which it never will.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6488 09075e82-0dd4-0310-85a5-a0d7c8717e4f
---
diff --git a/src/player.c b/src/player.c
index beff9b3..096503b 100644
--- a/src/player.c
+++ b/src/player.c
@@ -110,11 +110,13 @@ void player_sigChldHandler(int pid, int status)
int playerInit(void)
{
+ PlayerControl *pc = &(getPlayerData()->playerControl);
int pid;
pid = player_pid;
if (pid > 0) {
kill(pid, SIGCONT);
+ pc->wait = 0;
return 0;
}
@@ -124,8 +126,6 @@ int playerInit(void)
{
clock_t start = clock();
- PlayerControl *pc = &(getPlayerData()->playerControl);
-
unblockSignals();
setSigHandlersForDecoder();
@@ -184,16 +184,22 @@ int playerInit(void)
int playerWait(int fd)
{
+ PlayerControl *pc = &(getPlayerData()->playerControl);
int pid;
+ if (pc->wait)
+ return 0;
+
if (playerStop(fd) < 0)
return -1;
playerCloseAudio();
pid = player_pid;
- if (pid > 0)
+ if (pid > 0) {
+ pc->wait = 1;
kill(pid, SIGSTOP);
+ }
return 0;
}
diff --git a/src/player.h b/src/player.h
index de44f8e..17dcf16 100644
--- a/src/player.h
+++ b/src/player.h
@@ -57,6 +57,7 @@
#define PLAYER_METADATA_STATE_WRITE 2
typedef struct _PlayerControl {
+ volatile mpd_sint8 wait;
volatile mpd_sint8 stop;
volatile mpd_sint8 play;
volatile mpd_sint8 pause;
diff --git a/src/playerData.c b/src/playerData.c
index 30ff6d6..380e4a1 100644
--- a/src/playerData.c
+++ b/src/playerData.c
@@ -118,6 +118,7 @@ void initPlayerData(void)
buffered_chunks * sizeof(mpd_sint8));
buffer->acceptMetadata = 0;
+ playerData_pd->playerControl.wait = 0;
playerData_pd->playerControl.stop = 0;
playerData_pd->playerControl.pause = 0;
playerData_pd->playerControl.play = 0;
--- NEW FILE mpd.init ---
#!/bin/bash
#
# processname: mpd
# description: The Music Player Daemon
# chkconfig: - 85 15
. /etc/init.d/functions
RETVAL=0
prog="The Music Player Daemon"
mpd="@bindir@/mpd"
lockfile="@var@/lock/subsys/mpd"
start() {
echo -n $"Starting $prog: "
daemon $mpd
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $lockfile
echo
}
stop() {
echo -n $"Stopping $prog: "
killproc $mpd
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f $lockfile
echo
}
#
# See how we were called.
#
case "$1" in
start)
start
;;
stop)
stop
;;
reload|restart)
stop
start
RETVAL=$?
;;
condrestart)
if [ -f $lockfile ]; then
stop
start
fi
;;
status)
status $mpd
RETVAL=$?
;;
*)
echo $"Usage: $0 {condrestart|start|stop|restart|reload|status}"
exit 1
esac
exit $RETVAL
--- NEW FILE mpd.spec ---
Name: mpd
Version: 0.13.2
Release: 1%{?dist}
Summary: The Music Player Daemon
License: GPLv2+
Group: Applications/Multimedia
URL: http://www.musicpd.org/
Source: http://www.musicpd.org/uploads/files/mpd-0.13.2.tar.gz
Source1: mpd.init
Source2: 95-grant-audio-devices-to-mpd.fdi
Patch0: mpd.git-ab00513022af940b398601556bfb6256ff220546.patch
Patch1: mpd.git-1f620ed803e4b5c69b875bb36519c3299022fe9d.patch
Patch2: mpd.git-de2e69945604f831ece2c4dacf5a545ff1c80056.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libao-devel
BuildRequires: libogg-devel
BuildRequires: libvorbis-devel
BuildRequires: flac-devel
BuildRequires: audiofile-devel
BuildRequires: libid3tag-devel
BuildRequires: mikmod-devel
BuildRequires: alsa-lib-devel
BuildRequires: zlib-devel
BuildRequires: libshout-devel
BuildRequires: libmpcdec-devel
BuildRequires: pulseaudio-lib-devel
BuildRequires: libsamplerate-devel
BuildRequires: avahi-devel
BuildRequires: jack-audio-connection-kit-devel
BuildRequires: faad2-devel
BuildRequires: libmad-devel
Requires(pre): shadow-utils
Requires(post): chkconfig
Requires(preun): chkconfig /sbin/service
Requires(postun): /sbin/service
%description
Music Player Daemon (MPD) allows remote access for playing music (MP3, Ogg
Vorbis, FLAC, Mod, AAC and wave files) and managing playlists. MPD is designed
for integrating a computer into a stereo system that provides control for music
playback over a local network. It is also makes a great desktop music player,
especially if your a console junkie, like frontend options, or restart X often.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%configure
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
# conf file
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/playlists
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/music
mkdir -p $RPM_BUILD_ROOT%{_datadir}/hal/fdi/policy/20thirdparty
touch $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/mpd.log
touch $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/mpd.error
touch $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/mpd.db
touch $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/mpdstate
install -p -m644 doc/mpdconf.example $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e "s,~/music,%{_localstatedir}/lib/%{name}/music,g" $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e "s,~/.mpd/playlists,%{_localstatedir}/lib/%{name}/playlists,g" $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e "s,~/.mpd/mpd.log,%{_localstatedir}/lib/%{name}/mpd.log,g" $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e "s,~/.mpd/mpd.error,%{_localstatedir}/lib/%{name}/mpd.error,g" $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e "s,~/.mpd/mpd.db,%{_localstatedir}/lib/%{name}/mpd.db,g" $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e "s,~/.mpd/mpdstate,%{_localstatedir}/lib/%{name}/mpdstate,g" $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e "s,#state_file,state_file,g" $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -i -e 's,#user "nobody",user "mpd",g' $RPM_BUILD_ROOT%{_sysconfdir}/mpd.conf
%{__sed} -e "s,@bindir@,%{_bindir},g;s,@var@,%{_localstatedir},g" %{SOURCE1} > $RPM_BUILD_ROOT%{_initrddir}/%{name}
install -p -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/hal/fdi/policy/20thirdparty
rm -rf $RPM_BUILD_ROOT/%{_docdir}/%{name}/
%clean
rm -rf $RPM_BUILD_ROOT
%pre
#creating mpd user
getent group mpd >/dev/null || groupadd -r mpd
getent passwd mpd >/dev/null || \
useradd -r -g mpd -d %{_localstatedir}/lib/%{name} -s /sbin/nologin \
-c "Music Player Daemon" mpd
exit 0
%post
if [ "$1" -eq "1" ]; then
#register %{name} service
/sbin/chkconfig --add %{name}
else
# as we switched from running as root.root to mpd.mpd
# chown the db files and playlists on upgrades
chown -R mpd.mpd %{_localstatedir}/lib/%{name}/playlists > /dev/null 2>&1 ||:
chown mpd.mpd %{_localstatedir}/lib/%{name}/mpd.log > /dev/null 2>&1 ||:
chown mpd.mpd %{_localstatedir}/lib/%{name}/mpd.error > /dev/null 2>&1 ||:
chown mpd.mpd %{_localstatedir}/lib/%{name}/mpd.db > /dev/null 2>&1 ||:
chown mpd.mpd %{_localstatedir}/lib/%{name}/mpdstate > /dev/null 2>&1 ||:
fi
%preun
if [ "$1" -eq "0" ]; then
/sbin/service %{name} stop > /dev/null 2>&1
/sbin/chkconfig --del %{name}
fi
%postun
if [ "$1" -eq "1" ]; then
/sbin/service %{name} condrestart > /dev/null 2>&1
fi
%files
%defattr(-,root,root)
%doc README UPGRADING doc/COMMANDS AUTHORS COPYING ChangeLog
%{_bindir}/%name
%attr(755,root,root) %{_initrddir}/%{name}
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_datadir}/hal/fdi/policy/20thirdparty/*fdi
%defattr(-,mpd,mpd)
%config(noreplace) %{_sysconfdir}/mpd.conf
%dir %{_localstatedir}/lib/%{name}
%{_localstatedir}/lib/%{name}/playlists
%{_localstatedir}/lib/%{name}/music
%ghost %{_localstatedir}/lib/%{name}/mpd.log
%ghost %{_localstatedir}/lib/%{name}/mpd.error
%ghost %{_localstatedir}/lib/%{name}/mpd.db
%ghost %{_localstatedir}/lib/%{name}/mpdstate
%changelog
* Fri Jul 25 2008 Adrian Reber <adrian(a)lisas.de> - 0.13.2-1
- updated to 0.13.2
* Thu May 29 2008 Hans de Goede <j.w.r.degoede(a)hhs.nl> - 0.13.1-3
- Fix mpd crashing when reading in modtracker files (rh bug 448964)
* Thu Mar 06 2008 Adrian Reber <adrian(a)lisas.de> - 0.13.1-2
- added patches from Thomas Jansen to run mpd by default
not as root.root but as mpd.mpd
* Mon Feb 11 2008 Adrian Reber <adrian(a)lisas.de> - 0.13.1-1
- updated to 0.13.1
* Thu Nov 15 2007 Adrian Reber <adrian(a)lisas.de> - 0.13.0-4
- another rebuilt for faad2
* Fri Nov 09 2007 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 0.13.0-3
- rebuild after faad2 downgrade to fix undefined symbols
* Sat Oct 13 2007 Adrian Reber <adrian(a)lisas.de> - 0.13.0-2
- rebuilt for rpmfusion
- updated License
* Sun Jul 29 2007 Adrian Reber <adrian(a)lisas.de> - 0.13.0-1
- update to 0.13.0
- added dwmw2's patches (#1569)
- fixed rpmlint errors and warnings
- added libsamplerate-devel, avahi-devel and
jack-audio-connection-kit-devel as BR
* Tue Mar 06 2007 Adrian Reber <adrian(a)lisas.de> - 0.12.1-3
- added flac-1.1.4 patch
* Sat Mar 03 2007 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 0.12.1-2
- Rebuild
* Mon Nov 27 2006 Adrian Reber <adrian(a)lisas.de> - 0.12.1-1
- updated to 0.12.1
- added missing Requires
- removed deletion of user mpd during %%preun
- removed -m (create home) from useradd
* Wed Oct 11 2006 Adrian Reber <adrian(a)lisas.de> - 0.11.6-6
- rebuilt
* Tue Mar 21 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- Add missing BR zlib-devel
* Thu Mar 09 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- switch to new release field
* Mon Mar 06 2006 Thorsten Leemhuis <fedora[AT]livna.org>
- no build time defines anymore so adapt spec completely to livna
* Tue Feb 28 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- add dist
* Sun Nov 28 2004 Aurelien Bompard <gauret[AT]free.fr> 0:0.11.5-0.3
- Apply Adrian Reber's patch to use a system-wide daemon, see bug 2234
* Tue Nov 09 2004 Aurelien Bompard <gauret[AT]free.fr> 0:0.11.5-0.2
- Prepare for FC3 (different BuildRequires)
* Fri Nov 05 2004 Aurelien Bompard <gauret[AT]free.fr> 0:0.11.5-0.fdr.1
- Initial Fedora package (from Mandrake)
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/mpd/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 22 Jul 2008 16:53:40 -0000 1.1
+++ .cvsignore 25 Jul 2008 20:18:51 -0000 1.2
@@ -0,0 +1 @@
+mpd-0.13.2.tar.gz
Index: sources
===================================================================
RCS file: /cvs/free/rpms/mpd/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 22 Jul 2008 16:53:40 -0000 1.1
+++ sources 25 Jul 2008 20:18:51 -0000 1.2
@@ -0,0 +1 @@
+33d0c7b08e2c9e2a6ad55703cb0d18d0 mpd-0.13.2.tar.gz
16 years, 4 months
rpms/amrwb/F-8 amrwb.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
by jwrdegoede
Author: jwrdegoede
Update of /cvs/nonfree/rpms/amrwb/F-8
In directory se02.es.rpmfusion.net:/tmp/cvs-serv24994
Modified Files:
.cvsignore sources
Added Files:
amrwb.spec
Log Message:
* Fri Jul 25 2008 Hans de Goede <j.w.r.degoede(a)hhs.nl> 7.0.0.3-3
- Release bump for rpmfusion
--- NEW FILE amrwb.spec ---
Name: amrwb
Version: 7.0.0.3
Release: 3%{?dist}
Summary: Adaptive Multi-Rate - Wideband (AMR-WB) Speech Codec
Group: System Environment/Libraries
License: Distributable
URL: http://www.penguin.cz/~utx/amr
Source0: http://ftp.penguin.cz/pub/users/utx/amr/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: wget unzip
%description
Adaptive Multi-Rate Wideband decoder and encoder library.
(3GPP TS 26.204 V7.0.0)
http://www.3gpp.org/ftp/Specs/html-info/26204.htm
%package tools
Group: Applications/Multimedia
Summary: Adaptive Multi-Rate - Wideband (AMR-WB) Speech Codec tools
Requires: %{name} = %{version}-%{release}
%description tools
Adaptive Multi-Rate Wideband decoding and encoding tools.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q
%build
%configure --disable-static
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr (-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README TODO readme.txt
%{_libdir}/*.so.*
%files tools
%defattr (-,root,root,-)
%{_bindir}/*
%files devel
%defattr (-,root,root,-)
%{_includedir}/amrwb
%{_libdir}/*.so
%changelog
* Fri Jul 25 2008 Hans de Goede <j.w.r.degoede(a)hhs.nl> 7.0.0.3-3
- Release bump for rpmfusion
* Thu Jun 12 2008 Hans de Goede <j.w.r.degoede(a)hhs.nl> 7.0.0.3-2
- Fix rpath on x86_64
- Put tools in a seperate -tools package
* Thu Jun 12 2008 Hans de Goede <j.w.r.degoede(a)hhs.nl> 7.0.0.3-1
- Initial rpmfusion package based on upstream specfile
Index: .cvsignore
===================================================================
RCS file: /cvs/nonfree/rpms/amrwb/F-8/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 22 Jul 2008 16:39:10 -0000 1.1
+++ .cvsignore 25 Jul 2008 20:06:04 -0000 1.2
@@ -0,0 +1 @@
+amrwb-7.0.0.3.tar.bz2
Index: sources
===================================================================
RCS file: /cvs/nonfree/rpms/amrwb/F-8/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 22 Jul 2008 16:39:10 -0000 1.1
+++ sources 25 Jul 2008 20:06:04 -0000 1.2
@@ -0,0 +1 @@
+5ffbc49146b0bb09b5d7f0ec68de1fe7 amrwb-7.0.0.3.tar.bz2
16 years, 4 months
rpms/amrwb/F-9 amrwb.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
by jwrdegoede
Author: jwrdegoede
Update of /cvs/nonfree/rpms/amrwb/F-9
In directory se02.es.rpmfusion.net:/tmp/cvs-serv24897
Modified Files:
.cvsignore sources
Added Files:
amrwb.spec
Log Message:
* Fri Jul 25 2008 Hans de Goede <j.w.r.degoede(a)hhs.nl> 7.0.0.3-3
- Release bump for rpmfusion
--- NEW FILE amrwb.spec ---
Name: amrwb
Version: 7.0.0.3
Release: 3%{?dist}
Summary: Adaptive Multi-Rate - Wideband (AMR-WB) Speech Codec
Group: System Environment/Libraries
License: Distributable
URL: http://www.penguin.cz/~utx/amr
Source0: http://ftp.penguin.cz/pub/users/utx/amr/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: wget unzip
%description
Adaptive Multi-Rate Wideband decoder and encoder library.
(3GPP TS 26.204 V7.0.0)
http://www.3gpp.org/ftp/Specs/html-info/26204.htm
%package tools
Group: Applications/Multimedia
Summary: Adaptive Multi-Rate - Wideband (AMR-WB) Speech Codec tools
Requires: %{name} = %{version}-%{release}
%description tools
Adaptive Multi-Rate Wideband decoding and encoding tools.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q
%build
%configure --disable-static
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr (-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README TODO readme.txt
%{_libdir}/*.so.*
%files tools
%defattr (-,root,root,-)
%{_bindir}/*
%files devel
%defattr (-,root,root,-)
%{_includedir}/amrwb
%{_libdir}/*.so
%changelog
* Fri Jul 25 2008 Hans de Goede <j.w.r.degoede(a)hhs.nl> 7.0.0.3-3
- Release bump for rpmfusion
* Thu Jun 12 2008 Hans de Goede <j.w.r.degoede(a)hhs.nl> 7.0.0.3-2
- Fix rpath on x86_64
- Put tools in a seperate -tools package
* Thu Jun 12 2008 Hans de Goede <j.w.r.degoede(a)hhs.nl> 7.0.0.3-1
- Initial rpmfusion package based on upstream specfile
Index: .cvsignore
===================================================================
RCS file: /cvs/nonfree/rpms/amrwb/F-9/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 22 Jul 2008 16:39:10 -0000 1.1
+++ .cvsignore 25 Jul 2008 20:05:38 -0000 1.2
@@ -0,0 +1 @@
+amrwb-7.0.0.3.tar.bz2
Index: sources
===================================================================
RCS file: /cvs/nonfree/rpms/amrwb/F-9/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 22 Jul 2008 16:39:10 -0000 1.1
+++ sources 25 Jul 2008 20:05:38 -0000 1.2
@@ -0,0 +1 @@
+5ffbc49146b0bb09b5d7f0ec68de1fe7 amrwb-7.0.0.3.tar.bz2
16 years, 4 months
rpms/amrwb/devel amrwb.spec,1.1,1.2
by jwrdegoede
Author: jwrdegoede
Update of /cvs/nonfree/rpms/amrwb/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv24801
Modified Files:
amrwb.spec
Log Message:
* Fri Jul 25 2008 Hans de Goede <j.w.r.degoede(a)hhs.nl> 7.0.0.3-3
- Release bump for rpmfusion
Index: amrwb.spec
===================================================================
RCS file: /cvs/nonfree/rpms/amrwb/devel/amrwb.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- amrwb.spec 25 Jul 2008 20:04:09 -0000 1.1
+++ amrwb.spec 25 Jul 2008 20:05:12 -0000 1.2
@@ -1,6 +1,6 @@
Name: amrwb
Version: 7.0.0.3
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Adaptive Multi-Rate - Wideband (AMR-WB) Speech Codec
Group: System Environment/Libraries
License: Distributable
@@ -77,6 +77,9 @@
%changelog
+* Fri Jul 25 2008 Hans de Goede <j.w.r.degoede(a)hhs.nl> 7.0.0.3-3
+- Release bump for rpmfusion
+
* Thu Jun 12 2008 Hans de Goede <j.w.r.degoede(a)hhs.nl> 7.0.0.3-2
- Fix rpath on x86_64
- Put tools in a seperate -tools package
16 years, 4 months