Package pd: Specfile

%set_verify_elf_method textrel=relaxed
%add_findreq_skiplist %_libdir/pd/doc/*

Name: pd
Version: 0.42.5
Release: alt0.svn12520.1

Summary: Real-time graphical programming environment for audio, video, and graphical processing
License: %bsdstyle
Group: Sound

Url: http://puredata.info
Packager: Timur Batyrshin <erthad@altlinux.org>

Source: %name-%version.tar

BuildPreReq: rpm-build-licenses
# Automatically added by buildreq on Sun Oct 04 2009
BuildRequires: bzlib-devel dssi-devel gcc-c++ imlib2-devel jackit-devel ladspa_sdk libGL-devel libImageMagick-devel libSDL-devel libXv-devel libalsa-devel libfftw3-devel libfreeglut-devel libftgl-devel libgsl-devel liblame-devel liblo-devel libquicktime-devel libspeex-devel libtheora-devel swig tk-devel

Requires: tk
Requires: pd-bin = %version-%release
Requires: pd-manpages = %version-%release
Requires: pd-doc = %version-%release
Requires: pd-extra = %version-%release

%description
Pd (aka Pure Data) is a real-time graphical programming environment for audio,
video, and graphical processing. It is the third major branch of the family of
patcher programming languages known as Max (Max/FTS, ISPW Max, Max/MSP, jMax,
etc.) originally developed by Miller Puckette and company at IRCAM. 

This is a metapackage to install all PureData packages

%package bin
Summary: Real-time graphical programming environment for audio, video, and graphical processing
Group: Sound

%description bin
Pd (aka Pure Data) is a real-time graphical programming environment for audio,
video, and graphical processing. It is the third major branch of the family of
patcher programming languages known as Max (Max/FTS, ISPW Max, Max/MSP, jMax,
etc.) originally developed by Miller Puckette and company at IRCAM.

This package holds program files required to run PureData

%package devel
Summary: Headers for building modules for PureData
Group: Development/C

%description devel
Headers for building modules for PureData

%package doc
Summary: Inline documentation for PureData
Group: Sound
Requires: %name-extra = %version-%release

%description doc
Pd (aka Pure Data) is a real-time graphical programming environment for audio,
video, and graphical processing. It is the third major branch of the family of
patcher programming languages known as Max (Max/FTS, ISPW Max, Max/MSP, jMax,
etc.) originally developed by Miller Puckette and company at IRCAM.

This package holds inline documentation for PureData

%package extra
Summary: Extra libraries for PureData
Group: Sound
Requires: %name-bin = %version-%release

%description extra
Pd (aka Pure Data) is a real-time graphical programming environment for audio,
video, and graphical processing. It is the third major branch of the family of
patcher programming languages known as Max (Max/FTS, ISPW Max, Max/MSP, jMax,
etc.) originally developed by Miller Puckette and company at IRCAM.

This package holds extra libraries for PureData.

%package manpages
Summary: Manual pages for PureData
Group: Sound

%description manpages
Pd (aka Pure Data) is a real-time graphical programming environment for audio,
video, and graphical processing. It is the third major branch of the family of
patcher programming languages known as Max (Max/FTS, ISPW Max, Max/MSP, jMax,
etc.) originally developed by Miller Puckette and company at IRCAM.

This package holds manual pages for PureData.

%prep
%setup
patch -p0 -d pd/src/ < packages/patches/closeinitbang-0.40-0test03.patch
patch -p0 -d pd/src/ < packages/patches/use_individual_help_patches_for_midi-0.41.0-test04.patch
patch -p0 -d pd/src/ < packages/patches/pd_hidden_file_dialogs-0.41.4.patch
patch -p0 -d pd/src/ < packages/patches/show_whole_subpatch_name_in_window_title-0.41.4.patch
patch -p0 -d pd/src/ < packages/patches/sine_cosine_sum_memory_leak_fix-0.41.4.patch
patch -p0 -d pd/src/ < packages/patches/update_window_list_on_saveas-0.41.4.patch

%build
cd packages
%make prefix=/usr

%install
cd packages
%makeinstall DESTDIR=/

cd linux_make/
install -Dpm0644 pd-extended.desktop %buildroot%_desktopdir/pd-extended.desktop
install -Dpm0644 pd-extended.xml %buildroot%_datadir/mime/packages/pd-extended.xml
install -Dpm0644 text-x-puredata.png %buildroot%_iconsdir/hicolor/128x128/mimetypes/text-x-puredata.png
install -Dpm0644 pd.png %buildroot%_iconsdir/hicolor/128x128/apps/pd.png
install -Dpm0644 pd-48x48.png %buildroot%_liconsdir/pd.png

%files

%files bin
%_bindir/*
%dir %_libdir/pd/
%_libdir/pd/bin/
%_desktopdir/*
%_datadir/mime/packages/*
%_iconsdir/hicolor/128x128/mimetypes/*
%_iconsdir/hicolor/128x128/*
%_liconsdir/*

%files devel
%_includedir/*

%files doc
%_libdir/pd/doc/

%files extra
%_libdir/pd/extra/

%files manpages
%_man1dir/*

%changelog
* Mon Oct 12 2009 Timur Batyrshin <erthad@altlinux.org> 0.42.5-alt0.svn12520.1
- added menu link, icon and mime typeinfo
- removed *.c, *.o from install tree
- applied patches: 
  * initbang/closebang (new object)
  * fixed some minor bugs and made several minor ui improvements

* Sun Oct 04 2009 Timur Batyrshin <erthad@altlinux.org> 0.42.5-alt0.svn12520.0.1
- 0.42.5.svn12520

* Thu May 28 2009 Timur Batyrshin <erthad@altlinux.org> 0.41.4-alt1
- initial build for sisyphus