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; cd build && pwd && ls;
qmake ..; qmake ..;
make -j2; 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: - store_artifacts:
path: /root/project/build/src/kshare path: /kshare/

View File

@ -4,6 +4,6 @@ Architecture: all
Essential: no Essential: no
Section: contrib Section: contrib
Priority: optional 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> Maintainer: ArsenArsen <arsenarsentmc@outlook.com>
Description: The free open source and cross platform screen sharing software Description: The free open source and cross platform screen sharing software

View File

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