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
41 # Cleanup install folders
43 rm -rf $BIN/{contrib,include,man,manifest,src,*.txt}
44 rm -rf $BIN/share/{aclocal,glib,gtk,locale,man,doc}*
45 rm -f $BIN/lib/GNU.Gettext.dll
46 rm -rf $BIN/etc/bash_completion.d
47 find "$BIN/bin/" "$BIN/lib/" -type f \
48 -and -not -name '*.dll' \
49 -and -not -name '*.cache' \
50 -and -not -name 'gspawn-*' \
52 find "$BIN/bin/" "$BIN/lib/" -type f \
53 -and -not -name 'libxml*dll' \
54 -and -not -name 'iconv.dll' \
55 -exec strip -s "{}" ";"
56 find "$BIN" -type d -delete 2>/dev/null
59 cp /usr/lib/pkgconfig/libxml-2.0.pc $DEV/lib/pkgconfig
60 rename libxml2.dll libxml2-2.dll {$DEV,$BIN}/bin/*
62 i686-pc-mingw32-gcc -Wall -mwindows -o $BIN/bin/xdg-open.exe mingw/xdg-open.c
63 cp mingw/gtkrc $BIN/etc/gtk-2.0/gtkrc
64 cp mingw/pango.aliases $BIN/etc/pango/pango.aliases
67 sed -i 's!^prefix=.*!prefix=/usr/i686-pc-mingw32!' \
68 $DEV/lib/pkgconfig/*.pc
70 # Install custom programs
71 # grits - DESTDIR=/usr/i686-pc-mingw32 make install
72 # rsl - DESTDIR=/usr/i686-pc-mingw32 make install
73 # aweather - DESTDIR=/usr/i686-pc-mingw32 make install