2011-01-06 00:02:22 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# this is an small build script to create an package for nsgem
|
|
|
|
# invoke: mkpkg.sh [-s,-d,-8,-fonts]
|
|
|
|
#
|
2011-09-21 00:14:50 +04:00
|
|
|
# Parameters:
|
|
|
|
#
|
2011-01-06 00:02:22 +03:00
|
|
|
# -8
|
|
|
|
# Description: The package will be build for 8.3 filesystems
|
|
|
|
# This also defines the -fonts parameter
|
|
|
|
#
|
|
|
|
# -fonts
|
2011-09-21 00:14:50 +04:00
|
|
|
# Description: The package will include the DejaVu fonts package
|
2011-01-06 00:02:22 +03:00
|
|
|
# ( 8.3 compatible names )
|
|
|
|
#
|
|
|
|
# -fpath
|
|
|
|
# Description: Set path to dejavu Fonts
|
|
|
|
#
|
|
|
|
# -s (srcpath)
|
2011-09-21 00:14:50 +04:00
|
|
|
# Description: use it like: -s "path to netsurf root" to configure from which
|
|
|
|
# directory the package files are taken.
|
2011-01-06 00:02:22 +03:00
|
|
|
# The Path must have trailing slash!
|
2011-09-21 00:14:50 +04:00
|
|
|
#
|
2011-01-06 00:02:22 +03:00
|
|
|
# -d (dstpath)
|
|
|
|
# Description: use it like: -d "path to dir where the package will be placed"
|
2011-09-21 00:14:50 +04:00
|
|
|
# to configure the output path of this script.
|
2011-01-06 00:02:22 +03:00
|
|
|
# The path mus have trailing slash!
|
2011-09-21 00:14:50 +04:00
|
|
|
#
|
2011-01-06 00:02:22 +03:00
|
|
|
|
|
|
|
# config variable, set default values
|
2012-04-05 01:21:33 +04:00
|
|
|
src="/usr/src/netsurf-2.9/release/netsurf/2.9/"
|
|
|
|
dst="/tmp/nspkg/"
|
2011-01-06 00:02:22 +03:00
|
|
|
shortfs=0
|
|
|
|
inc_short_fonts=0
|
|
|
|
font_src="/usr/share/fonts/truetype/ttf-dejavu/"
|
|
|
|
framebuffer=0
|
|
|
|
|
|
|
|
while [ "$1" != "" ] # When there are arguments...
|
|
|
|
do # Process the next one
|
|
|
|
case $1 # Look at $1
|
|
|
|
in
|
|
|
|
-8)
|
|
|
|
shortfs="1"
|
|
|
|
shift
|
|
|
|
;;
|
2011-09-21 00:14:50 +04:00
|
|
|
|
|
|
|
-fonts)
|
2011-01-06 00:02:22 +03:00
|
|
|
inc_short_fonts="1"
|
|
|
|
shift
|
|
|
|
;;
|
2011-09-21 00:14:50 +04:00
|
|
|
|
2011-01-06 00:02:22 +03:00
|
|
|
-fpath)
|
|
|
|
shift
|
|
|
|
font_src=$1
|
|
|
|
shift
|
|
|
|
;;
|
2011-09-21 00:14:50 +04:00
|
|
|
|
2011-01-06 00:02:22 +03:00
|
|
|
-d)
|
|
|
|
shift
|
|
|
|
dst=$1
|
|
|
|
shift
|
|
|
|
;;
|
2011-09-21 00:14:50 +04:00
|
|
|
|
2011-01-06 00:02:22 +03:00
|
|
|
-s)
|
|
|
|
shift
|
|
|
|
src=$1
|
|
|
|
shift
|
|
|
|
;;
|
2011-09-21 00:14:50 +04:00
|
|
|
|
2011-01-06 00:02:22 +03:00
|
|
|
*) echo "Option [$1] not one of [-8,-fonts,-d,-s,-fpath]";
|
|
|
|
exit;;
|
2011-09-21 00:14:50 +04:00
|
|
|
|
2011-01-06 00:02:22 +03:00
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "Building from: "$src
|
|
|
|
echo "Building in: "$dst
|
|
|
|
echo "Building for short fs: "$shortfs
|
|
|
|
|
2011-09-21 00:14:50 +04:00
|
|
|
if [ "$shortfs" = "1" ]
|
2011-01-06 00:02:22 +03:00
|
|
|
then
|
|
|
|
inc_short_fonts=1
|
|
|
|
fi
|
|
|
|
|
2011-09-21 00:14:50 +04:00
|
|
|
if [ -d "$font_src" ]
|
2011-01-06 00:02:22 +03:00
|
|
|
then
|
|
|
|
echo "Found fonts in $font_src"
|
|
|
|
else
|
|
|
|
echo "Error: TTF Fonts not found ($font_src)!"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
set -o verbose
|
|
|
|
rm $dst -r
|
|
|
|
mkdir $dst
|
2011-02-02 00:28:51 +03:00
|
|
|
mkdir $dst"download"
|
2011-01-22 19:46:58 +03:00
|
|
|
mkdir $dst"res"
|
|
|
|
mkdir $dst"res/icons"
|
|
|
|
mkdir $dst"res/fonts"
|
2012-04-05 01:21:33 +04:00
|
|
|
touch $dst"res/cookies"
|
2011-02-23 00:08:09 +03:00
|
|
|
cp $src"atari/doc" $dst -R
|
2011-01-06 00:02:22 +03:00
|
|
|
cp $src"ns.prg" $dst
|
2012-04-05 01:21:33 +04:00
|
|
|
cp $src"ChangeLog" $dst
|
2011-01-06 00:02:22 +03:00
|
|
|
chmod +x $dst"ns.prg"
|
2011-12-07 01:06:41 +04:00
|
|
|
m68k-atari-mint-strip $dst"ns.prg"
|
|
|
|
m68k-atari-mint-stack -S 256k $dst"ns.prg"
|
2011-01-06 00:02:22 +03:00
|
|
|
|
|
|
|
cp $src"atari/res/" $dst -rL
|
2011-12-07 01:06:41 +04:00
|
|
|
cp $src"!NetSurf/Resources/AdBlock,f79" $dst"res/adblock.css" -rL
|
|
|
|
cp $src"!NetSurf/Resources/CSS,f79" $dst"res/default.css" -rL
|
|
|
|
cp $src"!NetSurf/Resources/Quirks,f79" $dst"res/quirks.css" -rL
|
|
|
|
cp $src"!NetSurf/Resources/internal.css,f79" $dst"res/internal.css" -rL
|
|
|
|
cp $src"!NetSurf/Resources/SearchEngines" $dst"res/search" -rL
|
|
|
|
cp $src"!NetSurf/Resources/ca-bundle" $dst"res/cabundle" -rL
|
|
|
|
cp $src"!NetSurf/Resources/en/Messages" $dst"res/messages" -rL
|
|
|
|
cp $src"!NetSurf/Resources/Icons/content.png" $dst"res/icons/content.png" -rL
|
|
|
|
cp $src"!NetSurf/Resources/Icons/directory.png" $dst"res/icons/dir.png" -rL
|
2011-01-06 00:02:22 +03:00
|
|
|
|
2011-09-21 00:14:50 +04:00
|
|
|
#remove uneeded files:
|
2011-01-06 00:02:22 +03:00
|
|
|
rm $dst"res/netsurf.rsm"
|
|
|
|
rm $dst"res/netsurf.rsh"
|
2011-12-07 01:06:41 +04:00
|
|
|
rm $dst"res/.svn" -r
|
|
|
|
rm $dst"res/icons/.svn" -r
|
|
|
|
rm $dst"res/fonts/.svn" -r
|
|
|
|
rm $dst"doc/.svn" -r
|
|
|
|
rm $dst"download/.svn" -r
|
2011-01-06 00:02:22 +03:00
|
|
|
|
|
|
|
if [ "$inc_short_fonts" = "1" ]
|
2011-09-21 00:14:50 +04:00
|
|
|
then
|
2011-01-06 00:02:22 +03:00
|
|
|
cp $font_src"DejaVuSans.ttf" $dst"res/fonts/ss.ttf"
|
|
|
|
cp $font_src"DejaVuSans-Bold.ttf" $dst"res/fonts/ssb.ttf"
|
|
|
|
cp $font_src"DejaVuSans-Oblique.ttf" $dst"res/fonts/ssi.ttf"
|
|
|
|
cp $font_src"DejaVuSans-BoldOblique.ttf" $dst"res/fonts/ssib.ttf"
|
|
|
|
cp $font_src"DejaVuSansMono.ttf" $dst"res/fonts/mono.ttf"
|
|
|
|
cp $font_src"DejaVuSansMono-Bold.ttf" $dst"res/fonts/monob.ttf"
|
|
|
|
cp $font_src"DejaVuSansMono-Oblique.ttf" $dst"res/fonts/cursive.ttf"
|
|
|
|
cp $font_src"DejaVuSerif.ttf" $dst"res/fonts/s.ttf"
|
2011-01-11 02:55:39 +03:00
|
|
|
cp $font_src"DejaVuSerif-Bold.ttf" $dst"res/fonts/sb.ttf"
|
2011-01-06 00:02:22 +03:00
|
|
|
cp $font_src"DejaVuSerifCondensed-Bold.ttf" $dst"res/fonts/fantasy.ttf"
|
|
|
|
fi
|
|
|
|
|
2011-09-21 00:14:50 +04:00
|
|
|
#create an simple startup script:
|
|
|
|
if [ "$framebuffer" = "1" ]
|
2011-01-06 00:02:22 +03:00
|
|
|
then
|
|
|
|
echo "NETSURFRES=./res/
|
|
|
|
export NETSURFRES
|
|
|
|
./nsfb.prg -v file:///f/" > $dst"ns.sh"
|
|
|
|
chmod +x $dst"ns.sh"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "
|
|
|
|
atari_screen_driver:vdi
|
2011-12-10 05:02:19 +04:00
|
|
|
# select font driver, available values: freetype, internal
|
2011-01-06 00:02:22 +03:00
|
|
|
atari_font_driver:freetype
|
2011-02-12 22:50:36 +03:00
|
|
|
atari_transparency:1
|
2011-09-21 00:14:50 +04:00
|
|
|
atari_realtime_move:1
|
2011-12-10 05:02:19 +04:00
|
|
|
# uncomment the following to show source within editor:
|
|
|
|
#atari_editor:/path/to/editor.app
|
|
|
|
|
|
|
|
# url to start netsurf with ( and new windows )
|
2011-02-23 00:08:09 +03:00
|
|
|
homepage_url:file://./res/blank
|
2011-12-10 05:02:19 +04:00
|
|
|
|
|
|
|
#configure css font settings:
|
|
|
|
font_size:130
|
|
|
|
font_min_size:120
|
|
|
|
|
2012-04-05 01:21:33 +04:00
|
|
|
# 20 MB Cache as default:
|
2011-12-10 05:02:19 +04:00
|
|
|
memory_cache_size:2048512
|
|
|
|
|
|
|
|
# this actually hides advertisements, it still generates network traffic:
|
|
|
|
block_advertisements:0
|
|
|
|
|
|
|
|
#network configuration:
|
|
|
|
send_referer:1
|
2011-01-06 00:02:22 +03:00
|
|
|
http_proxy:0
|
|
|
|
http_proxy_host:
|
|
|
|
http_proxy_port:8123
|
|
|
|
http_proxy_auth:0
|
|
|
|
http_proxy_auth_user:
|
|
|
|
http_proxy_auth_pass:
|
|
|
|
suppress_curl_debug:1
|
2011-12-10 05:02:19 +04:00
|
|
|
|
|
|
|
# animation configuration ( GIF ):
|
|
|
|
minimum_gif_delay:50
|
2011-01-06 00:02:22 +03:00
|
|
|
animate_images:1
|
2011-12-10 05:02:19 +04:00
|
|
|
|
2012-04-05 01:21:33 +04:00
|
|
|
foreground_images:1
|
|
|
|
background_images:1
|
|
|
|
|
|
|
|
|
2011-12-10 05:02:19 +04:00
|
|
|
# path configuration
|
2011-01-06 00:02:22 +03:00
|
|
|
ca_bundle:./res/cabundle
|
|
|
|
ca_path:./res/certs
|
2011-02-12 22:50:36 +03:00
|
|
|
cookie_file:./res/cookies
|
|
|
|
url_file:./res/url.db
|
2011-09-21 00:14:50 +04:00
|
|
|
tree_icons_path:./res/icons
|
2012-04-05 01:21:33 +04:00
|
|
|
downloads_path:./download
|
|
|
|
hotlist_file:./res/hotlist
|
2011-12-10 05:02:19 +04:00
|
|
|
|
|
|
|
# enable reflow for interactive content and during fetch:
|
2011-01-06 00:02:22 +03:00
|
|
|
incremental_reflow:1
|
2011-12-10 05:02:19 +04:00
|
|
|
# reformat time during fetch:
|
2012-04-05 01:21:33 +04:00
|
|
|
min_reflow_period:2500
|
2011-01-06 00:02:22 +03:00
|
|
|
core_select_menu:1
|
2011-12-07 01:06:41 +04:00
|
|
|
max_fetchers:3
|
2011-01-06 00:02:22 +03:00
|
|
|
max_fetchers_per_host:2
|
2011-12-07 01:06:41 +04:00
|
|
|
max_cached_fetch_handles:5
|
2011-12-10 05:02:19 +04:00
|
|
|
|
|
|
|
# allow target=_blank (link opens in new window):
|
2011-01-06 00:02:22 +03:00
|
|
|
target_blank:1
|
2011-12-10 05:02:19 +04:00
|
|
|
|
|
|
|
# options nowhere used currently follow:
|
|
|
|
|
|
|
|
# suppres images when exporting pages (to PDF):
|
|
|
|
# suppress_images:0
|
|
|
|
# turn off backgrounds for printed content:
|
|
|
|
#remove_backgrounds:0
|
|
|
|
# smooth resizing:
|
|
|
|
#render_resample:1
|
|
|
|
# enable loosening for printed content:
|
|
|
|
#enable_loosening:1
|
|
|
|
# configure disc cache ( currently not implemented )
|
2012-04-05 01:21:33 +04:00
|
|
|
#option_disc_cache_age:28
|
|
|
|
#configure urldb (url search):
|
2011-12-10 05:02:19 +04:00
|
|
|
#expire_url:28
|
|
|
|
#hover_urls:1
|
2011-01-06 00:02:22 +03:00
|
|
|
" > $dst"Choices"
|
|
|
|
|
|
|
|
cd $dst
|
2011-02-23 00:08:09 +03:00
|
|
|
tar cvf - ./* | gzip -9 -c > netsurf.tar.gz
|
|
|
|
zip netsurf.zip -9 -r ./ -x netsurf.tar.gz
|
2011-01-06 00:02:22 +03:00
|
|
|
|
|
|
|
echo
|
|
|
|
exit 0
|