ladspa/ladspa.spec
Takashi Iwai 72fab9c9b0 Accepting request 209420 from home:tiwai:branches:multimedia:libs
- Merge ladspa-devel.spec into ladspa.spec; back to root, as OBS
  doesn't like split packages (the submitreq always declined),
  and the development activity of this package is pretty low, so
  no worth to resist

OBS-URL: https://build.opensuse.org/request/show/209420
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ladspa?expand=0&rev=30
2013-12-11 10:51:06 +00:00

451 lines
13 KiB
RPMSpec

#
# spec file for package ladspa
#
# Copyright (c) 2013 SUSE LINUX Products 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 http://bugs.opensuse.org/
#
Name: ladspa
BuildRequires: fdupes
BuildRequires: fftw3-devel
BuildRequires: flac-devel
BuildRequires: gcc-c++
BuildRequires: ladspa-devel
BuildRequires: libsndfile-devel
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: xorg-x11-util-devel
%define AMB_version 0.6.1
%define FIL_version 0.3.0
%define MCP_version 0.4.0
%define REV_version 0.3.1
%define VCO_version 0.3.0
%define alienwah_version 1.13
%define blepvco_version 0.1.0
%define blop_version 0.2.8
%define caps_version 0.4.4
%define pvoc_version 0.1.12
%define sooperlooper_version 0.93
%define swh_version 0.4.15
%define tap_version 0.7.1
%define vcf_version 0.0.5
%define vlevel_version 0.5
%define vocoder_version 0.3
Summary: The Linux Audio Developer's Simple Plug-In API
License: LGPL-2.1+
Group: Productivity/Multimedia/Sound/Utilities
Version: 1.13
Release: 0
AutoReq: on
Autoprov: off
Provides: ladspa > 1.12.code10.3.1
Provides: ladspa-AMB = %{AMB_version}
Provides: ladspa-FIL = %{FIL_version}
Provides: ladspa-MCP = %{MCP_version}
Provides: ladspa-REV = %{REV_version}
Provides: ladspa-VCO = %{VCO_version}
Provides: ladspa-alienwah = %{alienwah_version}
Provides: ladspa-blop = %{blop_version}
Provides: ladspa-caps = %{caps_version}
Provides: ladspa-pvoc = %{pvoc_version}
Provides: ladspa-swh-plugins = %{swh_version}
Provides: ladspa-tap-plugins = %{tap_version}
Provides: ladspa-vcf = %{vcf_version}
Provides: ladspa-vlevel = %{vlevel_version}
Provides: ladspa-vocoder = %{vocoder_version}
Obsoletes: ladspa-AMB < %{AMB_version}
Obsoletes: ladspa-FIL < %{FIL_version}
Obsoletes: ladspa-MCP < %{MCP_version}
Obsoletes: ladspa-REV < %{REV_version}
Obsoletes: ladspa-VCO < %{VCO_version}
Obsoletes: ladspa-alienwah < %{alienwah_version}
Obsoletes: ladspa-blop < %{blop_version}
Obsoletes: ladspa-caps < %{caps_version}
Obsoletes: ladspa-pvoc < %{pvoc_version}
Obsoletes: ladspa-swh-plugins < %{swh_version}
Obsoletes: ladspa-tap-plugins < %{tap_version}
Obsoletes: ladspa-vcf < %{vcf_version}
Obsoletes: ladspa-vlevel < %{vlevel_version}
Obsoletes: ladspa-vocoder < %{vocoder_version}
Source1: ladspa_sdk_1.13.tar.bz2
Source2: cmt_src_1.15.tar.bz2
Source3: swh-plugins-%{swh_version}.tar.bz2
Source4: ladspa-swh.tex
Source5: ladspa-swh.pdf
Source6: vocoder-ladspa-%{vocoder_version}.tar.bz2
Source7: alienwah-%{alienwah_version}.tar.bz2
Source8: sooperlooper-%{sooperlooper_version}.tar.bz2
Source9: blop-%{blop_version}.tar.bz2
Source10: vcf-%{vcf_version}.tar.bz2
Source11: unmatched.tar.bz2
Source12: preamp-v2.tar.bz2
Source13: MCP-plugins-%{MCP_version}.tar.bz2
Source14: REV-plugins-%{REV_version}.tar.bz2
Source15: vlevel-%{vlevel_version}.tar.bz2
Source16: VCO-plugins-%{VCO_version}.tar.bz2
Source17: matched.tar.bz2
Source18: tap-plugins-%{tap_version}.tar.bz2
Source19: super-60.tar.bz2
Source20: caps_%{caps_version}.tar.bz2
Source21: FIL-plugins-%{FIL_version}.tar.bz2
Source22: pvoc_%{pvoc_version}.tar.bz2
Source23: blepvco-%{blepvco_version}.tar.bz2
Source24: AMB-plugins-%{AMB_version}.tar.bz2
Source30: cmt.rdf
Source50: README_VCF
Patch: ladspa.dif
Patch1: swh-uninit-variable.diff
Patch2: cmt_src_1.15.diff
Patch3: vocoder-0.1.dif
Patch4: sooperlooper-0.9.dif
Patch5: blop-automake-fix.dif
Patch6: blop-shlib.diff
Patch7: vcf-Makefile.dif
Patch8: alienwah.dif
Patch9: unmatched.dif
Patch10: preamp.dif
Patch13: tap-type-punning-fix.dif
Patch14: super-60-fix.dif
Patch15: swh-readonly.dif
Patch16: pvoc-compile-fix.dif
Patch17: swh-0.4.13-gcc4-fix.diff
Patch18: sooperlooper-0.93-gcc4-fix.diff
Patch20: swh-libblo.dif
# swh-configure.patch changes for >= autoconf-2.65 in openSUSE 11.3
%if 0%{?suse_version} <= 1120
Patch21: swh-configure.patch
%else
Patch21: swh-configure-2.65.patch
%endif
Patch22: alienwah-compile-fix.diff
Patch23: alienwah-float_complex.diff
Patch25: pvoc-0.1.10-depend-copts-fix.diff
Patch26: swh-nostatic-lib.diff
Patch27: blop-ladspa_dir.diff
Patch28: blop-wdautil-fix.diff
Patch29: caps-fix-double-free.diff
Url: http://www.ladspa.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The Linux Audio Developer's Simple Plug-in API (LADSPA) provides the
ability to write simple plug-in audio processors in C/C++ and link them
dynamically. The package contains the LADSPA SDK, the CMT plug-in
libraries (including Freeverb), and the swh plug-ins.
%package devel
Summary: Include Files mandatory for Development
Group: Development/Libraries/C and C++
BuildArch: noarch
Provides: ladspa-devel > 1.12.code10.3.1
%description devel
This package contains include files to develop LADSPA plugins.
%prep
#
# More URLs
#
# Blop: http://blop.sourceforge.net/
# MCP, REV, VCO, FIL, AMB-plugins:
# http://users.skynet.be/solaris/linuxaudio/
# swh-plugins: http://plugin.org.uk/
# TAP-plugins URL: http://tap-plugins.sourceforge.net/
# vlevel: http://vlevel.sourceforge.net/about/
# sooperlooper: http://essej.net/sooperlooper/
# alienwah: http://plugin.org.uk/releases/alienwah/
# pvoc, caps, preamp, match, unmatched, super-60:
# http://quitte.de/dsp/
# blepvco: http://home.jps.net/~musound/
#
%setup -q -c -n ladspa -T -a 1 -a 2 -a 3 -a 6 -a 7 -a 8 -a 9 -a 10 -a 11 -a 12 -a 13 -a 14 -a 15 -a 16 -a 17 -a 18 -a 19 -a 20 -a 21 -a 22 -a 23 -a 24
%patch
(cd swh-plugins-%{swh_version}
%patch1
%patch15
%patch17
%patch26 -p1
%patch20 -p1
touch config.rpath
./autogen.sh --prefix=%{_prefix}
%if 0%{?suse_version} <= 1210
%patch21 -p 1
%endif
)
(cd cmt
%patch2
)
(cd vocoder-%{vocoder_version}
%patch3
)
(cd sooperlooper-%{sooperlooper_version}
%patch4
%patch18
)
(cd blop-%{blop_version}
%patch5
%patch6
%patch27
%patch28
)
(cd vcf-%{vcf_version}
%patch7
)
(cd alienwah-%{alienwah_version}
%patch8
%patch22
%patch23
)
(cd unmatched
%patch9
)
(cd matched
# the same one with unmatched
%patch9
)
(cd preamp
%patch10
)
(cd tap-plugins-%{tap_version}
%patch13
)
(cd super-60
%patch14
)
(cd pvoc-%{pvoc_version}
%patch16
%patch25
)
(cd caps-%{caps_version}
%patch29 -p1
)
%build
# This package failed when testing with -Wl,-as-needed being default.
# So we disable it here, if you want to retest, just delete this comment and the line below.
export SUSE_ASNEEDED=0
# LADSPA SDK
cd ladspa_sdk/src
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb" targets
cd ../..
# CMT
cd cmt/src
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fPIC -ggdb" targets
cd ../..
# SWH plugins
cd swh-plugins-%{swh_version}
autoreconf --install --force
#./autogen.sh --prefix=%{_prefix} --libdir=%{_libdir}
CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb -DPIC -fno-strict-aliasing" \
./configure --prefix=%{_prefix}
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb -DPIC -fno-strict-aliasing"
cd ..
# Vocoder
cd vocoder-%{vocoder_version}
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb"
cd ..
# Alien Wah
cd alienwah-%{alienwah_version}
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb"
cd ..
# Sooperlooper
cd sooperlooper-%{sooperlooper_version}
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb"
cd ..
# Blop
cd blop-%{blop_version}
autoreconf --install --force
./configure --prefix=%{_prefix} \
--with-ladspa-plugin-dir=%{_libdir}/ladspa
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -DNO_DEBUG -DPIC -fPIC -ggdb"
cd ..
# VCF
cd vcf-%{vcf_version}
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb"
cd ..
# unmatched
cd unmatched
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb"
cd ..
# matched
cd matched
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb"
cd ..
# preamp
cd preamp
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb -fno-strict-aliasing" \
CXXFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb -fno-strict-aliasing"
cd ..
# MCP plugins
cd MCP-plugins-%{MCP_version}
make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb"
cd ..
# REV plugins
cd REV-plugins-%{REV_version}
make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb"
cd ..
# VCO plugins
cd VCO-plugins-%{VCO_version}
make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb"
cd ..
# vlevel
cd vlevel-%{vlevel_version}
make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb"
cd ..
# tap-plugins
cd tap-plugins-%{tap_version}
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb -c"
cd ..
# super-60
cd super-60
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -ggdb -fPIC"
cd ..
# caps
cd caps-%{caps_version}
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -ggdb -fPIC"
cd ..
# FIL plugins
cd FIL-plugins-%{FIL_version}
make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS -ggdb -fPIC"
cd ..
# AMB plugins
cd AMB-plugins-%{AMB_version}
make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS -ggdb -fPIC"
cd ..
# pvoc plugins
cd pvoc-%{pvoc_version}
make %{?_smp_mflags} OPTS="$RPM_OPT_FLAGS -ggdb -fPIC"
cd ..
# blepvco
cd blepvco-%{blepvco_version}
make %{?_smp_mflags} CPPFLAGS="$RPM_OPT_FLAGS -ggdb -fPIC"
cd ..
%install
# LADSPA SDK
cd ladspa_sdk/src
make INSTALL_PLUGINS_DIR="$RPM_BUILD_ROOT"%{_libdir}/ladspa \
INSTALL_INCLUDE_DIR="$RPM_BUILD_ROOT"%{_includedir} \
INSTALL_BINARY_DIR="$RPM_BUILD_ROOT"%{_bindir} install
cd ../..
# CMT
cd cmt/src
make INSTALL_PLUGINS_DIR="$RPM_BUILD_ROOT"%{_libdir}/ladspa install
cd ../..
# SWH plugins
cd swh-plugins-%{swh_version}
make DESTDIR="$RPM_BUILD_ROOT" plugindir=%{_libdir}/ladspa \
INCLUDES=-I../ladspa_sdk/src install
cd ..
# Blop
cd blop-%{blop_version}
make DESTDIR="$RPM_BUILD_ROOT" install
cd ..
# Others
for i in \
vocoder-%{vocoder_version} \
alienwah-%{alienwah_version} \
sooperlooper-%{sooperlooper_version} \
vcf-%{vcf_version} \
unmatched \
matched \
preamp \
MCP-plugins-%{MCP_version} \
REV-plugins-%{REV_version} \
VCO-plugins-%{VCO_version} \
vlevel-%{vlevel_version} \
tap-plugins-%{tap_version} \
super-60 \
caps-%{caps_version} \
FIL-plugins-%{FIL_version} \
AMB-plugins-%{AMB_version} \
pvoc-%{pvoc_version} \
blepvco-%{blepvco_version}
do
install -c $i/*.so "$RPM_BUILD_ROOT"%{_libdir}/ladspa
done
# install other binary execs
mkdir -p "$RPM_BUILD_ROOT"%{_bindir}
install -c -m 755 vlevel-%{vlevel_version}/vlevel-bin "$RPM_BUILD_ROOT"%{_bindir}
# additional RDF files
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ladspa/rdf
cp -p %{SOURCE30} $RPM_BUILD_ROOT%{_datadir}/ladspa/rdf
cp tap-plugins-%{tap_version}/*.rdf $RPM_BUILD_ROOT%{_datadir}/ladspa/rdf
# install documents
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}/{cmt,swh,vcf}
cp -av cmt/README $RPM_BUILD_ROOT%{_docdir}/%{name}/cmt
cp -av cmt/doc/* $RPM_BUILD_ROOT%{_docdir}/%{name}/cmt
for i in \
swh-plugins-%{swh_version} \
vocoder-%{vocoder_version} \
alienwah-%{alienwah_version} \
sooperlooper-%{sooperlooper_version} \
blop-%{blop_version} \
MCP-plugins-%{MCP_version} \
REV-plugins-%{REV_version} \
VCO-plugins-%{VCO_version} \
vlevel-%{vlevel_version} \
preamp \
tap-plugins-%{tap_version} \
super-60 \
caps-%{caps_version} \
FIL-plugins-%{FIL_version} \
AMB-plugins-%{AMB_version} \
pvoc-%{pvoc_version} \
blepvco-%{blepvco_version}
do
# !! bashism...
cd $i
d=${i%-*}
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}/$d
for f in AUTHORS README COPYRIGHT CREDITS COPYING NEWS THANKS TODO ChangeLog PARAMETERS *.html; do
test -f $f && cp -a $f $RPM_BUILD_ROOT%{_docdir}/%{name}/$d
done
cd ..
done
# extra document files
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}/swh/gsm
cp -av swh-plugins-%{swh_version}/gsm/README $RPM_BUILD_ROOT%{_docdir}/%{name}/swh/gsm
cp %{SOURCE4} %{SOURCE5} $RPM_BUILD_ROOT%{_docdir}/%{name}/swh
cp %{SOURCE50} $RPM_BUILD_ROOT%{_docdir}/%{name}/vcf
cp -av vlevel-%{vlevel_version}/docs $RPM_BUILD_ROOT%{_docdir}/%{name}/vlevel
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}/examples/vlevel
cp -av vlevel-%{vlevel_version}/utils/* $RPM_BUILD_ROOT%{_docdir}/%{name}/examples/vlevel
chmod 644 $RPM_BUILD_ROOT%{_docdir}/%{name}/cmt/plugins.html
# devel package
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-devel
cp -av ladspa_sdk/README $RPM_BUILD_ROOT%{_docdir}/%{name}-devel
cp -av ladspa_sdk/doc/* $RPM_BUILD_ROOT%{_docdir}/%{name}-devel
ln -sf %{_includedir}/ladspa.h $RPM_BUILD_ROOT%{_docdir}/%{name}-devel/ladspa.h.txt
#
%find_lang %{name} --all-name
%fdupes -s $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %{name}.lang
%defattr(-,root,root)
%doc %{_docdir}/%{name}
%{_libdir}/ladspa
%{_bindir}/*
%{_datadir}/ladspa
%files devel
%defattr(-,root,root)
%doc %{_docdir}/%{name}-devel
%{_includedir}/*
%changelog