File kompozer.spec of Package kompozer
#
# spec file for package kompozer
#
# Copyright (c) 2011 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: kompozer
BuildRequires: fdupes gcc-c++ gtk2-devel krb5-devel libgnome-devel libidl-devel mozilla-nss-devel startup-notification-devel tcsh unzip update-desktop-files zip
License: GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
Version: 0.7.99.3
Release: 10
Summary: Web Authoring System
Url: http://www.kompozer.net/
Group: Productivity/Publishing/HTML/Editors
Source: kompozer-0.8b3-src.tar.bz2
Source1: kompozer.desktop
Source2: kompozer.png
#
# The patchwork below is a port from the old nvu/kompozer
Patch200: mozilla-freetype218.patch
Patch211: unused-includes.patch
#
# The patchwork below is a backport from OBS mozilla firefox2 package
# last change: Thu Apr 23 2009 - wr@rosenauer.org
# Patches commented with #B are browser only.
# Patches commented with #N don't apply, but maybe may be useful.
# Patches commented with #X don't compile, but maybe may be useful.
# Patches with name kompozer-* required porting.
# Patch100 needs to be regenerated from scratch calling autoconf-2.13 from package autoconf213.
Patch1: x11-session.patch
#NPatch2: rpath.patch
Patch3: gcc-undefined-ops.patch
Patch4: mozilla-gcc4.3-fixes.patch
Patch5: abuild.patch
Patch6: kompozer-png14.patch
Patch7: locale.patch
# lockdown infrastructure
#BPatch8: firefox-ui-lockdown.patch
#BPatch9: gecko-lockdown.patch
#BPatch10: gconf-backend.patch
Patch11: gnome-vfs.patch
Patch12: misc.dif
Patch13: nss-opt.patch
#BPatch14: credits.patch
Patch15: em-356370.patch
# bmo #273524 (only for NLD)
#NPatch16: gnome-vfs-default.patch
# integration
#BPatch17: firefox-appname.patch
#BPatch18: firefox-no-update.patch
#BPatch19: dbus.patch
Patch1020: kompozer-path_len.patch
# customization
Patch22: cjk-postscript-fonts.dif
Patch23: startup.patch
# bmo #324060
#XPatch24: cups-paper.patch
Patch25: system-extensions.patch
#NPatch27: system-proxies.patch
# bmo #331522
Patch32: postscript.patch
Patch33: proxy-dev.patch
# integration
#NPatch34: skin-selection.patch
Patch36: greasemonkey.patch
Patch37: firefox-381370.patch
Patch40: synaptics-scroll-358863.patch
Patch41: firefox-ntlm.patch
# gconf-backend.patch dbus.patch startup.patch
Patch100: configure.patch
Patch101: gcc46_default_ctors.patch
%define _use_internal_dependency_generator 0
%define my_provides %{_builddir}/%{?buildsubdir}/my-provides
%define my_requires %{_builddir}/%{?buildsubdir}/my-requires
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# before 11.1:
Provides: nvu = 1.0.0.%{version}
Obsoletes: nvu < 1.0.0.%{version}
%description
KompoZer is a complete web authoring system that combines web file
management and easy-to-use WYSIWYG web page editing.
KompoZer is designed to be extremely easy to use, making it ideal for
non-technical computer users who want to create an attractive,
professional-looking web site without needing to know HTML or web coding.
Features
* WYSIWYG editing of pages, making Web creation as easy as typing a
letter with your word processor.
* Integrated file management via FTP. Simply log in to your Web
site and navigate through your files, editing Web pages on the
fly, directly from your site.
* Reliable HTML code creation that works with today's most popular
browsers.
* Jump between WYSIWYG editing mode and HTML using tabs.
* Tabbed editing to make working on multiple pages a snap.
* Powerful support for frames, forms, tables, and templates.
%prep
%setup -q -n mozilla
cp composer/config/mozconfig.fedora composer/config/mozconfig.opensuse
%patch200
%patch211
%patch1 -p1
#%patch2
%patch3
%patch4
%patch5 -p2
%patch6
%patch7
# lockdown stuff
#%patch8 -p1
#%patch9
#%patch10 -p2
%patch11
%patch12
%patch13
#%patch14
%patch15
#%patch17
#%patch18
#%patch19
%patch1020 -p1
%patch22
%patch23 -p1
#%patch24
%patch25
#%patch27
#if #nld9
#%patch16
#endif
%patch32
%patch33 -p1
#%patch34
%patch36
%patch37 -p2
%patch40 -p0
%patch41 -p2
%patch100
%patch101
%build
export SUSE_ASNEEDED=0
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%ifarch ppc64
export CFLAGS="$CFLAGS -mminimal-toc"
%endif
cp composer/config/mozconfig.opensuse .mozconfig
echo "ac_add_options --with-system-nspr" >>.mozconfig
echo "ac_add_options --with-system-nss" >>.mozconfig
echo "ac_add_options --enable-startup-notification" >>.mozconfig
echo "export CFLAGS=\"$CFLAGS\"" >>.mozconfig
echo "export CXXFLAGS=\"$CFLAGS\"" >>.mozconfig
echo "export HOST_CFLAGS=\"$CFLAGS\"" >>.mozconfig
echo "export HOST_CXXFLAGS=\"$CFLAGS\"" >>.mozconfig
#
# The configuration bellow is a backport from OBS mozilla firefox2 package
# last change: Thu Apr 23 2009 - wr@rosenauer.org
cat << EOF >> .mozconfig
#mk_add_options MOZILLA_OFFICIAL=1
#mk_add_options BUILD_OFFICIAL=1
mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs}
#. \$topsrcdir/browser/config/mozconfig
#ac_add_options --prefix=%{_prefix}
#ac_add_options --libdir=%{_libdir}
#ac_add_options --sysconfdir=%{_sysconfdir}
#ac_add_options --mandir=%{_mandir}
#ac_add_options --includedir=%{_includedir}
ac_add_options --enable-optimize="$CFLAGS"
ac_add_options --with-system-jpeg
ac_add_options --with-system-png
ac_add_options --with-system-mng
ac_add_options --with-system-zlib
ac_add_options --enable-default-toolkit=gtk2
#Bac_add_options --enable-gconf
ac_add_options --enable-svg
ac_add_options --enable-canvas
ac_add_options --enable-xft
ac_add_options --disable-freetype2
ac_add_options --disable-installer
#ac_add_options --enable-static
#ac_add_options --disable-shared
#ac_add_options --disable-tests
#ac_add_options --disable-debug
EOF
make -f client.mk build_all
%install
mkdir -p $RPM_BUILD_ROOT/usr/lib/kompozer
cp -rL ../obj-kompozer/dist/bin/* $RPM_BUILD_ROOT/usr/lib/kompozer
#cp -rL ../obj-kompozer/dist/bin/.autoreg $RPM_BUILD_ROOT/usr/lib/kompozer
mkdir -p $RPM_BUILD_ROOT/usr/bin
ln -s ../lib/kompozer/kompozer $RPM_BUILD_ROOT/usr/bin/kompozer
mkdir -p $RPM_BUILD_ROOT/usr/share/applications
cp %{S:1} $RPM_BUILD_ROOT/usr/share/applications
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
cp %{S:2} $RPM_BUILD_ROOT/usr/share/pixmaps
%suse_update_desktop_file kompozer
#$RPM_BUILD_ROOT/usr/lib/kompozer/run-mozilla.sh $RPM_BUILD_ROOT/usr/lib/kompozer/regxpcom
#$RPM_BUILD_ROOT/usr/lib/kompozer/run-mozilla.sh $RPM_BUILD_ROOT/usr/lib/kompozer/kompozer-bin -register
#sed -i s:$RPM_BUILD_ROOT::g $RPM_BUILD_ROOT/usr/lib/kompozer/components/xpti.dat
cat << EOF > %{my_provides}
cat > /dev/null
#! /bin/sh
echo /usr/bin/kompozer
EOF
cat << EOF > %{my_requires}
#! /bin/sh
/usr/lib/rpm/find-requires |
while read ; do
if ! test -e $RPM_BUILD_ROOT/usr/lib/kompozer/\${REPLY%%%%(*} ; then #)
echo "\$REPLY"
fi
done
EOF
chmod 755 %{my_provides} %{my_requires}
%define __find_provides %{my_provides}
%define __find_requires %{my_requires}
find $RPM_BUILD_ROOT/usr/lib/kompozer -name '*.xpm' -exec chmod -x {} \;
chmod -x $RPM_BUILD_ROOT/usr/lib/kompozer/LICENSE
%fdupes $RPM_BUILD_ROOT%{_prefix}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr (-, root, root)
%doc LEGAL LICENSE README.txt
/usr/bin/*
/usr/lib/kompozer
/usr/share/*/kompozer.*
%changelog