X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=trunk%2Fscripts%2Fbuild.sh;h=1d1e52fe29f1cfdf5637656fe0f0047d228b73eb;hb=d2fc22a8fb3f237b368e3a722d5c859aabe05805;hp=32e2b749443c3a244d61e50557a87a7554325305;hpb=0824d19dcb446a71cebb48d4320528e9795bd144;p=maemo-efl diff --git a/trunk/scripts/build.sh b/trunk/scripts/build.sh index 32e2b74..1d1e52f 100755 --- a/trunk/scripts/build.sh +++ b/trunk/scripts/build.sh @@ -5,29 +5,42 @@ components=$* export SBOX_DEFAULT_AUTOMAKE=1.8 -for component in $components ; do - echo "===== $component: preparing sources =====" - rm -rf ./$component - svn export https://garage.maemo.org/svn/maemo-efl/trunk/$component - cd $component - tar -zxf ../${component}_*.orig.tar.gz --strip-path 1 - #if [ -d debian/patches ] ; then - # quilt pop -a -f - # quilt push -a - #fi - #if [ -f configure.in ] ; then - # automake - # autoconf - #fi - PKG_VER=`dpkg-parsechangelog | sed -n 's/Version: //p'` - for build_variant in n770 n8x0 ; do +for build_variant in n770 n8x0 ; do + echo "===== building packages for $build_variant =====" + for component in $components ; do + echo "===== $component: preparing sources =====" + rm -rf ./$component + svn export https://garage.maemo.org/svn/maemo-efl/trunk/$component + + # Unpacking original tarball + cd $component + tar -zxf ../${component}_*.orig.tar.gz --strip-path 1 || exit + + # if this patch exists we have to patch here + if [ -f debian/patches/01_dont_overwrite_changelog ] ; then + QUILT_PATCHES=debian/patches quilt --quiltrc /dev/null push -a -f || exit + if [ -f configure.in ] ; then + automake + autoconf + fi + fi + # set build_variant suffix + PKG_VER=`dpkg-parsechangelog | sed -n 's/Version: //p'` NEW_VER=`echo $PKG_VER | sed "s/\($PKG_VER\)/\1.$build_variant/"` sed -ie "s/$PKG_VER.*)/$NEW_VER)/" debian/changelog rm -f debian/changeloge - echo "===== building $component package for $build_variant =====" + + echo "===== $component: building for $build_variant =====" + # FIXME: install build dependencies here DEB_BUILD_OPTIONS=$build_variant dpkg-buildpackage -rfakeroot -us -uc -sa -D || exit + + # install results + srcname=`grep Source: debian/control |cut -f2 -d' '` + grep '^ [a-f0-9]\+ [0-9]\+ [a-z]\+ [a-z]\+ .\+.deb' \ + ../${srcname}_${NEW_VER}_*.changes | cut -f6 -d' '|sed -e 's/^/..\//' \ + | xargs fakeroot dpkg -i || exit done cd .. done