4 bin=false; dev=false; ext=false;
5 eval set -- "`getopt -n "$0" -o bdx -l bin,dev,ext -- "$@"`"
6 while [ ! "$1" == "--" ]; do
16 sub=$(basename "${zip/.zip/}")
18 $ext && unzip "$zip" -d "$tmp/$sub" \
19 || unzip "$zip" -d "$tmp"
20 $dev && rsync -a "$tmp/$sub/" "$DEV/"
21 $bin && rsync -a "$tmp/$sub/" "$BIN/"
26 DEV=/usr/i686-pc-mingw32-2.24
27 BIN=/scratch/aweather-win32/local/gtk/gtk-2.24
30 rsync -a /usr/i686-pc-mingw32-clean/ "$DEV/"
33 extract -bdx /scratch/aweather/local/extern/gtk+-bundle_2.24.8-20111122_win32.zip
34 extract -bd /scratch/aweather/local/extern/iconv-1.9.2.win32.zip
35 extract -bd /scratch/aweather/local/extern/libxml2-2.7.6.win32.zip
36 extract -bx /scratch/aweather/local/extern/libsoup_2.26.3-1_win32.zip
37 extract -dx /scratch/aweather/local/extern/libsoup-dev_2.26.3-1_win32.zip
38 extract -bx /scratch/aweather/local/extern/bzip2-1.0.5-bin.zip
39 extract -dx /scratch/aweather/local/extern/bzip2-1.0.5-lib.zip
40 #extract -dx /scratch/aweather/local/extern/freeglut-MinGW-2.8.0-1.mp.zip
42 # Cleanup install folders
44 rm -rf $BIN/{contrib,include,man,manifest,src,*.txt}
45 rm -rf $BIN/share/{aclocal,glib,gtk,locale,man,doc}*
46 rm -f $BIN/lib/GNU.Gettext.dll
47 rm -rf $BIN/etc/bash_completion.d
48 find "$BIN/bin/" "$BIN/lib/" -type f \
49 -and -not -name '*.dll' \
50 -and -not -name '*.cache' \
51 -and -not -name 'gspawn-*' \
53 find "$BIN/bin/" "$BIN/lib/" -type f \
54 -and -not -name 'libxml*dll' \
55 -and -not -name 'iconv.dll' \
56 -exec strip -s "{}" ";"
57 find "$BIN" -type d -delete 2>/dev/null
60 cp /usr/lib/pkgconfig/libxml-2.0.pc $DEV/lib/pkgconfig
61 rename libxml2.dll libxml2-2.dll {$DEV,$BIN}/bin/*
63 i686-pc-mingw32-gcc -Wall -mwindows -o $BIN/bin/xdg-open.exe xdg-open.c
64 cp gtkrc $BIN/etc/gtk-2.0/gtkrc
65 cp pango.aliases $BIN/etc/pango/pango.aliases
68 sed -i 's!^prefix=.*!prefix=/usr/i686-pc-mingw32!' \
69 $DEV/lib/pkgconfig/*.pc
71 # Install custom programs
72 # grits - DESTDIR=/usr/i686-pc-mingw32 make install
73 # rsl - DESTDIR=/usr/i686-pc-mingw32 make install
74 # aweather - DESTDIR=/usr/i686-pc-mingw32 make install