File moc.spec of Package moc

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

# Please submit bugfixes or comments via

%bcond_with ffmpeg
%bcond_with mad

Name:           moc
Version:        2.5.0
Release:        0
Summary:        Console audio player
License:        GPL-2.0+
Group:          Productivity/Multimedia/Sound/Players
Source2:        moc.keyring
Patch0:         moc-2.5.0-underlinking.patch
BuildRequires:  file-devel
BuildRequires:  libdb-4_8-devel
BuildRequires:  libmpcdec-devel
BuildRequires:  libsidplay1-devel
BuildRequires:  libtimidity-devel
BuildRequires:  libtool
BuildRequires:  ncurses-devel
BuildRequires:  pkg-config
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(flac)
BuildRequires:  pkgconfig(jack)
BuildRequires:  pkgconfig(libcurl)
BuildRequires:  pkgconfig(libmodplug)
BuildRequires:  pkgconfig(samplerate)
BuildRequires:  pkgconfig(sndfile)
BuildRequires:  pkgconfig(speex)
BuildRequires:  pkgconfig(taglib_c)
BuildRequires:  pkgconfig(vorbisfile)
BuildRequires:  pkgconfig(wavpack)
%if %{with ffmpeg}
BuildRequires:  libffmpeg1-devel
%if %{with mad}
BuildRequires:  librcc-devel
BuildRequires:  pkgconfig(id3tag)
BuildRequires:  pkgconfig(mad)

MOC (music on console) is a console audio player for LINUX/UNIX designed to be
powerful and easy to use.
You just need to select a file from some directory using the menu similar to
Midnight Commander, and MOC will start playing all files in this directory
beginning from the chosen file. There is no need to create play lists like in
other players.
If you want to combine some files from one or few directories on one play list,
you can do this. The play list will be remembered between runs or you can save
it as an m3u file to load it whenever you want.
Need the console where MOC is running for more important things? Need to close
the X terminal emulator? You don't have to stop playing - just press q and the
interface will be detached leaving the server running. You can attach it later,
or you can attach one interface in the console, and another in the X terminal
emulator, no need to switch just to play another file.
MOC plays smoothly, regardless of system or I/O load because it uses the output
buffer in a separate thread. It doesn't cause gaps between files, because the
next file to be played is precached while playing the current file.

Internet stream (Icecast, Shoutcast) are supported.
Key mapping can be fully customized.
Supported file formats are: mp3, Ogg Vorbis, FLAC, Musepack, Speex, WAVE, AIFF,
AU (and other less popular formats supported by libsndfile. New formats support
is under development.

Other features:
  * Simple mixer.
  * Color themes.
  * Searching the menu (the play list or a directory) like M-s in Midnight Commander.
  * The way MOC creates titles from tags is configurable.
  * Optional character set conversion for file tags using iconv().
  * OSS, JACK, and ALSA output.

%setup -q
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
sed -i "s/\"__DATE__\"/\"\"$FAKE_BUILDDATE\"\"/" main.c
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M:%%S')
sed -i "s/(__TIME__)/(\"$FAKE_BUILDTIME\")/" main.c

%configure --disable-static
make %{?_smp_flags}

# Stupid libtool files
rm -rf %{buildroot}%{_libdir}/moc/decoder_plugins/*.la
# Someday people will honor docdir...
rm -rf %{buildroot}%{_datadir}/doc/moc/

%doc AUTHORS COPYING NEWS README TODO config.example keymap.example
%attr(0755,-,-) %{_bindir}/mocp

openSUSE Build Service is sponsored by