A Crux port for NetSurf

Continuing in my quest for esoteric, lightweight software for my Crux systems, I managed to convert the AUR PKGBUILD for NetSurf over to Crux. Here are the results.

# Description: Lightweight, fast web browser
# URL: http://www.netsurf-browser.org
# Maintainer:
# Packager:
# Depends on: libmng curl libglade librsvg lcms re2c

name=netsurf
version=1.2
release=1
source=(http://www.netsurf-browser.org/downloads/releases/$name-$version-src.tar.gz \
	http://www.sqlite.org/cvstrac/getfile/sqlite/tool/lemon.c \

http://www.sqlite.org/cvstrac/getfile/sqlite/tool/lempar.c)

build() {
	cd $name

	cp ../lempar.c .
	gcc ../lemon.c -o lemon
	PATH=`pwd`:$PATH

	make || return 1
	sed -i -e 's|NETSURFRES=`dirname $0`/gtk/res/|NETSURFRES=`dirname $0`/../share/netsurf/res/|' netsurf
	sed -i -e 's|exec `dirname $0`/nsgtk "$@" 2>$LOG|exec `dirname $0`/../share/netsurf/nsgtk "$@" 2>$LOG|' netsurf

	install -d ../../pkg/usr/bin ../../pkg/usr/share/netsurf
	install nsgtk ../../pkg/usr/bin
	ln -s nsgtk ../../pkg/usr/bin/netsurf
	rm -rf gtk/res/.svn gtk/res/docs/.svn
	cp -RL gtk/res/* ../../pkg/usr/share/netsurf

	rm -rf ../src/$_svnmod-build
}

Note that this relies on four or five packages from outside the standard core/xorg/opt/contrib array. All of them are available through the search system, usually in the han or romster ports. Make sure you check the versions on those searched ports though; I generally don’t add outside repositories because many of them are out of date.

NetSurf is primitive when compared to browsers like Firefox, but Firefox takes about five hours to compile on a sub-500Mhz machine, whereas all of NetSurf, from start to finish, takes about 15 minutes.

And NetSurf does a pretty good job. It’s not perfect, and there are a lot of things I would like to see added or improved, but in the mean time it’s a working, functional browser for a system that runs exceedingly light. Whether or not it will fit the bill for your old machine running Crux … is for you to decide. :)

About these ads

One thought on “A Crux port for NetSurf

  1. spc

    Thank You!!
    Just what I was looking for – simply wanted a lightweight browser and I’m not toeager to compile webkit (3h) in order to have midori.
    Cheers.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s