File LiVES.spec of Package LiVES

#
# spec file for package LiVES
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2010-2012 Pascal Bleser <pascal.bleser@opensuse.org>
# Copyright (c) 2007-2010 Andrea Florio <andrea@links2linux.de>
#
# 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/
#


%define soname  0
Name:           LiVES
Version:        2.8.9
Release:        0
Summary:        Video Editor and VJ Tool
License:        GPL-2.0+
Group:          Productivity/Multimedia/Video/Editors and Convertors
Url:            http://lives.sourceforge.net
Source0:        http://lives-video.com/releases/%{name}-%{version}.tar.bz2
Source99:       LiVES-rpmlintrc
Patch0:         LiVES-redefinition_of_typedef.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  bison
BuildRequires:  gcc-c++
BuildRequires:  perl
BuildRequires:  ImageMagick
BuildRequires:  ladspa-devel
BuildRequires:  libaal-devel
BuildRequires:  libtool
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(atk)
BuildRequires:  pkgconfig(dirac)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(frei0r)
BuildRequires:  pkgconfig(jack)
BuildRequires:  pkgconfig(libavc1394) >= 0.5.3
BuildRequires:  pkgconfig(libavcodec) = 56.60.100
BuildRequires:  pkgconfig(libavformat) = 56.40.101
BuildRequires:  pkgconfig(libavutil) = 54.31.100
BuildRequires:  pkgconfig(libdv)
BuildRequires:  pkgconfig(liboil-0.3)
BuildRequires:  pkgconfig(libpulse)
BuildRequires:  pkgconfig(libswscale) = 3.1.101
BuildRequires:  pkgconfig(libtirpc)
BuildRequires:  pkgconfig(libv4l1)
BuildRequires:  pkgconfig(libvisual-0.4)
BuildRequires:  pkgconfig(mjpegtools) >= 1.6.2
BuildRequires:  pkgconfig(ogg)
BuildRequires:  pkgconfig(pango)
BuildRequires:  pkgconfig(schroedinger-1.0)
BuildRequires:  pkgconfig(sdl)
BuildRequires:  pkgconfig(slang)
BuildRequires:  pkgconfig(theora)
BuildRequires:  pkgconfig(vorbis)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  hicolor-icon-theme
BuildRequires:  update-desktop-files
Requires:       MPlayer
Requires:       cdda2wav
Requires:       dvgrab
Requires:       ladspa
Recommends:     libvisual-plugins
Recommends:     %{name}-lang
Requires:       libweed%{soname} = %version-%release
Requires:       sox
Provides:       lives = %version-%release
ExclusiveArch:  %ix86 x86_64

%description
LiVES is aimed at the digital video artist who wants to create their own
content, the video editor who wants to produce professional looking video, and
the VJ who wants to captivate with spectacular images.

%package -n     libweed%{soname}
Summary:        Libweed library
Group:          Development/Libraries/C and C++

%description -n libweed%{soname}
LiVES is aimed at the digital video artist who wants to create their own
content, the video editor who wants to produce professional looking video, and
the VJ who wants to captivate with spectacular images.

%package -n     libweed-devel
Summary:        Libweed devel package
Group:          Development/Libraries/C and C++
Requires:       libweed%{soname} = %version-%release

%description -n libweed-devel
LiVES is aimed at the digital video artist who wants to create their own
content, the video editor who wants to produce professional looking video, and
the VJ who wants to captivate with spectacular images.

This package contains header files and libraries needed to develop
application that use libweed.

%package -n     libOSC%{soname}
Summary:        Libweed library
Group:          Development/Libraries/C and C++

%description -n libOSC%{soname}
LiVES is aimed at the digital video artist who wants to create their own
content, the video editor who wants to produce professional looking video, and
the VJ who wants to captivate with spectacular images.

This is NOT the full libOSC SDK, it is a highly hacked version for testing 
with LiVES.

Use of this hacked package is not recommended.

%package -n     libOSC-devel
Summary:        Libweed devel package
Group:          Development/Libraries/C and C++
Requires:       libOSC%{soname} = %version-%release

%description -n libOSC-devel
LiVES is aimed at the digital video artist who wants to create their own
content, the video editor who wants to produce professional looking video, and
the VJ who wants to captivate with spectacular images.

This package contains header files and libraries needed to develop
application that use libOSC.

%lang_package

%prep
%setup -q -n lives-%{version}

%build

