use DEB_BUILD_OPTIONS for building variants
authored_ <bartosh@gmail.com>
Sun, 9 Dec 2007 15:41:10 +0000 (15:41 +0000)
committered_ <bartosh@gmail.com>
Sun, 9 Dec 2007 15:41:10 +0000 (15:41 +0000)
trunk/scripts/build.sh

index 7dd8bf4..a955b87 100755 (executable)
@@ -6,22 +6,30 @@ components=$*
 export SBOX_DEFAULT_AUTOMAKE=1.8
 
 for component in $components ; do 
-       echo "building $component package"
+       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-components=1
-       if [ -d debian/patches ] ; then
-               quilt pop -a -f
-               quilt push -a
-       fi
-       if [ -f configure.in ] ; then
-               automake
-               autoconf
-       fi
-       # FIXME: install build dependencies here
-       dpkg-buildpackage -rfakeroot -us -uc -sa -D || exit
+       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
+       for build_variant in n770 n8x0 ; do
+               # set build_variant suffix
+               PKG_VER=`dpkg-parsechangelog | sed -n 's/Version: //p'`
+               NEW_VER=`echo $PKG_VER | sed 's/\([^-]\+-maemo\.[0-9]\+\).*/\1.n770/'`
+               sed -ie "s/$PKG_VER/$NEW_VER/" debian/changelog
+               rm -f debian/changeloge
+               exit
+               echo "===== building $component package for $build_variant ====="
+               # FIXME: install build dependencies here
+               DEB_BUILD_OPTIONS=$build_variant dpkg-buildpackage -rfakeroot -us -uc -sa -D || exit
+       done
        cd ..
-       fakeroot dpkg -i *$component*deb || exit
 done