diff options
author | jgeboski <jgeboski@gmail.com> | 2015-12-20 05:21:33 +0300 |
---|---|---|
committer | jgeboski <jgeboski@gmail.com> | 2015-12-20 19:53:07 +0300 |
commit | 1aae55be6fd0dd24c3944b532a04426954ab171e (patch) | |
tree | 218038b65179e4efe5f11503a33d13d5918ea8c9 /.travis | |
parent | a418f60b7498c4e9d2f92f4048855003d38b5f4f (diff) |
travis: handle packaging for OBS and windows
Diffstat (limited to '.travis')
-rw-r--r-- | .travis/key | bin | 0 -> 1680 bytes | |||
-rwxr-xr-x | .travis/obs.sh | 49 | ||||
-rwxr-xr-x | .travis/win32-build.sh | 10 | ||||
-rwxr-xr-x | .travis/win32-deploy.sh | 11 | ||||
-rwxr-xr-x | .travis/win32-install.sh | 24 |
5 files changed, 94 insertions, 0 deletions
diff --git a/.travis/key b/.travis/key Binary files differnew file mode 100644 index 0000000..895439c --- /dev/null +++ b/.travis/key diff --git a/.travis/obs.sh b/.travis/obs.sh new file mode 100755 index 0000000..0ffbe11 --- /dev/null +++ b/.travis/obs.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +[ "${TRAVIS_PULL_REQUEST}" == "false" -a \ + "${TRAVIS_BRANCH}" == "${MY_DEPLOY_BRANCH}" \ +] || exit +set -e + +FULLVERS="$(date +%Y%m%d)~$(git rev-parse --short=7 HEAD)~${TRAVIS_BUILD_NUMBER}" +FULLDATE=$(date -R) +REPONAME=$(basename "${TRAVIS_REPO_SLUG}") + +git reset -q --hard +git clean -dfqx +./update.sh + +sed -ri \ + -e "20 s/^(\s+).*(,)\$/\1\[${FULLVERS}\]\2/" \ + configure.ac +sed -ri \ + -e "s/(^Build-Depends:.*)/\1, libzephyr4/" \ + debian/control + +cat <<EOF > debian/changelog +${REPONAME} (${FULLVERS}) UNRELEASED; urgency=medium + + * Updated to ${FULLVERS}. + + -- Travis CI <travis@travis-ci.org> ${FULLDATE} +EOF + +cat <<EOF > ~/.oscrc +[general] +apiurl = https://api.opensuse.org +[https://api.opensuse.org] +user = ${OBSUSER} +pass = ${OBSPASS} +EOF + +mkdir -p m4 +osc checkout "home:${OBSUSER}" "${REPONAME}" -o /tmp/obs + +( + cd /tmp/obs + rm -f *.{dsc,tar.gz} + dpkg-source -I -b "${TRAVIS_BUILD_DIR}" + + osc addremove -r + osc commit -m "Updated to ${FULLVERS}" +) diff --git a/.travis/win32-build.sh b/.travis/win32-build.sh new file mode 100755 index 0000000..db27077 --- /dev/null +++ b/.travis/win32-build.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -e + +CC="i686-w64-mingw32-gcc" \ +DLL_LD_FLAGS="-static-libgcc" \ +make -f Makefile.mingw \ + install \ + GLIB_GENMARSHAL="glib-genmarshal" \ + PLUGIN_VERSION="${VERSION}" \ + WIN32_TREE_TOP="win32-dev/pidgin-2.10.11" diff --git a/.travis/win32-deploy.sh b/.travis/win32-deploy.sh new file mode 100755 index 0000000..85800ac --- /dev/null +++ b/.travis/win32-deploy.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +[ "${TRAVIS_PULL_REQUEST}" == "false" -a \ + "${TRAVIS_BRANCH}" == "${MY_DEPLOY_BRANCH}" \ +] || exit +set -e + +sftp -qo StrictHostKeyChecking=no -P ${SSHPORT} ${SSHUSER} -b <<EOF +cd pidgin +put win32-install-dir/plugins/libfacebook.dll +EOF diff --git a/.travis/win32-install.sh b/.travis/win32-install.sh new file mode 100755 index 0000000..579b612 --- /dev/null +++ b/.travis/win32-install.sh @@ -0,0 +1,24 @@ +#!/bin/bash +set -e + +wget -nv -nc -P downloads/mingw-4.7.2 \ + http://downloads.sourceforge.net/mingw/MinGW/Base/gcc/Version4/gcc-4.7.2-1/libssp-4.7.2-1-mingw32-dll-0.tar.lzma + +wget -nv -nc -P downloads/glib-2.28.8 \ + http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-dev_0.18.1.1-2_win32.zip \ + http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/zlib-dev_1.2.5-2_win32.zip \ + http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.28/glib-dev_2.28.8-1_win32.zip + +wget -nv -nc -P downloads \ + https://github.com/jgeboski/purple-facebook/releases/download/downloads/json-glib-0.14.tar.gz \ + https://github.com/jgeboski/purple-facebook/releases/download/downloads/pidgin-2.10.11.tar.gz + +for DIR in glib-2.28.8 mingw-4.7.2 .; do + mkdir -p "win32-dev/${DIR}" + find "downloads/${DIR}" -maxdepth 1 -iname '*.tar.*' \ + -exec tar xf "{}" -C "win32-dev/${DIR}" \; + find "downloads/${DIR}" -maxdepth 1 -iname '*.zip' \ + -exec unzip -qq "{}" -d "win32-dev/${DIR}" \; +done + +ln -sf ../../mingw-4.7.2/bin/libssp-0.dll win32-dev/glib-2.28.8/lib/libssp.dll |