File ddd.spec of Package ddd

#
# spec file for package ddd (Version 3.3.12)
#
# Copyright (c) 2009 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/
#

# norootforbuild


Name:           ddd
BuildRequires:  ImageMagick apache2-devel freetype2-devel gcc-c++ ghostscript_any
BuildRequires:  libapr-util1-devel libtiff-devel openmotif-devel pcre-devel transfig
BuildRequires:  ghostscript-library ncurses-devel update-desktop-files
License:        GPL v2 or later ; LGPL v2.1 or later
Group:          Development/Tools/Debuggers
Requires:       gdb
AutoReqProv:    on
Version:        3.3.12
Release:        3
Summary:        Debugger with Graphical User Interface
Url:            http://www.gnu.org/software/ddd
Source:         ddd-%{version}.tar.bz2
Source1:        ddd.png
Source2:        ddd.desktop
Source3:        README.SUSE
Source4:        ddd.wrapper
Patch0:         ddd-3.3.12-gcc44.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         %install_info_prereq
# NOTE: We don't want this dependency and desktop-data-SuSE is in all
# desktop selections.
#Requires:    desktop-data-SuSE

%description
The DDD debugger (Data Display Debugger) is a comfortable GUI to the
well-known debuggers GDB and DBX. Data structures can be represented as
graphs and shown interactively. Programs can be debugged in C, C++,
Pascal, MODULA-2, FORTRAN, ADA, and even at the assembler code level.



Authors:
--------
    Andreas Zeller <zeller@ips.cs.tu-bs.de>
    Dorothea Luetkehaus <luetke@ips.cs.tu-bs.de>

%package doc
License:        GPL v2 or later ; LGPL v2.1 or later
Summary:        Debugger with Graphical User Interface
Group:          Development/Tools/Debuggers
%if %suse_version > 1110
BuildArch:      noarch
%endif
AutoReqProv:    on

%description doc
The DDD debugger (Data Display Debugger) is a comfortable GUI to the
well-known debuggers GDB and DBX. Data structures can be represented as
graphs and shown interactively. Programs can be debugged in C, C++,
Pascal, MODULA-2, FORTRAN, ADA, and even at the assembler code level.



Authors:
--------
    Andreas Zeller <zeller@ips.cs.tu-bs.de>
    Dorothea Luetkehaus <luetke@ips.cs.tu-bs.de>

%prep
%define apache_docroot %(apxs2 -q PREFIX)/htdocs
%setup -q
%patch0

%build
cp %{S:3} .
%configure
make 
make html

%install
%makeinstall
mkdir -p  $RPM_BUILD_ROOT/usr/share/X11/app-defaults/
install -m 644 ddd/Ddd $RPM_BUILD_ROOT/usr/share/X11/app-defaults/
install -m 755 -d $RPM_BUILD_ROOT/usr/share/doc/packages/%{name}/
mkdir -p doc/html/PICS
cp -a ddd/PICS/*.jpg doc/html/PICS
cp -a ddd/style.css doc/html
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/usr/share/pixmaps/
mkdir -p $RPM_BUILD_ROOT/usr/share/applications
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/usr/share/applications/
mv $RPM_BUILD_ROOT/usr/bin/ddd $RPM_BUILD_ROOT/usr/bin/ddd.org
install %{SOURCE4} $RPM_BUILD_ROOT/usr/bin/ddd
%suse_update_desktop_file ddd

%clean
rm -rf $RPM_BUILD_ROOT

%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/ddd-themes.info.gz

%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ddd-themes.info.gz

%files
%defattr(-, root, root)
%doc AUTHORS COPYING INSTALL NEWS README TIPS TODO README.SUSE
%config /usr/share/X11/app-defaults/Ddd
%attr(755, root, root) /usr/bin/ddd.org
%attr(755, root, root) /usr/bin/ddd
%{_mandir}/man1/ddd.*
%{_infodir}/ddd*
/usr/share/ddd-%{version}/ 
/usr/share/applications/ddd.desktop
/usr/share/pixmaps/ddd.png
%exclude /usr/share/ddd-%{version}/NEWS
%exclude /usr/share/ddd-%{version}/COPYING
%exclude /usr/share/ddd-%{version}/ddd/Ddd

%files doc
%defattr(-,root,root,-)
%doc doc/ddd-paper.ps doc/*.pdf doc/html

%changelog
openSUSE Build Service is sponsored by