added makedeb to linux ci

This commit is contained in:
Niklas 2019-05-13 20:38:41 +02:00
parent 8c1bf5bc04
commit a4f8c83213
3 changed files with 43 additions and 18 deletions

View File

@ -53,5 +53,20 @@ jobs:
cd build && pwd && ls;
qmake ..;
make -j2;
cd ..;
- run:
name: Create Artifact Path
command: mkdir /kshare
- run:
name: Store Build
command: cp build/src/kshare /kshare/
- run:
name: Build Debian Package
command: |
cd packages/;
pwd;
ls -lah;
/root/project/packages/makedebian.sh ci;
cp *.deb /kshare/
- store_artifacts:
path: /root/project/build/src/kshare
path: /kshare/

View File

@ -4,6 +4,6 @@ Architecture: all
Essential: no
Section: contrib
Priority: optional
Depends: libqt5gui5 (>=5.7.0), libqt5svg5 (>=5.7.0), libqt5x11extras5 (>=5.7.0), libavcodec57 (>=3.2.0), libavformat57 (>=3.2.0), libswscale4 (>=3.2.0), libavutil55 (>=3.2.0), libxcb-cursor0 (>=0.1.0), libxcb1 (>=1.11.0), libxcb-xfixes0 (>=1.11.0), libxcb-util0 (>=0.3.8)|libxcb-util1 (>=0.3.8), libxcb-xfixes0 (>=1.11.0)
Depends: libqt5gui5 (>=5.7.0), libqt5svg5 (>=5.7.0), libqt5x11extras5 (>=5.7.0), libqt5multimedia5 (>=5.7.0), libqt5multimedia5-plugins (>=5.7.0), libnotify-bin (>=0.7), libavcodec57 (>=3.2.0), libavformat57 (>=3.2.0), libswscale4 (>=3.2.0), libavutil55 (>=3.2.0), libxcb-cursor0 (>=0.1.0), libxcb1 (>=1.11.0), libxcb-xfixes0 (>=1.11.0), libxcb-util0 (>=0.3.8)|libxcb-util1 (>=0.3.8), libxcb-xfixes0 (>=1.11.0)
Maintainer: ArsenArsen <arsenarsentmc@outlook.com>
Description: The free open source and cross platform screen sharing software

View File

@ -1,26 +1,36 @@
#!/usr/bin/env bash
VERSION=$(grep setApplicationVersion ../src/main.cpp | head -n1 | cut -d \" -f2)
echo "Make Debian package for v$VERSION" >&2
cp deb work -r
sed "s/%ver/$VERSION/g" deb/DEBIAN/control > work/DEBIAN/control
mkdir -p work/usr/bin
if [[ "$1" == "" ]]
then
echo "Provide a version with arg1" >&2
exit 1
fi
cp deb work -r
sed "s/%ver/$1/g" deb/DEBIAN/control > work/DEBIAN/control
mkdir -p work/usr/bin
mkdir compiling
cd compiling
qmake ../../KShare.pro
if make
then
cd ..
cp compiling/src/kshare work/usr/bin/kshare
echo "Fresh Compile Binary" >&2
mkdir compiling
cd compiling
qmake ../../KShare.pro
if make
then
cd ..
cp compiling/src/kshare work/usr/bin/kshare
else
rm -rf compiling
echo "Failed to make!"
exit 2
fi
else
rm -rf compiling
echo "Failed to make!"
exit 2
echo "Using pre-compiled binary (please only use in circleci)" >&2
pwd
cp ../build/src/kshare work/usr/bin/kshare
fi
cd work
md5sum usr/bin/kshare usr/share/applications/KShare.desktop > DEBIAN/md5sums
cd ..
dpkg-deb -b work/
mv work.deb kshare_v${VERSION}.deb
rm -rf work