[3e0d7c]: kwave.spec.in Maximize Restore History

Download this file

kwave.spec.in    293 lines (262 with data), 8.5 kB

#############################################################################
##    Kwave                - kwave.spec
##                           -------------------
##    begin                : Sun Feb 03 2008
##    copyright            : (C) 2008 by Thomas Eschenbacher
##    email                : Thomas.Eschenbacher@gmx.de
#############################################################################
#
#############################################################################
##                                                                          #
##    This program is free software; you can redistribute it and/or modify  #
##    it under the terms of the GNU General Public License as published by  #
##    the Free Software Foundation; either version 2 of the License, or     #
##    (at your option) any later version.                                   #
##                                                                          #
#############################################################################

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

%define ver @RPM_SHORT_VERSION@
%define release @RPM_RELEASE@

Summary:        @RPM_SUMMARY@

Name:           @RPM_NAME@
Version:        @RPM_SHORT_VERSION@
Release:        @RPM_RELEASE@
License:        @RPM_COPYRIGHT@
Source0:        kwave-%{version}-1.tar.bz2
Group:          Productivity/Multimedia/Sound/Editors and Convertors
Url:            @RPM_URL@
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# hack for SLE
%ifarch i586
BuildArch:      i586
%endif
%ifarch x86_64
BuildArch:      x86_64
%endif

# common for all distributions
Requires:       audiofile >= 0.3.0
Requires:       libvorbisenc.so.2 >= 2.0.0
Requires:       libogg.so.0 >= 0.4.0
Requires:       flac
Requires:       libvorbis >= 1
Requires:       libsamplerate >= 0.1.3
Requires:       %{name}-lang = %{version}
BuildRequires:  cmake >= 2.6.0
BuildRequires:  gettext-devel
BuildRequires:  ImageMagick
BuildRequires:  sed

# SuSE specific:
%if %{defined suse_version}
Prefix:         /usr
Requires:       %kde4_runtime_requires
Requires:       alsa
Requires:       fftw3 >= 3.0
Requires:       libqt4 >= 4.2
Requires:       pulseaudio >= 0.9.16
BuildRequires:  fdupes
BuildRequires:  audiofile-devel >= 0.3.0
BuildRequires:  libqt4-devel > 4.5
BuildRequires:  libkde4-devel >= 4.0
BuildRequires:  alsa-devel
BuildRequires:  flac-devel
BuildRequires:  fftw3-devel >= 3.0
BuildRequires:  kde4-l10n-devel
BuildRequires:  kdemultimedia4
BuildRequires:  awk
BuildRequires:  libogg-devel >= 1
BuildRequires:  libvorbis-devel
BuildRequires:  pulseaudio-devel
BuildRequires:  libsamplerate-devel
BuildRequires:  update-desktop-files

%if 0%{?suse_version} <= 1140
# hack for converting svg to png, with broken ImageMagick
BuildRequires:  librsvg
BuildRequires:  rsvg-view
BuildRequires:  python
%endif

%define EXTRA_OPTS ""
%define FDUPES %fdupes -s %{buildroot}
%endif

# CentOS specific:
%if %{defined centos_version}
Prefix:         /usr
Requires:       kdelibs >= 4.0
Requires:       alsa-lib
Requires:       fftw3 >= 3.0
BuildRequires:  audiofile-devel >= 0.3.0
BuildRequires:  alsa-lib-devel
BuildRequires:  libogg-devel >= 1
BuildRequires:  libvorbis-devel
BuildRequires:  libsamplerate-devel
BuildRequires:  fftw3-devel >= 3.0
BuildRequires:  flac-devel
BuildRequires:  gcc-c++
BuildRequires:  kdesdk >= 4.0
BuildRequires:  kdemultimedia-devel >= 4.0
BuildRequires:  gawk
BuildRequires:  pulseaudio-libs-devel
%define EXTRA_OPTS ""
%define _kde4_applicationsdir /usr/share/applications/kde4/
%define _kde4_modulesdir %{_kde4_libdir}/kde4/plugins
%define _kde4_htmldir /usr/share/doc/HTML/
%endif

# Fedora specific:
%if %{defined fedora}
Prefix:         /usr
Requires:       qt4 >= 4.5
Requires:       qt4-x11 >= 4.5
Requires:       kdelibs >= 4.0
Requires:       alsa-lib
Requires:       fftw3 >= 3.0
Requires:       pulseaudio >= 0.9.16
BuildRequires:  fdupes
BuildRequires:  audiofile-devel >= 0.3.0
BuildRequires:  alsa-lib-devel
BuildRequires:  fftw3-devel >= 3.0
BuildRequires:  flac-devel
BuildRequires:  libogg-devel >= 1
BuildRequires:  libsamplerate-devel
BuildRequires:  libvorbis-devel
BuildRequires:  gcc-c++
BuildRequires:  qt4-devel >= 4.5.0
BuildRequires:  kdesdk-utils >= 4.0
BuildRequires:  kdelibs-devel >= 4.0
BuildRequires:  kdemultimedia-devel >= 4.0
BuildRequires:  gawk
BuildRequires:  pulseaudio-libs-devel >= 0.9.16
%define EXTRA_OPTS ""
%define FDUPES fdupes -s %{buildroot}
%define _kde4_applicationsdir /usr/share/applications/kde4/
%define _kde4_modulesdir %{_kde4_libdir}/kde4/plugins
%define _kde4_htmldir /usr/share/doc/HTML/
%endif

# RedHat specific:
%if %{defined rhel_version}
Requires:       qt4 >= 4.5
Requires:       qt4-x11 >= 4.5
Requires:       kdelibs >= 4.0
Requires:       alsa-lib
Requires:       fftw3 >= 3.0
Requires:       flac
Requires:       pulseaudio >= 0.9.16
Requires:       pulseaudio-libs >= 0.9.16
BuildRequires:  libogg >= 1
BuildRequires:  libvorbis
BuildRequires:  libsamplerate-devel >= 0.1.3
BuildRequires:  audiofile-devel >= 0.3.0
BuildRequires:  alsa-lib-devel
BuildRequires:  fftw
BuildRequires:  flac
BuildRequires:  gcc-c++
BuildRequires:  qt-devel >= 4.5
BuildRequires:  kdelibs-devel >= 4.0
BuildRequires:  pulseaudio-libs-devel
%define EXTRA_OPTS ""
%endif

# Mandriva specific:
%if %{defined mandriva_version}
Prefix:         /usr
Requires:       kdelibs4 >= 4.0
Requires:       kdemultimedia4 >= 4.0
Requires:       alsa-lib
Requires:       fftw3 >= 3.0
Requires:       id3lib >= 3.8.1
BuildRequires:  audiofile-devel >= 0.3.0
BuildRequires:  libmad >= 0.14
BuildRequires:  libsamplerate-devel
BuildRequires:  alsa-lib-devel
BuildRequires:  libogg-devel >= 1
BuildRequires:  libvorbis-devel
BuildRequires:  libflac++-devel
BuildRequires:  gcc-c++
BuildRequires:  kdesdk4-po2xml
BuildRequires:  kdelibs4-devel
BuildRequires:  kdemultimedia4-devel
BuildRequires:  fftw3-devel >= 3.0
BuildRequires:  gawk
BuildRequires:  libmad-devel >= 0.14
BuildRequires:  id3lib-devel >= 3.8.1
BuildRequires:  kde-l10n-cs >= 4.0
BuildRequires:  kde-l10n-de >= 4.0
BuildRequires:  kde-l10n-fr >= 4.0
BuildRequires:  aspell-cs
BuildRequires:  aspell-de
BuildRequires:  aspell-fr
BuildRequires:  pulseaudio-devel >= 0.9.16
%define _kde4_bindir /usr/bin
%define _kde4_libdir /usr/lib*
%define _kde4_appsdir /usr/share/apps
%define _kde4_iconsdir /usr/share/icons
%define _kde4_applicationsdir /usr/share/applications/kde4
%define _kde4_modulesdir %{_kde4_libdir}/kde4/plugins
%define _kde4_htmldir /usr/share/doc/HTML

# Mandriva has paid for using patented MP3 code and therefore are
# allowed to ship with MP3 support
%define MP3ENABLED "-DWITH_MP3=ON"
%define EXTRA_OPTS ""
%else
# all other distributions are not allowed to ship with MP3 support,
# at least not in the USA
%define MP3ENABLED "-DWITH_MP3=OFF"
%endif

%description
With Kwave you can edit many sorts of audio files
including multi-channel files. You are able to
alter and play back each channel on its own.
Kwave also includes many plugins (most are
still under development) to transform
audio data in several ways and presents a
graphical view with a complete zoom-and scroll capability.

%package doc
Summary:        HTML Online Documentation of Kwave
Group:          Documentation/HTML
BuildArch:      noarch

%description doc
This package contains the HTML online documentation for Kwave

%package lang
Summary:        Languages for package Kwave
Group:          System/Localization
BuildArch:      noarch

%description lang
Provides translations to the package Kwave

%prep
%setup -q

%build
unset DESTDIR
mkdir build
cd build
CXXFLAGS="${CXXFLAGS} ${RPM_OPT_FLAGS}" CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}" \
    cmake ${CONFIGURE_OPTS} %{MP3ENABLED} %{EXTRA_OPTS} ..
cd -

make -C build %{?jobs:-j %jobs}

%install
make -C build DESTDIR="$RPM_BUILD_ROOT" SUID_ROOT="" install
%if %{defined FDUPES}
    %{FDUPES}
%endif
%find_lang kwave %{name}.lang

%files
%defattr(-,root,root)
%doc GNU-LICENSE AUTHORS LICENSES CHANGES README TODO kwave.lsm
%{_kde4_bindir}/%name
%{_kde4_applicationsdir}/%{name}.desktop
%{_kde4_libdir}/libkwave*
%{_kde4_appsdir}/%{name}
%{_kde4_modulesdir}/*
%{_kde4_iconsdir}/*
%exclude %{_kde4_htmldir}/*/%{name}

%files doc
%defattr(-,root,root,-)
%doc %{_kde4_htmldir}/*/%{name}

%files lang -f %{name}.lang
%defattr(-,root,root,-)
%exclude %{_kde4_htmldir}/*/%{name}

%clean
rm -Rf "$RPM_BUILD_ROOT"

%post
ldconfig

%postun
ldconfig

%changelog