mirror of
https://git.proxmox.com/git/fwupd
synced 2025-11-02 16:06:17 +00:00
trivial: Fixup the arch build to work on Travis
* Use sed to adjust package version while running script rather than `makepkg` * Run script as root so it can modify `/build` * Run `makepkg` as nobody rather than "build" * Separate build/install steps
This commit is contained in:
parent
1cc7d8d271
commit
3db79f2ec2
@ -2,7 +2,7 @@
|
||||
# Contributor: Mirco Tischler <mt-ml at gmx dot de>
|
||||
|
||||
pkgname=fwupd
|
||||
pkgver=0.9.4.r53.ge90542f
|
||||
pkgver=#VERSION#
|
||||
pkgrel=1
|
||||
pkgdesc='A simple daemon to allow session software to update firmware'
|
||||
arch=('i686' 'x86_64')
|
||||
@ -13,11 +13,6 @@ makedepends=('meson' 'valgrind' 'docbook-utils' 'docbook-sgml' 'perl-sgmls'
|
||||
'gobject-introspection' 'gtk-doc' 'python-pillow' 'python-cairo'
|
||||
'ttf-dejavu' 'adobe-source-han-sans-cn-fonts' 'python-gobject' 'git')
|
||||
|
||||
pkgver() {
|
||||
cd ${pkgname}
|
||||
git describe | sed 's/-/.r/;s/-/./'
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${pkgname}
|
||||
meson --prefix=/usr \
|
||||
|
||||
@ -28,11 +28,6 @@ RUN pacman -S --noconfirm \
|
||||
valgrind
|
||||
# CI dep
|
||||
RUN pacman -S --noconfirm git
|
||||
# add an user to build the package with
|
||||
RUN useradd -s /bin/bash build
|
||||
RUN echo 'build ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||
# prepare the build environment
|
||||
RUN mkdir /build
|
||||
RUN chown build /build
|
||||
USER build
|
||||
WORKDIR /build
|
||||
|
||||
@ -1,18 +1,23 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
VERSION=`git describe | sed 's/-/.r/;s/-/./'`
|
||||
[ -z $VERSION ] && VERSION=`head meson.build | grep ' version :' | cut -d \' -f2`
|
||||
|
||||
# prepare the build tree
|
||||
rm -rf build
|
||||
mkdir build && pushd build
|
||||
cp ../contrib/PKGBUILD .
|
||||
sed -i "s,#VERSION#,$VERSION," PKGBUILD
|
||||
mkdir -p src/fwupd && pushd src/fwupd
|
||||
ln -s ../../../* .
|
||||
ln -s ../../../.git .
|
||||
popd
|
||||
chown nobody . -R
|
||||
|
||||
# build the package and install it
|
||||
makepkg -ei --noconfirm
|
||||
sudo -u nobody makepkg -e --noconfirm
|
||||
pacman -U --noconfirm *.pkg.tar.xz
|
||||
|
||||
# move the package to working dir
|
||||
cp *.pkg.tar.xz ../
|
||||
mv *.pkg.tar.xz ../
|
||||
|
||||
# no testing here because gnome-desktop-testing isn’t available in Arch
|
||||
|
||||
Loading…
Reference in New Issue
Block a user