~canonical-ci-engineering/cupstream2distro-config/kubuntu-build-scripts

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
set -x

apt-get update -y
apt-get install python-software-properties -y --force-yes
apt-get install software-properties-common -y --force-yes
apt-add-repository -s -y ppa:canonical-qt5-edgers/qt5-beta2
#get missing "Launchpad PPA for gcovr maintainers" gpg key
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys  C012599D727CC694
apt-get update -y

apt-get install bzr -y --force-yes
apt-get install pkg-kde-tools -y --force-yes
apt-get install libwww-perl -y --force-yes
apt-get install bzr-builddeb -y --force-yes
apt-get install fakeroot -y --force-yes
apt-get install qtdeclarative5-dev-tools -y --force-yes
apt-get install libqt5core5a -y --force-yes
apt-get install devscripts -y --force-yes
apt-get install build-essential -y --force-yes
apt-get install equivs -y --force-yes
apt-get install gcovr -y --force-yes
apt-get install lcov -y --force-yes
apt-get install -f -y
cd build
cd qt*
bzr builddeb -e --merge
cd ..
cd build-area/qt*
mk-build-deps --install --tool "apt-get -y --force-yes" --build-dep debian/control
dpkg -i *.deb
apt-get install -f -y
mk-build-deps --install --tool "apt-get -y --force-yes" --build-indep debian/control
dpkg -i *.deb
apt-get install -f -y
rm -rf qt*opensource-src-build-deps-*
sed -i '/.*qmake/ s/$/ LIBS+=-lgcov QMAKE_CXXFLAGS+=--coverage QMAKE_LFLAGS+=--coverage QMAKE_LDFLAGS+=--coverage CONFIG+=coverage/' debian/rules
echo **************************************************************************************************************************************************************************
cat debian/rules
dpkg-buildpackage -rfakeroot -us -uc
gcovr -r src -x > ../coverage.xml