Build Debian packages with CI
This commit is contained in:
parent
43fccf259f
commit
6ec7901038
6 changed files with 82 additions and 8 deletions
|
|
@ -20,15 +20,20 @@ stages:
|
|||
before_script:
|
||||
- echo "started by ${GITLAB_USER_NAME}"
|
||||
|
||||
#reusable templates
|
||||
.ccache_init: &ccache_init
|
||||
before_script:
|
||||
- apt update
|
||||
- apt install -y build-essential qtcreator qt5-default libusb-1.0-0-dev libhidapi-dev pkgconf wget git
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (AppImage) 32-bit Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
build_linux_32:
|
||||
<<: *ccache_init
|
||||
image: i386/ubuntu:bionic
|
||||
stage: build
|
||||
script:
|
||||
- apt update
|
||||
- apt install -y build-essential qtcreator qt5-default libusb-1.0-0-dev libhidapi-dev pkgconf wget git
|
||||
- ./scripts/build-appimage-32.sh
|
||||
|
||||
artifacts:
|
||||
|
|
@ -40,18 +45,60 @@ build_linux_32:
|
|||
# Linux (AppImage) 64-bit Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
build_linux_64:
|
||||
<<: *ccache_init
|
||||
image: ubuntu:bionic
|
||||
stage: build
|
||||
script:
|
||||
- apt update
|
||||
- apt install -y build-essential qtcreator qt5-default libusb-1.0-0-dev libhidapi-dev pkgconf wget git
|
||||
- ./scripts/build-appimage.sh
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- OpenRGB-x86_64.AppImage
|
||||
expire_in: 30 days
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (.deb) 32-bit Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
build_linux_deb32:
|
||||
<<: *ccache_init
|
||||
image: i386/ubuntu:bionic
|
||||
stage: build
|
||||
script:
|
||||
- apt install -y debhelper
|
||||
- export $( dpkg-architecture -s --target-arch i386; )
|
||||
- dpkg-architecture -l
|
||||
- dpkg-buildpackage --target-arch i386 -us -B
|
||||
- rm -v ../openrgb-dbgsym*.ddeb
|
||||
- mv -v ../openrgb*.deb ./
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- openrgb*.deb
|
||||
exclude:
|
||||
- openrgb-dbgsym*.deb
|
||||
expire_in: 30 days
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Linux (.deb) 64-bit Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
build_linux_deb64:
|
||||
<<: *ccache_init
|
||||
image: ubuntu:bionic
|
||||
stage: build
|
||||
script:
|
||||
- apt install -y debhelper
|
||||
- dpkg-architecture -l
|
||||
- dpkg-buildpackage -us -B
|
||||
- rm -v ../openrgb-dbgsym*.ddeb
|
||||
- mv -v ../openrgb*.deb ./
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- openrgb*.deb
|
||||
exclude:
|
||||
- openrgb-dbgsym*.deb
|
||||
expire_in: 30 days
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# Windows (32-bit) Build Target #
|
||||
#-----------------------------------------------------------------------#
|
||||
|
|
|
|||
|
|
@ -681,7 +681,9 @@ unix:!macx {
|
|||
desktop.files+=qt/OpenRGB.desktop
|
||||
pixmap.path=$$PREFIX/share/pixmaps/
|
||||
pixmap.files+=qt/OpenRGB.png
|
||||
INSTALLS += target desktop pixmap
|
||||
rules.path=/lib/udev/rules.d/
|
||||
rules.files+=60-openrgb.rules
|
||||
INSTALLS += target desktop pixmap rules
|
||||
}
|
||||
|
||||
unix:!macx:CONFIG(asan) {
|
||||
|
|
@ -711,3 +713,7 @@ unix:macx {
|
|||
CONFIG += \
|
||||
c++14 \
|
||||
}
|
||||
|
||||
DISTFILES += \
|
||||
debian/openrgb-udev.postinst \
|
||||
debian/openrgb.postinst
|
||||
|
|
|
|||
3
debian/control
vendored
3
debian/control
vendored
|
|
@ -16,10 +16,11 @@ Homepage: https://gitlab.com/CalcProgrammer1/OpenRGB
|
|||
Package: openrgb
|
||||
Architecture: any
|
||||
Depends:
|
||||
udev,
|
||||
${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
Recommends:
|
||||
openrgb-udev,
|
||||
openrazer-driver-dkms,
|
||||
openrgb-dkms-drivers,
|
||||
Description: Open source RGB lighting control
|
||||
OpenRGB controls RGB lighting
|
||||
|
|
|
|||
4
debian/files
vendored
4
debian/files
vendored
|
|
@ -1 +1,3 @@
|
|||
openrgb_0.41.1_source.buildinfo misc optional
|
||||
openrgb-dbgsym_0.41.1_amd64.ddeb debug optional automatic=yes
|
||||
openrgb_0.41.1_amd64.buildinfo misc optional
|
||||
openrgb_0.41.1_amd64.deb misc optional
|
||||
|
|
|
|||
1
debian/openrgb.install
vendored
1
debian/openrgb.install
vendored
|
|
@ -1,3 +1,4 @@
|
|||
/usr/bin/
|
||||
/usr/share/applications/
|
||||
/usr/share/pixmaps
|
||||
/lib/udev/rules.d/
|
||||
|
|
|
|||
17
debian/openrgb.postinst
vendored
Normal file
17
debian/openrgb.postinst
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
# -e is not set should this step fail for whatever reason the installation is still valid
|
||||
set -u -o pipefail
|
||||
|
||||
# Reload rules
|
||||
if [ -f /bin/udevadm ]; then
|
||||
udevadm control --reload-rules && udevadm trigger;
|
||||
else
|
||||
echo
|
||||
echo "\/-------------------------------------------------------\\"
|
||||
echo "\| Critical: This system does not have udev installed. \|"
|
||||
echo "\| \|"
|
||||
echo "\| Please install udev with: sudo apt -y install udev \|"
|
||||
echo "\\-------------------------------------------------------\/"
|
||||
echo
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue