#!/bin/bash

#Do not have openssl-0.9.8.tcz shared libs installed during build.

HERE=`pwd`
BASEDIR=/mnt/hda6/links
PKG="$BASEDIR"/pkg

DEPS="compiletc.tcz bzip2-lib.tcz bzip2-dev.tcz bash.tcz openssl-1.0.0-static.tcz graphics-libs-1-dev.tcz graphics-libs-1.tcz"

tar xvf links-2.3.tar.xz
cd links-2.3
./configure --prefix=/usr/local --with-x --with-ssl=/usr/local/openssl-1.0.0 --with-libjpeg --enable-graphics --with-fb
make 
make install DESTDIR="$PKG"

mkdir -p "$PKG"/usr/local/share/applications
cp "$HERE"/links.desktop "$PKG"/usr/local/share/applications

strip --strip-unneeded "$PKG"/usr/local/bin/links
bzip2 "$PKG"/usr/local/man/man1/links.1
