~ubuntu-branches/ubuntu/oneiric/midori/oneiric-updates

« back to all changes in this revision

Viewing changes to win32/makedist/makedist.midori

  • Committer: Bazaar Package Importer
  • Author(s): Micah Gersten
  • Date: 2011-05-18 21:07:34 UTC
  • mfrom: (1.1.16 upstream) (3.3.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110518210734-232wzq1tc88gtz2p
Tags: 0.3.6-1ubuntu1
* Merge from debian unstable. (LP: #784944) Remaining changes:
  - debian/control:
    + Change build-depends from libwebkit-dev to libwebkitgtk-dev
  - debian/rules:
    + Change package query from libwebkit-dev to libwebkitgtk-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
 
 
3
# Copyright (C) 2010-2011 Peter de Ridder <peter@xfce.org>
 
4
#
 
5
# This library is free software; you can redistribute it and/or
 
6
# modify it under the terms of the GNU Lesser General Public
 
7
# License as published by the Free Software Foundation; either
 
8
# version 2.1 of the License, or (at your option) any later version.
 
9
#
 
10
# See the file COPYING for the full license text.
 
11
 
 
12
# a bit of configuration
 
13
root_dir=$MINGW_PREFIX
 
14
script_dir=$PWD
 
15
 
 
16
# create temporary working directory
 
17
temp_dir=`mktemp -d`
 
18
 
 
19
# generate unique filename
 
20
ARCHIVE=midori$1-`date +%Y%m%d%H%M`.zip
 
21
 
 
22
echo -n "Creating $ARCHIVE ."
 
23
 
 
24
# create destination folder
 
25
mkdir $temp_dir/midori$1
 
26
 
 
27
echo -n .
 
28
 
 
29
# auto generate dll list, only of existing files
 
30
pushd $root_dir/bin > /dev/null
 
31
$script_dir/dll-recursive.sh midori*.exe gspawn-*-helper*.exe libhunspell*.dll > $temp_dir/midori.exe.lst
 
32
files=`ls | cat - $temp_dir/midori.exe.lst | sort | uniq -d`
 
33
rm $temp_dir/midori.exe.lst
 
34
popd > /dev/null
 
35
 
 
36
echo -n .
 
37
 
 
38
# copy auto generate dll list
 
39
pushd $root_dir/bin > /dev/null
 
40
mkdir $temp_dir/midori$1/bin
 
41
cp $files $temp_dir/midori$1/bin
 
42
popd > /dev/null
 
43
 
 
44
echo -n .
 
45
 
 
46
# copy etc
 
47
pushd $root_dir > /dev/null
 
48
find etc "(" -name "*midori*" -o -name "gtkrc" ")" -prune -exec mkdir -p $temp_dir/midori$1/{} ";" -exec rmdir --ignore-fail-on-non-empty $temp_dir/midori$1/{} ";" -exec cp -r {} $temp_dir/midori$1/{} ";"
 
49
popd > /dev/null
 
50
 
 
51
echo -n .
 
52
 
 
53
# copy lib
 
54
pushd $root_dir > /dev/null
 
55
find lib "(" -path "lib/midori/*" -o -path "lib/gtk-2.0/*" -o -path "lib/enchant/*" -o -path "lib/engines/*" ")" -a -name "*.dll" -prune -exec mkdir -p $temp_dir/midori$1/{} ";" -exec rmdir --ignore-fail-on-non-empty $temp_dir/midori$1/{} ";" -exec cp -r {} $temp_dir/midori$1/{} ";"
 
56
popd > /dev/null
 
57
 
 
58
echo -n .
 
59
 
 
60
# copy share
 
61
pushd $root_dir > /dev/null
 
62
find share "(" -name "*midori*" -o -name "icons" -o -name "MS-Windows" -o -name "mime" ")" -prune -exec mkdir -p $temp_dir/midori$1/{} ";" -exec rmdir --ignore-fail-on-non-empty $temp_dir/midori$1/{} ";" -exec cp -r {} $temp_dir/midori$1/{} ";"
 
63
 
 
64
# copy locales for gtk
 
65
# so we have translated stock items, file dialogs
 
66
 
 
67
find share "(" -name "midori.mo" ")" >  locale.list
 
68
mkdir -p $temp_dir/midori$1/share/locale/
 
69
for LOCALE in $(cat locale.list); do
 
70
         LOCALE=$(echo $LOCALE|awk -F/ '{print $3}')
 
71
         cp /usr/share/locale/$LOCALE/LC_MESSAGES/gtk20.mo $temp_dir/midori$1/share/locale/$LOCALE/LC_MESSAGES/
 
72
done
 
73
rm locale.list
 
74
popd > /dev/null
 
75
 
 
76
echo -n .
 
77
 
 
78
# copy doc files to root
 
79
cp $temp_dir/midori$1/share/doc/midori/{COPYING,AUTHORS} $temp_dir/midori$1
 
80
 
 
81
echo -n .
 
82
 
 
83
ARCHIVE=`pwd`/$ARCHIVE
 
84
 
 
85
# store as tar.bz2 file
 
86
pushd $temp_dir > /dev/null
 
87
zip -rq $ARCHIVE midori$1
 
88
popd > /dev/null
 
89
 
 
90
echo -n .
 
91
 
 
92
# remove working directory
 
93
rm -r $temp_dir
 
94
 
 
95
echo " ready"
 
96