LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File netsurf.spec of Package netsurf (Project network:utilities)

#
# spec file for package netsurf
#
# 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:           netsurf
Version:        2.9
Release:        0
Summary:        Lightweight Web Browser with its own layout and rendering engine
License:        GPL-2.0 and MIT
Group:          Productivity/Networking/Web/Browsers
Source:         http://www.netsurf-browser.org/downloads/releases/netsurf-%{version}-full-src.tar.gz
Source3:        netsurf.desktop
Source4:        netsurf.png
# PATCH-FIX-OPENSUSE netsurf-2.9-librosprite-0.0.2-Makefile-optflags.patch
Patch0:         netsurf-2.9-librosprite-0.0.2-Makefile-optflags.patch
# PATCH-FIX_UPSTREAM netsurf-2.9-libcss-enum-compare.patch which equates to a backport of r13810 and r13868
Patch1:		netsurf-2.9-libcss-enum-compare.patch
Url:            http://www.netsurf-browser.org/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  gcc
BuildRequires:  glibc-devel
BuildRequires:  gtk2-devel
BuildRequires:  libcurl-devel
BuildRequires:  libglade2-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libmng-devel
BuildRequires:  libopenssl-devel
BuildRequires:  libpng-devel
BuildRequires:  librsvg-devel
BuildRequires:  libxml2-devel
BuildRequires:  make
BuildRequires:  update-desktop-files
BuildRequires:  zlib-devel

%description
NetSurf is a lightweight browser with its own layout and rendering engine 
entirely written from scratch. It is small and capable of handling many 
of the web standards in use today.

Authors:
--------
    Rob Kendrick <rjek@netsurf-browser.org>    

%prep
%setup -q
%patch0
%patch1

pushd "%{name}-%{version}"
echo "NETSURF_GTK_RESOURCES := %{_datadir}/netsurf" >> Makefile.config 
echo "CFLAGS += %{optflags} " >> Makefile.config 
popd

%build

DEP_PREFIX="$PWD/dependencies"
%__install -d "${DEP_PREFIX}"/{lib,lib/pkgconfig,include}
export PKG_CONFIG_PATH="${DEP_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"

for d in \
	libparserutils-0.1.1 \
	libwapcaplet-0.1.1 \
	hubbub-0.1.2 \
	libcss-0.1.2 \
	libnsgif-0.0.3 \
	libnsbmp-0.0.3 \
	librosprite-0.0.2 \
; do	
	pushd "$d"
	%__make %{?jobs:-j%{jobs}} Q="" CC="%__cc" PREFIX="$DEP_PREFIX" OPTCFLAGS="%{optflags}" install
	popd
done

pushd "%{name}-%{version}"

%__make %{?jobs:-j%{jobs}} \
        TARGET=gtk \
        Q=""
popd

%install

pushd "%{name}-%{version}"
%__install -D -m0755 ./nsgtk "%{buildroot}%{_bindir}/netsurf"
%__install -d "%{buildroot}%{_datadir}"
%__cp -r --dereference gtk/res "%{buildroot}%{_datadir}/netsurf"
popd

%__install -D -m0644 "%{SOURCE3}" "%{buildroot}%{_datadir}/applications/%{name}.desktop"
%__install -D -m0644 "%{SOURCE4}" "%{buildroot}%{_datadir}/pixmaps/netsurf.png"

%suse_update_desktop_file %{name}

for d in \
	libparserutils-0.1.1 \
	libwapcaplet-0.1.1 \
	hubbub-0.1.2 \
	libcss-0.1.2 \
	libnsgif-0.0.3 \
	libnsbmp-0.0.3 \
	librosprite-0.0.2 \
; do
	%__install -D -m0644 "${d}/COPYING" "%{buildroot}%{_docdir}/%{name}/COPYING-${d}"
done

%clean
%__rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
%doc %{name}-%{version}/ChangeLog
%doc %{name}-%{version}/COPYING
%{_bindir}/%{name}
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/netsurf.png

%changelog