# fix wrong EOL
sed -i 's/\r$//' weed-docs/*.txt

find . -type d -name .svn -exec rm -rfv '{}' +

pushd libweed
ln -s . weed
# Update the library paths in libweed/*.pc
find . -type f -name '*.pc' -exec sed -i 's/lib$/%{_lib}/' '{}' +
popd #libweed

export CFLAGS="%{optflags} -fno-strict-aliasing -I$PWD/libweed/"
export CPPFLAGS="$CFLAGS"
export CXXFLAGS="$CFLAGS"
%configure \
    --libdir="%{_libdir}" \
    --disable-doxygen

%make_build

%install
%make_install

find %{buildroot} \( -name \*.la -o -name \*.a \) -exec rm -fv '{}' +

rm -rf "%{buildroot}%{_datadir}/app-install"

for l in de_DE nl_NL; do
    sl="${l%%_*}"
    if [ -e "%{buildroot}%{_datadir}/locale/$sl" ]; then
        rm -rf "%{buildroot}%{_datadir}/locale/$l"
    else
        mv "%{buildroot}%{_datadir}/locale/$l" "%{buildroot}%{_datadir}/locale/$sl"
    fi
done

rm %{buildroot}/%{_bindir}/lives
ln -s %{_bindir}/lives-exe %{buildroot}/%{_bindir}/lives

find %{buildroot}%{_libdir} \
-name '*.txt' -type f -executable -exec chmod -v 644 '{}' +

%suse_update_desktop_file -r %{name} AudioVideo AudioVideoEditing
%find_lang lives

%post
%icon_theme_cache_post
%desktop_database_post

%postun
%icon_theme_cache_postun
%desktop_database_postun

%post   -n libweed%{soname} -p /sbin/ldconfig
%postun -n libweed%{soname} -p /sbin/ldconfig

%post   -n libOSC%{soname} -p /sbin/ldconfig
%postun -n libOSC%{soname} -p /sbin/ldconfig

%files
%docdir %{_datadir}/doc/lives-%{version}
%dir %{_datadir}/doc/lives-%{version}
%doc %{_datadir}/doc/lives-%{version}/*
%{_bindir}/autolives.pl
%{_bindir}/build-lives-rfx-plugin
%{_bindir}/build-lives-rfx-plugin-multi
%{_bindir}/lives
%{_bindir}/lives_avi_encoder
%{_bindir}/lives_avi_encoder3
%{_bindir}/lives_dirac_encoder
%{_bindir}/lives_dirac_encoder3
%{_bindir}/lives-exe
%{_bindir}/lives_gif_encoder
%{_bindir}/lives_gif_encoder3
%{_bindir}/lives_mkv_encoder
%{_bindir}/lives_mkv_encoder3
%{_bindir}/lives_mng_encoder
%{_bindir}/lives_mng_encoder3
%{_bindir}/lives_mpeg_encoder
%{_bindir}/lives_mpeg_encoder3
%{_bindir}/lives_ogm_encoder
%{_bindir}/lives_ogm_encoder3
%{_bindir}/lives_theora_encoder
%{_bindir}/lives_theora_encoder3
%{_bindir}/midistart
%{_bindir}/midistop
%{_bindir}/sendOSC
%{_bindir}/smogrify
%{_datadir}/applications/%{name}.desktop
%dir %{_datadir}/lives
%{_datadir}/lives/default.keymap
%dir %{_datadir}/lives/icons
%{_datadir}/lives/icons/*g
%dir %{_datadir}/lives/themes
%{_datadir}/lives/themes/*
%dir %{_datadir}/lives/plugins
%dir %{_datadir}/lives/plugins/effects
%dir %{_datadir}/lives/plugins/effects/compound
%{_datadir}/lives/plugins/effects/compound/image_stabilizer
%{_datadir}/lives/plugins/effects/compound/motion_analyser
%{_datadir}/lives/plugins/effects/compound/neural_net
%dir %{_datadir}/lives/plugins/effects/RFXscripts
%{_datadir}/lives/plugins/effects/RFXscripts/*.script
%dir %{_datadir}/lives/resources
%{_datadir}/lives/resources/*
%{_datadir}/icons/hicolor/*/apps/lives.??g
%{_datadir}/pixmaps/lives.xpm
%dir %{_libdir}/lives
%dir %{_libdir}/lives/plugins
%dir %{_libdir}/lives/plugins/decoders
%{_libdir}/lives/plugins/decoders/asf_decoder.so
%{_libdir}/lives/plugins/decoders/dv_decoder.so
%{_libdir}/lives/plugins/decoders/mkv_decoder.so
%{_libdir}/lives/plugins/decoders/ogg_decoder.so
%{_libdir}/lives/plugins/decoders/flv_decoder.so
%{_libdir}/lives/plugins/decoders/mpegts_decoder.so
%dir %{_libdir}/lives/plugins/effects
%dir %{_libdir}/lives/plugins/effects/realtime
%dir %{_libdir}/lives/plugins/effects/realtime/weed
%{_libdir}/lives/plugins/effects/realtime/weed/alien_overlay.so
%{_libdir}/lives/plugins/effects/realtime/weed/alpha_means.so
%{_libdir}/lives/plugins/effects/realtime/weed/audio_transition.so
%{_libdir}/lives/plugins/effects/realtime/weed/audio_volume.so
%{_libdir}/lives/plugins/effects/realtime/weed/blank_frame_detector.so
%{_libdir}/lives/plugins/effects/realtime/weed/blurzoom.so
%{_libdir}/lives/plugins/effects/realtime/weed/bump2d.so
%{_libdir}/lives/plugins/effects/realtime/weed/ccorrect.so
%{_libdir}/lives/plugins/effects/realtime/weed/colorkey.so
%{_libdir}/lives/plugins/effects/realtime/weed/comic.so
%{_libdir}/lives/plugins/effects/realtime/weed/compositor.so
%{_libdir}/lives/plugins/effects/realtime/weed/data_processor.so
%{_libdir}/lives/plugins/effects/realtime/weed/data_unpacker.so
%{_libdir}/lives/plugins/effects/realtime/weed/deinterlace.so
%{_libdir}/lives/plugins/effects/realtime/weed/edge.so
%{_libdir}/lives/plugins/effects/realtime/weed/fg_bg_removal.so
%{_libdir}/lives/plugins/effects/realtime/weed/fireTV.so
%{_libdir}/lives/plugins/effects/realtime/weed/fourKlives.so
%{_libdir}/lives/plugins/effects/realtime/weed/gdk_fast_resize.so
%{_libdir}/lives/plugins/effects/realtime/weed/haar_analyser.so
%{_libdir}/lives/plugins/effects/realtime/weed/haip.so
%{_libdir}/lives/plugins/effects/realtime/weed/ladspa.so
%{_libdir}/lives/plugins/effects/realtime/weed/layout_blends.so
%{_libdir}/lives/plugins/effects/realtime/weed/lifeTV.so
%{_libdir}/lives/plugins/effects/realtime/weed/livetext.so
%{_libdir}/lives/plugins/effects/realtime/weed/log_sig.so
%{_libdir}/lives/plugins/effects/realtime/weed/mask_overlay.so
%{_libdir}/lives/plugins/effects/realtime/weed/mirrors.so
%{_libdir}/lives/plugins/effects/realtime/weed/multi_blends.so
%{_libdir}/lives/plugins/effects/realtime/weed/multi_transitions.so
%{_libdir}/lives/plugins/effects/realtime/weed/negate.so
%{_libdir}/lives/plugins/effects/realtime/weed/nn_programmer.so
%{_libdir}/lives/plugins/effects/realtime/weed/noise.so
%{_libdir}/lives/plugins/effects/realtime/weed/onedTV.so
%{_libdir}/lives/plugins/effects/realtime/weed/palette_test.so
%{_libdir}/lives/plugins/effects/realtime/weed/plasma.so
%{_libdir}/lives/plugins/effects/realtime/weed/posterise.so
%{_libdir}/lives/plugins/effects/realtime/weed/puretext.so
%{_libdir}/lives/plugins/effects/realtime/weed/revTV.so
%{_libdir}/lives/plugins/effects/realtime/weed/RGBdelay.so
%{_libdir}/lives/plugins/effects/realtime/weed/rippleTV.so
%{_libdir}/lives/plugins/effects/realtime/weed/rotozoom.so
%{_libdir}/lives/plugins/effects/realtime/weed/scribbler.so
%{_libdir}/lives/plugins/effects/realtime/weed/shift.so
%{_libdir}/lives/plugins/effects/realtime/weed/simple_blend.so
%{_libdir}/lives/plugins/effects/realtime/weed/slide_over.so
%{_libdir}/lives/plugins/effects/realtime/weed/softlight.so
%{_libdir}/lives/plugins/effects/realtime/weed/targeted_zoom.so
%{_libdir}/lives/plugins/effects/realtime/weed/textfun.so
%{_libdir}/lives/plugins/effects/realtime/weed/tone_gen.so
%{_libdir}/lives/plugins/effects/realtime/weed/tvpic.so
%{_libdir}/lives/plugins/effects/realtime/weed/vector_visualiser.so
%{_libdir}/lives/plugins/effects/realtime/weed/vertigo.so
%{_libdir}/lives/plugins/effects/realtime/weed/videowall.so
%{_libdir}/lives/plugins/effects/realtime/weed/warpTV.so
%{_libdir}/lives/plugins/effects/realtime/weed/xeffect.so
%{_libdir}/lives/plugins/effects/realtime/weed/alpha_visualizer.so
%dir %{_libdir}/lives/plugins/effects/realtime/weed/data
%{_libdir}/lives/plugins/effects/realtime/weed/data/*
%dir %{_libdir}/lives/plugins/effects/realtime/weed/frei0r
%{_libdir}/lives/plugins/effects/realtime/weed/frei0r/frei0r.so
%dir %{_libdir}/lives/plugins/effects/realtime/weed/libvisual
%{_libdir}/lives/plugins/effects/realtime/weed/libvisual/libvis.so
%dir %{_libdir}/lives/plugins/effects/rendered
%{_libdir}/lives/plugins/effects/rendered/blank_frames
%{_libdir}/lives/plugins/effects/rendered/blur
%{_libdir}/lives/plugins/effects/rendered/brightness_change
%{_libdir}/lives/plugins/effects/rendered/charcoal
%{_libdir}/lives/plugins/effects/rendered/colorize
%{_libdir}/lives/plugins/effects/rendered/colour_filter
%{_libdir}/lives/plugins/effects/rendered/colour_replace
%{_libdir}/lives/plugins/effects/rendered/contrast
%{_libdir}/lives/plugins/effects/rendered/cycle
%{_libdir}/lives/plugins/effects/rendered/deinterlace
%{_libdir}/lives/plugins/effects/rendered/despeckle
%{_libdir}/lives/plugins/effects/rendered/dream
%{_libdir}/lives/plugins/effects/rendered/edge_detect
%{_libdir}/lives/plugins/effects/rendered/emboss
%{_libdir}/lives/plugins/effects/rendered/enhance
%{_libdir}/lives/plugins/effects/rendered/fade_in_out
%{_libdir}/lives/plugins/effects/rendered/flip
%{_libdir}/lives/plugins/effects/rendered/flop
%{_libdir}/lives/plugins/effects/rendered/frame_calculator
%{_libdir}/lives/plugins/effects/rendered/gamma_change
%{_libdir}/lives/plugins/effects/rendered/gen_blank_frames
%{_libdir}/lives/plugins/effects/rendered/gen_clip_from_image
%{_libdir}/lives/plugins/effects/rendered/gen_coloured_frames
%{_libdir}/lives/plugins/effects/rendered/gen_text
%{_libdir}/lives/plugins/effects/rendered/hue_change
%{_libdir}/lives/plugins/effects/rendered/image_overlay
%{_libdir}/lives/plugins/effects/rendered/jumble
%{_libdir}/lives/plugins/effects/rendered/modulate
%{_libdir}/lives/plugins/effects/rendered/monochrome
%{_libdir}/lives/plugins/effects/rendered/negate
%{_libdir}/lives/plugins/effects/rendered/noisify
%{_libdir}/lives/plugins/effects/rendered/normalize
%{_libdir}/lives/plugins/effects/rendered/photo_still
%{_libdir}/lives/plugins/effects/rendered/pixilate
%{_libdir}/lives/plugins/effects/rendered/posterize
%{_libdir}/lives/plugins/effects/rendered/randomzoom
%{_libdir}/lives/plugins/effects/rendered/resize
%{_libdir}/lives/plugins/effects/rendered/rotate
%{_libdir}/lives/plugins/effects/rendered/saturation_change
%{_libdir}/lives/plugins/effects/rendered/sepia
%{_libdir}/lives/plugins/effects/rendered/shift_horizontal
%{_libdir}/lives/plugins/effects/rendered/shift_vertical
%{_libdir}/lives/plugins/effects/rendered/shrink_expand
%{_libdir}/lives/plugins/effects/rendered/skip_forwards
%{_libdir}/lives/plugins/effects/rendered/solarize
%{_libdir}/lives/plugins/effects/rendered/spin
%{_libdir}/lives/plugins/effects/rendered/spread
%{_libdir}/lives/plugins/effects/rendered/swirl
%{_libdir}/lives/plugins/effects/rendered/textover
%{_libdir}/lives/plugins/effects/rendered/transition_bwthresh
%{_libdir}/lives/plugins/effects/rendered/transition_checkerboard
%{_libdir}/lives/plugins/effects/rendered/transition_fade2
%{_libdir}/lives/plugins/effects/rendered/transition_splice
%{_libdir}/lives/plugins/effects/rendered/trim_frames
%{_libdir}/lives/plugins/effects/rendered/tunnel
%{_libdir}/lives/plugins/effects/rendered/wave
%dir %{_libdir}/lives/plugins/encoders
%{_libdir}/lives/plugins/encoders/encodedv_encoder
%{_libdir}/lives/plugins/encoders/ffmpeg_encoder
%{_libdir}/lives/plugins/encoders/mencoder_encoder
%{_libdir}/lives/plugins/encoders/mjpegtools_encoder
%{_libdir}/lives/plugins/encoders/multi_encoder
%{_libdir}/lives/plugins/encoders/multi_encoder3
%{_libdir}/lives/plugins/encoders/pdf_encoder
%{_libdir}/lives/plugins/encoders/qtutils_encoder
%{_libdir}/lives/plugins/encoders/sswf_encoder
%{_libdir}/lives/plugins/encoders/x264_encoder
%dir %{_libdir}/lives/plugins/playback
%dir %{_libdir}/lives/plugins/playback/audiostream
%{_libdir}/lives/plugins/playback/audiostream/audiostreamer.pl
%dir %{_libdir}/lives/plugins/playback/video
%{_libdir}/lives/plugins/playback/video/SDL.so
%{_libdir}/lives/plugins/playback/video/libav_stream.so
%{_libdir}/lives/plugins/playback/video/lives2lives_stream.so
%{_libdir}/lives/plugins/playback/video/oggstream.so
%{_libdir}/lives/plugins/playback/video/vloopback.so
%{_libdir}/lives/plugins/playback/video/yuv4mpeg_stream.so
%{_libdir}/lives/plugins/playback/video/icecast_output.so
%{_libdir}/lives/plugins/playback/video/vloopback2.so
%{_libdir}/lives/plugins/playback/video/openGL.so
%{_libdir}/lives/plugins/decoders/zzavformat_decoder.so
%{_libdir}/lives/plugins/effects/realtime/weed/kaleidoscope.so
%{_libdir}/lives/plugins/effects/realtime/weed/randomiser.so

%files -n libweed%{soname}
%{_libdir}/libweed.so.%{soname}
%{_libdir}/libweed.so.%{soname}.*
%{_libdir}/libweed-utils.so.%{soname}
%{_libdir}/libweed-utils.so.%{soname}.*
%{_libdir}/libweed_slice.so.%{soname}
%{_libdir}/libweed_slice.so.%{soname}.*
%{_libdir}/libweed-utils_scripting.so.%{soname}
%{_libdir}/libweed-utils_scripting.so.%{soname}.*
%{_libdir}/libweed_slice_scripting.so.%{soname}
%{_libdir}/libweed_slice_scripting.so.%{soname}.*

%files -n libweed-devel
%{_includedir}/weed
%{_libdir}/libweed.so
%{_libdir}/libweed-utils.so
%{_libdir}/libweed_slice.so
%{_libdir}/libweed-utils_scripting.so
%{_libdir}/libweed_slice_scripting.so
%{_libdir}/pkgconfig/libweed.pc
%{_libdir}/pkgconfig/libweed_slice.pc
%{_libdir}/pkgconfig/libweed-plugin.pc
%{_libdir}/pkgconfig/libweed-utils.pc
%{_libdir}/pkgconfig/libweed-compat.pc

%files -n libOSC%{soname}
%{_libdir}/libOSC.so.%{soname}
%{_libdir}/libOSC.so.%{soname}.*
%{_libdir}/libOSC_client.so.%{soname}
%{_libdir}/libOSC_client.so.%{soname}.*

%files -n libOSC-devel
%{_libdir}/libOSC.so
%{_libdir}/libOSC_client.so

%files lang -f lives.lang

%changelog