File kdewebdev3.spec of Package kdewebdev3

#
# spec file for package kdewebdev3
#
# Copyright (c) 2012 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:           kdewebdev3
BuildRequires:  kdebase3-devel
BuildRequires:  kdesdk3-devel
BuildRequires:  fdupes
BuildRequires:  libgcrypt-devel
Summary:        KDE Web Development Suite
License:        GPL-2.0+
Group:          Productivity/Publishing/HTML/Tools
Version:        3.5.10
Release:        0
Requires:       kdelibs3 >= %( echo `rpm -q --queryformat '%{VERSION}' kdelibs3`)
Url:            http://kdewebdev.org
Source0:        kdewebdev-%{version}.tar.bz2
Source1:        css.tar.bz2
Source2:        html.tar.bz2
Source3:        javascript.tar.bz2
Source4:        php.tar.bz2
Patch0:         3_5_BRANCH.diff
Patch1:         disable-icon.diff
Patch2:         javascript.patch
#Patch3:         only-quanta.diff
Patch4:         no-applnk.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description

The package contains various tools for the daily work of a Web
administrator:
* KLinkStatus--validator for links on HTML pages
* KImageMapEditor--an HTML image map editor
* KXsldbg--XSLT debugger
* KFileReplace--batch search and replace tool

%package -n kde3-quanta
Summary:        KDE Web Development Suite
Group:          Productivity/Publishing/HTML/Editors
Provides:       kdewebdev3:/opt/kde3/bin/quanta
Provides:       quanta = %{version}
Obsoletes:      quanta <= %{version}
# should not be a hard require
Requires:       tidy
Requires:       kde3-kommander-runtime
Recommends:     kdewebdev3

%description -n kde3-quanta
The package contains Quanta, an html editor (native source and WYSIWIG), 
with lots of features like an php debugger.

%package -n kde3-kommander
Summary:        Editor to build dialogs and application
Group:          System/GUI/KDE
Requires:       kde3-kommander-runtime
Provides:       kdewebdev3:/opt/kde3/bin/kmdr-editor
Provides:       kommander = 3.5.10
Obsoletes:      kommander <= 3.5.10

%description -n kde3-kommander
Kommander is a creator of full main window applications without the
need to use any programming language.

%package -n kde3-kommander-runtime
Summary:        Runtime to execute Kommander based applications
Group:          System/GUI/KDE
Provides:       kommander-runtime = 3.5.10
Obsoletes:      kommander-runtime <= 3.5.10

%description -n kde3-kommander-runtime
Runtime parts to execute Kommander based applications and dialogs.

%prep
%setup -q -n kdewebdev-%version -b 1 -b 2 -b 3 -b 4
%patch0
%patch1
pushd ../javascript
%patch2 -p1
popd
%patch4
. /etc/opt/kde3/common_options
update_admin

%build
. /etc/opt/kde3/common_options
export CXXFLAGS="$RPM_OPT_FLAGS -fpermissive"
export CFLAGS="$RPM_OPT_FLAGS -fpermissive"
export LIBS="$LIBS -lxml2"
export LDFLAGS="$LDFLAGS -lxml2"
./configure $configkde
make %{?jobs:-j%jobs}

%install
. /etc/opt/kde3/common_options
make DESTDIR=$RPM_BUILD_ROOT $INSTALL_TARGET
cd .. 
cp -R css/css css/css.docrc html/html html/html.docrc \
      javascript/javascript javascript/javascript.docrc php/php \
      php/php.docrc \
      $RPM_BUILD_ROOT/opt/kde3/share/apps/quanta/doc/ 
%suse_update_desktop_file -r klinkstatus Office WebDevelopment
%suse_update_desktop_file -r kxsldbg     Office WebDevelopment
%suse_update_desktop_file -r kimagemapeditor Office WebDevelopment
%suse_update_desktop_file -r kfilereplace System      FileManager
%suse_update_desktop_file kmdr-editor     Development GUIDesigner
%suse_update_desktop_file kmdr-executor   Development GUIDesigner
%suse_update_desktop_file -r quanta      Office WebDevelopment
kde_post_install
%find_lang quanta
%fdupes -s $RPM_BUILD_ROOT

%post
%run_ldconfig

%postun
%run_ldconfig

%post -n kde3-kommander-runtime
%run_ldconfig

%postun -n kde3-kommander-runtime
%run_ldconfig

