##
## mozilla.spec -- OpenPKG RPM Specification
## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
## Copyright (c) 2000-2002 The OpenPKG Project
## Copyright (c) 2000-2002 Ralf S. Engelschall
##
## Permission to use, copy, modify, and distribute this software for
## any purpose with or without fee is hereby granted, provided that
## the above copyright notice and this permission notice appear in all
## copies.
##
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
## SUCH DAMAGE.
##
# package information
Name: mozilla
Summary: Graphical Web/Mail/News/Chat Frontend
URL: http://www.mozilla.org/
Vendor: Mozilla
Packager: The OpenPKG Project
Distribution: OpenPKG [EVAL]
Group: Web
License: MPL
Version: 1.2.1
Release: 20021206
# list of sources
Source0: ftp://ftp.mozilla.org/pub/mozilla/releases/mozilla%{version}/src/mozilla-source-%{version}.tar.bz2
Source1: mozilla.sh
Source2: mozilla.pod
Patch0: mozilla.patch
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20021204, X11, glib, gtk, orbit, infozip, make, gcc, perl
PreReq: OpenPKG, openpkg >= 20021204, X11, glib, gtk, orbit, infozip, xsel
AutoReq: no
AutoReqProv: no
%description
Mozilla is a full-featured open-source web browser derived
from Netscape Communicator, designed for standards compliance,
performance and portability.
%prep
%setup -q -n mozilla
%patch -p0
%build
CC="%{l_cc}" \
CXX="%{l_cxx}" \
CFLAGS="%{l_cflags} %{l_cppflags}" \
CXXFLAGS="%{l_cxxflags} -Wno-deprecated %{l_cppflags}" \
CPPFLAGS="%{l_cppflags}" \
LDFLAGS="%{l_ldflags}" \
GLIB_CONFIG="%{l_prefix}/bin/glib-config" \
GTK_CONFIG="%{l_prefix}/bin/gtk-config" \
LIBIDL_CONFIG="%{l_prefix}/bin/libIDL-config" \
./configure \
--prefix=%{l_prefix} \
--libdir=%{l_prefix}/lib/mozilla \
--includedir=%{l_prefix}/include/mozilla \
--with-x \
--x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
--x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
--enable-toolkit-gtk \
--enable-default-toolkit=gtk \
--with-gtk-prefix=%{l_prefix} \
--with-glib-prefix=%{l_prefix} \
--with-libIDL-prefix=%{l_prefix} \
--with-system-jpeg=%{l_prefix} \
--with-system-png=%{l_prefix} \
--with-system-zlib=%{l_prefix} \
--enable-jsd \
--enable-crypto \
--enable-xinerama \
--enable-chrome-format=jar \
--enable-static \
--enable-strip \
--disable-shared \
--disable-tests \
--disable-mailnews \
--disable-composer \
--disable-svg \
--disable-ldap \
--disable-freetype2 \
--disable-accessibility \
--disable-debug \
--disable-dtd-debug \
--disable-pedantic \
--disable-auto-deps \
--disable-md \
--disable-cpp-exceptions \
--disable-cpp-rtti \
--disable-optimize \
--disable-xterm-updates \
--with-pthreads
%{l_make} %{l_mflags}
( cd dist/bin
LD_LIBRARY_PATH=.; export LD_LIBRARY_PATH
MOZILLA_FIVE_HOME=.; export MOZILLA_FIVE_HOME
./regxpcom || true
./regchrome || true
touch chrome/user-skins.rdf chrome/user-locales.rdf
#find . -type d -depth -print | xargs rmdir >/dev/null 2>&1 || true
%{l_shtool} subst \
-e "s;`pwd`;%{l_prefix}/lib/mozilla;" \
components/xpti.dat components/compreg.dat
mkdir .autoreg
)
%{l_prefix}/bin/pod2man \
--section=1 --quotes=none \
--release="Mozilla %{version}" --center="%{packager}" \
%{SOURCE mozilla.pod} >mozilla.1
%install
rm -rf $RPM_BUILD_ROOT
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/bin \
$RPM_BUILD_ROOT%{l_prefix}/lib/mozilla \
$RPM_BUILD_ROOT%{l_prefix}/man/man1
(cd dist/bin && %{l_tar} -chf - . ) |\
(cd $RPM_BUILD_ROOT%{l_prefix}/lib/mozilla && %{l_tar} -xf -)
%{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
%{SOURCE mozilla.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/mozilla
%{l_shtool} install -c -m 644 \
mozilla.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
%files -f files
%clean
rm -rf $RPM_BUILD_ROOT