# Build package from commit with "synfigstudio-0.62.00" tag
# ./synfigstudio-linux-build.sh package synfigstudio-0.62.00
#
+# Note: Make sure to run "git clean -f -x -d" after you switch branches.
+#
# = TODO =
# - debuginfo packages
PACKAGES_PATH=$HOME/synfig-packages # path where to write packages files
PACKAGES_BUILDROOT=/tmp/synfig-buildroot # path of for build infrastructure
+MAKE_THREADS=2 #count of threads for make
# full = clean, configure, make
# standart = configure, make
cd libsigc++-${LIBSIGCPP}
#make clean || true
./configure --prefix=${PREFIX}/ --includedir=${PREFIX}/include --disable-static --enable-shared
- make -j2
+ make -j$MAKE_THREADS
make install
cd ..
popd
cd glibmm-${GLIBMM}
#[[ $DOCLEAN == 1 ]] && make clean || true
./configure --prefix=${PREFIX} --includedir=${PREFIX}/include --disable-static --enable-shared --disable-fulldocs
- make -j2
+ make -j$MAKE_THREADS
make install
cd ..
popd
cd libxml++-${LIBXMLPP}
#[[ $DOCLEAN == 1 ]] && make clean || true
./configure --prefix=${PREFIX} --includedir=${PREFIX}/include --disable-static --enable-shared
- make -j2
+ make -j$MAKE_THREADS
make install
cd ..
popd
--without-openexr
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
- make -j2
+ make -j$MAKE_THREADS
make install
cd ..
popd
cd glew
#[[ $DOCLEAN == 1 ]] && make clean || true
sed -i -e 's/\r//g' config/config.guess
- make -j2
+ make -j$MAKE_THREADS
make install GLEW_DEST=${PREFIX} libdir=/lib bindir=/bin includedir=/include
cd ..
popd
cd cairomm-${CAIROMM}
#[[ $DOCLEAN == 1 ]] && make clean || true
./configure --prefix=${PREFIX} --includedir=${PREFIX}/include --disable-static --enable-shared --enable-docs=no
- make -j2
+ make -j$MAKE_THREADS
make install
cd ..
fi
cd gtkmm-${GTKMM}
#[[ $DOCLEAN == 1 ]] && make clean || true
./configure --prefix=${PREFIX} --includedir=${PREFIX}/include --disable-static --enable-shared --disable-examples --disable-demos --disable-docs
- make -j2
+ make -j$MAKE_THREADS
make install
cd ..
popd
cd freeglut-${FREEGLUT}
#[[ $DOCLEAN == 1 ]] && make clean || true
./configure --prefix=${PREFIX} --includedir=${PREFIX}/include --disable-static --disable-warnings --enable-shared
- make -j2
+ make -j$MAKE_THREADS
make install
cd ..
popd
cd unix
#[[ $DOCLEAN == 1 ]] && make clean || true
./configure --prefix=${PREFIX} --includedir=${PREFIX}/include --disable-static --enable-shared --with-gl-inc=${PREFIX}/include --with-gl-lib=${PREFIX}/lib --with-glut-inc=${PREFIX}/include --with-glut-lib=${PREFIX}/lib --with-x
- make all -j2
+ make all -j$MAKE_THREADS
make install
cd ..
popd
cd gtkglext-${GTKGLEXT}
#[[ $DOCLEAN == 1 ]] && make clean || true
./configure --prefix=${PREFIX} --includedir=${PREFIX}/include --disable-gtk-doc --disable-static --enable-shared
- make -j2
+ make -j$MAKE_THREADS
make install
cd ..
popd
cd gtkglextmm-${GTKGLEXTMM}
#[[ $DOCLEAN == 1 ]] && make clean || true
./configure --prefix=${PREFIX} --includedir=${PREFIX}/include --disable-dependency-tracking --disable-static --enable-shared
- make -j2
+ make -j$MAKE_THREADS
make install
popd
cd ..
[ ! -d git-${GITVERSION} ] && tar -xjf git-${GITVERSION}.tar.bz2
cd git-${GITVERSION}
./configure
- make -j2
+ make -j$MAKE_THREADS
make install
cd ..
popd
mkETL()
{
-if [ -d ${SYNFIG_REPO_DIR}/ETL/trunk ]; then
+if [ -f ${SYNFIG_REPO_DIR}/ETL/trunk/configure.ac ]; then
pushd ${SYNFIG_REPO_DIR}/ETL/trunk
else
pushd ${SYNFIG_REPO_DIR}/ETL
echo "Going to configure..."
rm -f aclocal.m4
autoreconf --install --force
- bash ./configure --prefix=${PREFIX} --includedir=${PREFIX}/include $DEBUG
+ /bin/sh ./configure --prefix=${PREFIX} --includedir=${PREFIX}/include $DEBUG
fi
-make -j2
+make -j$MAKE_THREADS
make install
popd
mksynfig()
{
-if [ -d ${SYNFIG_REPO_DIR}/synfig-core/trunk ]; then
+if [ -d ${SYNFIG_REPO_DIR}/synfig-core/trunk/configure.ac ]; then
pushd ${SYNFIG_REPO_DIR}/synfig-core/trunk
else
pushd ${SYNFIG_REPO_DIR}/synfig-core
sed -i 's/^AC_CONFIG_SUBDIRS(libltdl)$/m4_ifdef([_AC_SEEN_TAG(libltdl)], [], [AC_CONFIG_SUBDIRS(libltdl)])/' configure.ac || true
sed -i 's/^# AC_CONFIG_SUBDIRS(libltdl)$/m4_ifdef([_AC_SEEN_TAG(libltdl)], [], [AC_CONFIG_SUBDIRS(libltdl)])/' configure.ac || true
autoreconf --install --force
- bash ./configure --prefix=${PREFIX} --includedir=${PREFIX}/include --disable-static --enable-shared --with-magickpp --without-libavcodec $DEBUG
+ /bin/sh ./configure --prefix=${PREFIX} --includedir=${PREFIX}/include --disable-static --enable-shared --with-magickpp --without-libavcodec $DEBUG
fi
#It looks like mod_libavcodec causes segfault on synfig-core when rendering to png.
# export LDFLAGS=''
#fi
-make -j2
+make -j$MAKE_THREADS
make install
popd
mksynfigstudio()
{
-if [ -d ${SYNFIG_REPO_DIR}/synfig-studio/trunk ]; then
+if [ -d ${SYNFIG_REPO_DIR}/synfig-studio/trunk/configure.ac ]; then
pushd ${SYNFIG_REPO_DIR}/synfig-studio/trunk
else
pushd ${SYNFIG_REPO_DIR}/synfig-studio
if [[ $MODE != 'quick' ]]; then
autoreconf --install --force
- bash ./configure --prefix=${PREFIX} --includedir=${PREFIX}/include --disable-static --enable-shared $DEBUG
+ /bin/sh ./configure --prefix=${PREFIX} --includedir=${PREFIX}/include --disable-static --enable-shared $DEBUG
fi
-make -j2
+make -j$MAKE_THREADS
make install
for n in AUTHORS COPYING NEWS README
echo
#echo "http_proxy =====" $http_proxy
#env
- sudo apt-get update
+ sudo apt-get update || true
sudo apt-get install -y $PKG_LIST
fi
else
fi
BREED=${BREED%_master}
fi
+ if [[ ${VERSION##*-RC} != ${VERSION} ]]; then
+ if [[ $BREED == 'master' ]]; then
+ BREED=rc${VERSION##*-RC}
+ else
+ BREED=rc${VERSION##*-RC}.$BREED
+ fi
+ VERSION=${VERSION%%-*}
+ fi
[[ $DEBUG == 1 ]] && BREED=${BREED}_debug
REVISION=`git show --pretty=medium $SELECTEDREVISION | head -n 3 |tail -n 1 | sed 's/Date: *//' | sed 's/ +.*//'`
REVISION=`date --date="${REVISION}" +%Y%m%d`
if [[ `cat /etc/chroot.id` == "Synfig Packages Buildroot" ]]; then
echo "We are in chroot now."
- echo "[user]" > $HOME/.gitconfig
- echo "email = packages@synfig.org" >> $HOME/.gitconfig
- echo "name = Synfig Packager" >> $HOME/.gitconfig
+ echo "[user]" > /root/.gitconfig
+ echo "email = packages@synfig.org" >> /root/.gitconfig
+ echo "name = Synfig Packager" >> /root/.gitconfig
else
[ -d $HOME/synfig-packages ] || mkdir -p $HOME/synfig-packages
#DEB_LIST="build-essential,autoconf,automake,libltdl3-dev,libtool,gettext,cvs,libpng12-dev,libjpeg62-dev,libfreetype6-dev,libfontconfig1-dev,libgtk2.0-dev,libxml2-dev,bzip2,rpm,alien,xsltproc"
- for ARCH in i386 amd64; do
+ for ARCH in amd64 i386; do
if [[ $ARCH == 'i386' ]];then
SETARCH='linux32'
else
SETARCH='linux64'
fi
if ! [ -e $PACKAGES_BUILDROOT.$ARCH/etc/chroot.id ]; then
- debootstrap --arch=$ARCH --variant=buildd --include=sudo etch $PACKAGES_BUILDROOT.$ARCH http://ftp.us.debian.org/debian
+ debootstrap --arch=$ARCH --variant=buildd --include=sudo etch $PACKAGES_BUILDROOT.$ARCH http://archive.debian.org/debian
fi
#set chroot ID
echo "Synfig Packages Buildroot" > $PACKAGES_BUILDROOT.$ARCH/etc/chroot.id