3 version
=`cat fbreader/VERSION`
4 tmpdir
=fbreader-
$version
6 if [ "$1" == "-non-GPL" ]; then
7 distdir
=distributions-nonGPL
19 echo " $0 [-non-GPL] <architecture>"
21 echo " $0 [-non-GPL] all"
23 echo "available architectures are:"
24 for pkgtype
in $distdir/*; do
25 for archtype
in $pkgtype/*; do
26 echo " `basename $archtype`-`basename $pkgtype`";
34 cp -r Makefile build_packages.sh zlibrary fbreader makefiles README.build
$distdir $tmpdir
35 rm -rf `find $tmpdir -name ".svn"`
36 make -C $tmpdir distclean
1> /dev
/null
2>&1
38 if [ "$prepare_nonGPL" == "true" ]; then
39 pushd $tmpdir > /dev
/null
;
40 echo -en "Removing Finnish localization... ";
41 rm -rf fbreader
/data
/resources
/fi.xml zlibrary
/core
/data
/resources
/fi.xml fbreader
/data
/help
/MiniHelp.
*.
fi.fb2
;
43 echo -en "Removing Swedish localization... ";
44 rm -rf fbreader
/data
/resources
/sv.xml zlibrary
/core
/data
/resources
/sv.xml fbreader
/data
/help
/MiniHelp.
*.sv.fb2
;
46 echo -en "Removing Czech hyphenation patterns... ";
47 zip -dq zlibrary
/text
/data
/hyphenationPatterns.
zip cs.pattern
;
49 echo -en "Removing Indonesian hyphenation patterns... ";
50 zip -dq zlibrary
/text
/data
/hyphenationPatterns.
zip id.pattern
;
52 echo -en "Removing Qt-based interface... ";
53 rm -rf zlibrary
/ui
/src
/qt zlibrary
/ui
/src
/qt4
64 make_package
="make -f makefiles/packaging.mk -C $tmpdir DIST_DIR=$distdir"
70 /scratchbox
/login sb-conf se SDK_ARM
71 /scratchbox
/login
-d src
/projects
/fbreader
$make_package ARCHITECTURE
=$1 $2
74 /scratchbox
/login sb-conf se SDK_ARMEL
75 /scratchbox
/login
-d src
/projects
/fbreader
$make_package ARCHITECTURE
=$1 $2
78 /scratchbox
/login sb-conf se CHINOOK_ARMEL
79 /scratchbox
/login
-d src
/projects
/fbreader
$make_package ARCHITECTURE
=$1 $2
82 $make_package ARCHITECTURE
=$1 $2
86 mv -f $tmpdir/*.deb
$tmpdir/*.dsc
$tmpdir/*.changes
$tmpdir/*.
tar.gz
$pkgdir/$1
89 $make_package ARCHITECTURE
=$1 $2
91 mv -f $tmpdir/*.ipk
$pkgdir/$1
94 $make_package ARCHITECTURE
=$1 $2
96 mv -f $tmpdir/*.pkg
$pkgdir/$1
99 $make_package ARCHITECTURE
=$1 $2
101 mv -f $tmpdir/*.tgz
$pkgdir/$1
104 $make_package ARCHITECTURE
=$1 $2
106 mv -f $tmpdir/*.exe
$pkgdir/$1
109 echo no rule is defined
for package
type ''$2'';
114 if [ $1 == all
]; then
116 for pkgtype
in $distdir/*; do
117 for archtype
in $pkgtype/*; do
118 build_package
`basename $archtype` `basename $pkgtype`;
123 archtype
=`echo $1 | cut -d "-" -f 1`;
124 pkgtype
=`echo $1 | cut -d "-" -f 2`;
125 extra
=`echo $1 | cut -d "-" -f 3`;
127 if [ "$pkgtype" != "" -a "$extra" == "" -a -d $distdir/$pkgtype/$archtype ]; then
129 build_package
$archtype $pkgtype
132 echo "unknown architecture: $1"