%files
%defattr(-,root,root)
%doc NEWS README VERSION AUTHORS ChangeLog COPYING
/opt/kde3/bin/kfilereplace
/opt/kde3/bin/kimagemapeditor
/opt/kde3/bin/klinkstatus
/opt/kde3/bin/kxsldbg
/opt/kde3/bin/xsldbg
%exclude /opt/kde3/%_lib/kde3/quanta*
#/opt/kde3/%_lib/kde3/*
/opt/kde3/%_lib/kde3/libkfilereplacepart.la
/opt/kde3/%_lib/kde3/libkfilereplacepart.so
/opt/kde3/%_lib/kde3/libkimagemapeditor.la
/opt/kde3/%_lib/kde3/libkimagemapeditor.so
/opt/kde3/%_lib/kde3/libklinkstatuspart.la
/opt/kde3/%_lib/kde3/libklinkstatuspart.so
/opt/kde3/%_lib/kde3/libkxsldbgpart.la
/opt/kde3/%_lib/kde3/libkxsldbgpart.so
/opt/kde3/share/applications/kde/kfilereplace.desktop
/opt/kde3/share/applications/kde/kimagemapeditor.desktop
/opt/kde3/share/applications/kde/klinkstatus.desktop
/opt/kde3/share/applications/kde/kxsldbg.desktop
/opt/kde3/share/apps/kfilereplace
/opt/kde3/share/apps/kfilereplacepart
/opt/kde3/share/apps/kimagemapeditor
/opt/kde3/share/apps/klinkstatus
/opt/kde3/share/apps/klinkstatuspart
/opt/kde3/share/apps/kxsldbgpart
/opt/kde3/share/apps/kxsldbg
/opt/kde3/share/config.kcfg/klinkstatus.kcfg
%exclude /opt/kde3/share/services/quanta*.desktop
%exclude /opt/kde3/share/services/kommander*.desktop
/opt/kde3/share/services/*.desktop
/opt/kde3/share/icons/hicolor/*/apps/kfilereplace.*
/opt/kde3/share/icons/hicolor/*/apps/kimagemapeditor.*
/opt/kde3/share/icons/hicolor/*/apps/klinkstatus.*
/opt/kde3/share/icons/hicolor/*/actions/*
%lang(en) %doc /opt/kde3/share/doc/HTML/en/kfilereplace
%lang(en) %doc /opt/kde3/share/doc/HTML/en/klinkstatus
%lang(en) %doc /opt/kde3/share/doc/HTML/en/kxsldbg
%lang(en) %doc /opt/kde3/share/doc/HTML/en/xsldbg
/opt/kde3/share/apps/kafkapart
/opt/kde3/share/mimelnk/application/x-webprj.desktop

%files -n kde3-quanta
%defattr(-,root,root)
/opt/kde3/bin/quanta
/opt/kde3/%_lib/kde3/quanta*
/opt/kde3/share/applications/kde/quanta.desktop
/opt/kde3/share/apps/quanta
/opt/kde3/share/services/quanta*.desktop
/opt/kde3/share/servicetypes/quantadebugger.desktop
/opt/kde3/share/icons/hicolor/*/apps/quanta.*
%lang(en) %doc /opt/kde3/share/doc/HTML/en/quanta

%files -n kde3-kommander
%defattr(-,root,root)
/opt/kde3/bin/kmdr-editor
/opt/kde3/include
/opt/kde3/share/applications/kde/kmdr-editor.desktop
%lang(en) %doc /opt/kde3/share/doc/HTML/en/kommander
/opt/kde3/share/apps/katepart/syntax/kommander.xml
/opt/kde3/share/apps/katepart/syntax/kommander-new.xml
/opt/kde3/share/apps/kommander
/opt/kde3/share/apps/kmdr-editor
/opt/kde3/share/apps/kdevappwizard

%files -n kde3-kommander-runtime
%defattr(-,root,root)
/opt/kde3/bin/kmdr-executor
/opt/kde3/bin/kmdr-plugins
/opt/kde3/%_lib/libkommanderplugin.*
/opt/kde3/%_lib/libkommanderwidget.*
/opt/kde3/%_lib/libkommanderwidgets.*
/opt/kde3/share/applications/kde/kmdr-executor.desktop
/opt/kde3/share/mimelnk/application/x-kommander.desktop
/opt/kde3/share/icons/hicolor/*/apps/kommander.*
/opt/kde3/%_lib/kde3/libkommander_part.*
/opt/kde3/share/services/kommander_part.desktop

%changelog
openSUSE Build Service is sponsored by