mirror of
https://github.com/meganz/MEGAcmd
synced 2025-08-31 13:55:10 +00:00
Adjust Synology build scripts
This commit is contained in:
@@ -18,7 +18,7 @@ build_package() {
|
|||||||
|
|
||||||
if [ -e /toolkit/build_env/ds.$platform-6.1/ ] ; then
|
if [ -e /toolkit/build_env/ds.$platform-6.1/ ] ; then
|
||||||
echo "cleaning old build of $platform"
|
echo "cleaning old build of $platform"
|
||||||
rm -rf /toolkit/build_env/ds.$platform-6.1/
|
rm -rf /toolkit/build_env/ds.$platform-6.1/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
./pkgscripts-ng/EnvDeploy -v 6.1 -p $platform -t /toolkit/toolkit_tarballs/
|
./pkgscripts-ng/EnvDeploy -v 6.1 -p $platform -t /toolkit/toolkit_tarballs/
|
||||||
@@ -45,7 +45,7 @@ build_package() {
|
|||||||
MEGACMD_VERSION="\"$MAJOR.$MINOR.$MICRO\""
|
MEGACMD_VERSION="\"$MAJOR.$MINOR.$MICRO\""
|
||||||
sed -i source/megacmdpkg/INFO.sh -e "s/^version=.*/version=$MEGACMD_VERSION/"
|
sed -i source/megacmdpkg/INFO.sh -e "s/^version=.*/version=$MEGACMD_VERSION/"
|
||||||
|
|
||||||
./pkgscripts-ng/PkgCreate.py -i -p $platform megacmdpkg
|
./pkgscripts-ng/PkgCreate.py -i -p $platform megacmdpkg
|
||||||
|
|
||||||
echo "Signing!"
|
echo "Signing!"
|
||||||
tar -xf syn-sign-key -C /toolkit/build_env/ds.$platform-6.1/root/
|
tar -xf syn-sign-key -C /toolkit/build_env/ds.$platform-6.1/root/
|
||||||
@@ -59,13 +59,12 @@ build_package() {
|
|||||||
|
|
||||||
mkdir -p synology_build_results/image-$platform
|
mkdir -p synology_build_results/image-$platform
|
||||||
cp -r /toolkit/build_env/ds.$platform-6.1/image synology_build_results/image-$platform
|
cp -r /toolkit/build_env/ds.$platform-6.1/image synology_build_results/image-$platform
|
||||||
|
|
||||||
rm -rf /toolkit/build_env/ds.$platform-6.1/
|
|
||||||
else
|
else
|
||||||
echo "------- $platform build failed -----"
|
echo "------- $platform build failed -----"
|
||||||
echo "whimper" > synology_build_results/$platform.failed
|
echo "whimper" > synology_build_results/$platform.failed
|
||||||
fi
|
fi
|
||||||
|
cp /toolkit/build_env/ds.$platform-6.1/logs.build /toolkit/synology_build_results/$platform.logs.build
|
||||||
|
rm -rf /toolkit/build_env/ds.$platform-6.1/
|
||||||
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -75,5 +74,3 @@ mkdir -p synology_build_results
|
|||||||
for p in `./pkgscripts-ng/EnvDeploy -v 6.1 --list | grep -o "[^:]*$" ` ; do
|
for p in `./pkgscripts-ng/EnvDeploy -v 6.1 --list | grep -o "[^:]*$" ` ; do
|
||||||
build_package $p
|
build_package $p
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,8 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
# SynoBuildConf/build
|
# SynoBuildConf/build
|
||||||
|
set -x
|
||||||
|
env
|
||||||
|
|
||||||
mkdir ./MEGAcmd/sdk/sdk_build
|
mkdir ./MEGAcmd/sdk/sdk_build
|
||||||
mkdir ./MEGAcmd/sdk/sdk_build/install
|
|
||||||
mkdir ./MEGAcmd/sdk/sdk_build/install/lib
|
local_install_dir=$PWD/MEGAcmd/sdk/sdk_build/install
|
||||||
|
mkdir $local_install_dir
|
||||||
|
mkdir $local_install_dir/lib
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS="no-dependencies"
|
AUTOMAKE_OPTIONS="no-dependencies"
|
||||||
|
|
||||||
@@ -14,10 +19,11 @@ export SPECIAL_OPENSSL_CONFIG_PARAMS=""
|
|||||||
|
|
||||||
export CC=$CC
|
export CC=$CC
|
||||||
export CXX=$CXX
|
export CXX=$CXX
|
||||||
|
$CXX --version
|
||||||
export LD=$LD
|
export LD=$LD
|
||||||
export CFLAGS="$CFLAGS -O2 -fexceptions -fvisibility=hidden -static"
|
export CFLAGS="$CFLAGS -O2 -fexceptions -fvisibility=hidden -static"
|
||||||
export CPPFLAGS="$CPPFLAGS -DNDEBUG"
|
export CPPFLAGS="$CPPFLAGS -DNDEBUG"
|
||||||
export CXXFLAGS="-std=c++11 $CFLAGS -DNDEBUG -DENABLE_BACKUPS -DMEGACMD_USERAGENT_SUFFIX=Synology -DHAVE_LIBUV -std=c++11"
|
export CXXFLAGS="-std=c++0x $CFLAGS -DNDEBUG -DENABLE_BACKUPS -DMEGACMD_USERAGENT_SUFFIX=Synology -DHAVE_LIBUV"
|
||||||
export AR=$AR
|
export AR=$AR
|
||||||
export NM=$NM
|
export NM=$NM
|
||||||
export STRIP=$STRIP
|
export STRIP=$STRIP
|
||||||
@@ -149,7 +155,7 @@ pwd
|
|||||||
mkdir -p norecurse
|
mkdir -p norecurse
|
||||||
mv norecurse/* .
|
mv norecurse/* .
|
||||||
|
|
||||||
./contrib/build_sdk.sh -a -e $suppress_freeimage_flag -g -I -n -q -R -v -X -0 -C "$CUSTOM_CONFIG_ARGS" -O $OS_COMPILER_FOR_OPENSSL -S "$SPECIAL_OPENSSL_CONFIG_PARAMS" 2>&1 | tee /mybuildlogs-sdkbuild.out
|
./contrib/build_sdk.sh -a -e $suppress_freeimage_flag -g -I -q -R -v -X -0 -C "$CUSTOM_CONFIG_ARGS" -O $OS_COMPILER_FOR_OPENSSL -S "$SPECIAL_OPENSSL_CONFIG_PARAMS" 2>&1 | tee /mybuildlogs-sdkbuild.out
|
||||||
|
|
||||||
if ! [ -e src/libmega.la ] ; then
|
if ! [ -e src/libmega.la ] ; then
|
||||||
echo "libtool could not link it so we do it ourselves. Including Zen and MediaInfo somehow reference a nonexistent path /home/chingfen in the Synology libtool libraries. If we left those out it would make the lib ok."
|
echo "libtool could not link it so we do it ourselves. Including Zen and MediaInfo somehow reference a nonexistent path /home/chingfen in the Synology libtool libraries. If we left those out it would make the lib ok."
|
||||||
@@ -176,7 +182,7 @@ echo -------------------------------------------------------- sdk end ----------
|
|||||||
echo about to build megacmd ---------------------------
|
echo about to build megacmd ---------------------------
|
||||||
|
|
||||||
sh autogen.sh 2>&1 | tee /mybuildlogs-autogen2.out
|
sh autogen.sh 2>&1 | tee /mybuildlogs-autogen2.out
|
||||||
./configure --without-libraw --enable-static --with-cryptopp $CUSTOM_CONFIG_ARGS 2>&1 | tee /mybuildlogs-configure2.out
|
./configure --without-libraw --enable-static --with-cryptopp=$local_install_dir --with-readline=$local_install_dir --with-termcap=$local_install_dir $CUSTOM_CONFIG_ARGS 2>&1 | tee /mybuildlogs-configure2.out
|
||||||
|
|
||||||
export INCLUDES="-I/source/megacmdpkg/MEGAcmd/sdk/sdk_build/install/include -I/source/megacmdpkg/MEGAcmd/sdk/include/ -I/source/megacmdpkg/MEGAcmd/sdk/include/mega/posix"
|
export INCLUDES="-I/source/megacmdpkg/MEGAcmd/sdk/sdk_build/install/include -I/source/megacmdpkg/MEGAcmd/sdk/include/ -I/source/megacmdpkg/MEGAcmd/sdk/include/mega/posix"
|
||||||
make SUBDIRS='' DEFS='' 2>&1 | tee /mybuildlogs-make2.out
|
make SUBDIRS='' DEFS='' 2>&1 | tee /mybuildlogs-make2.out
|
||||||
@@ -217,7 +223,7 @@ if [ "$built_arch" == "$BUILD_ARCH-bit" ] ; then
|
|||||||
echo "Correct buildarch: $BUILD_ARCH"
|
echo "Correct buildarch: $BUILD_ARCH"
|
||||||
else
|
else
|
||||||
echo "wrong buildarch: $BUILD_ARCH"
|
echo "wrong buildarch: $BUILD_ARCH"
|
||||||
file mega-exec
|
file mega-exec
|
||||||
rm mega-exec
|
rm mega-exec
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user