diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-12-26 19:08:00 +0200 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-12-26 19:08:00 +0200 |
commit | 155a9e828defcf350af8df1f79694b01daf6ab5d (patch) | |
tree | e8a6540d7d3bd657a34513c81796b2a6f325acf0 /.ci | |
parent | Add date separator in the timeline (diff) | |
download | nheko-155a9e828defcf350af8df1f79694b01daf6ab5d.tar.xz |
Add deb and rpm packages on releases
Diffstat (limited to '.ci')
-rwxr-xr-x | .ci/linux/create-packages.sh | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/.ci/linux/create-packages.sh b/.ci/linux/create-packages.sh new file mode 100755 index 00000000..c814882b --- /dev/null +++ b/.ci/linux/create-packages.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash + +# +# Create deb & rpm packages from the AppImage. +# + +DIR=package.dir +VERSION=`git tag -l --points-at HEAD` + +# Installing dependencies on travis. +if [ ! -z "$TRAVIS_OS_NAME" ]; then + sudo apt-add-repository -y ppa:brightbox/ruby-ng + sudo apt-get update -qq + sudo apt-get install -y ruby2.1 ruby-switch + sudo ruby-switch --set ruby2.1 + sudo apt-get install -y ruby2.1-dev rpm libffi-dev + + sudo gem install --no-ri --no-rdoc fpm +fi + +# Set up deb structure. +mkdir -p ${DIR}/usr/{bin,share/pixmaps,share/applications} + +# Copy resources. +cp nheko*.AppImage ${DIR}/usr/bin/nheko +cp resources/nheko.desktop ${DIR}/usr/share/applications/nheko.desktop +cp resources/nheko.png ${DIR}/usr/share/pixmaps/nheko.png + +for iconSize in 16 32 48 64 128 256 512; do + IconDir=${DIR}/usr/share/icons/hicolor/${iconSize}x${iconSize}/apps + mkdir -p ${IconDir} + cp resources/nheko-${iconSize}.png ${IconDir}/nheko.png +done + +fpm --force \ + -s dir \ + --output-type deb \ + --name nheko \ + --description "Desktop client for the Matrix protocol" \ + --url "https://github.com/mujx/nheko" \ + --version ${VERSION} \ + --architecture x86_64 \ + --maintainer "mujx (https://github.com/mujx)" \ + --license "GPLv3" \ + --prefix / \ + --deb-no-default-config-files \ + --chdir ${DIR} usr + +fpm -s deb -t rpm nheko_${VERSION}_amd64.deb |