Fix up meson & cargo arguments for spot-client
This commit is contained in:
parent
01a2dcdf1d
commit
89dbc7d6a1
4
.SRCINFO
4
.SRCINFO
|
@ -1,7 +1,7 @@
|
||||||
pkgbase = spot-client-git
|
pkgbase = spot-client-git
|
||||||
pkgdesc = Gtk/Rust native Spotify client - git version
|
pkgdesc = Gtk/Rust native Spotify client - git version
|
||||||
pkgver = 0.1.10.r0.g1d361b1
|
pkgver = 0.1.10.r0.g1d361b1
|
||||||
pkgrel = 1
|
pkgrel = 2
|
||||||
url = https://github.com/xou816/spot
|
url = https://github.com/xou816/spot
|
||||||
arch = x86_64
|
arch = x86_64
|
||||||
arch = i686
|
arch = i686
|
||||||
|
@ -23,6 +23,8 @@ pkgbase = spot-client-git
|
||||||
provides = spot-client
|
provides = spot-client
|
||||||
conflicts = spot-client
|
conflicts = spot-client
|
||||||
source = spot-client-git::git+https://github.com/xou816/spot
|
source = spot-client-git::git+https://github.com/xou816/spot
|
||||||
|
source = meson-test-release.diff
|
||||||
sha256sums = SKIP
|
sha256sums = SKIP
|
||||||
|
sha256sums = 4366433646f05f74cb9cdc23079ad37655e06589cd28ecd3cd156223ff213a95
|
||||||
|
|
||||||
pkgname = spot-client-git
|
pkgname = spot-client-git
|
||||||
|
|
18
PKGBUILD
18
PKGBUILD
|
@ -2,7 +2,7 @@
|
||||||
_projectname='spot'
|
_projectname='spot'
|
||||||
pkgname="$_projectname-client-git"
|
pkgname="$_projectname-client-git"
|
||||||
pkgver='0.1.10.r0.g1d361b1'
|
pkgver='0.1.10.r0.g1d361b1'
|
||||||
pkgrel='1'
|
pkgrel='2'
|
||||||
pkgdesc='Gtk/Rust native Spotify client - git version'
|
pkgdesc='Gtk/Rust native Spotify client - git version'
|
||||||
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
|
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
|
||||||
url="https://github.com/xou816/$_projectname"
|
url="https://github.com/xou816/$_projectname"
|
||||||
|
@ -12,12 +12,21 @@ makedepends=('cargo' 'git' 'meson>=0.50.0')
|
||||||
optdepends=('org.freedesktop.secrets')
|
optdepends=('org.freedesktop.secrets')
|
||||||
provides=("$_projectname-client")
|
provides=("$_projectname-client")
|
||||||
conflicts=("$_projectname-client")
|
conflicts=("$_projectname-client")
|
||||||
source=("$pkgname::git+$url")
|
source=(
|
||||||
sha256sums=('SKIP')
|
"$pkgname::git+$url"
|
||||||
|
'meson-test-release.diff'
|
||||||
|
)
|
||||||
|
sha256sums=('SKIP'
|
||||||
|
'4366433646f05f74cb9cdc23079ad37655e06589cd28ecd3cd156223ff213a95')
|
||||||
|
|
||||||
_sourcedirectory="$pkgname"
|
_sourcedirectory="$pkgname"
|
||||||
_builddirectory='build'
|
_builddirectory='build'
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "$srcdir/$_sourcedirectory/"
|
||||||
|
patch --forward -p1 < '../meson-test-release.diff'
|
||||||
|
}
|
||||||
|
|
||||||
pkgver() {
|
pkgver() {
|
||||||
cd "$srcdir/$_sourcedirectory/"
|
cd "$srcdir/$_sourcedirectory/"
|
||||||
git describe --long --tags | sed -e 's/^v//' -e 's/-\([^-]*-g[^-]*\)$/-r\1/' -e 's/-/./g'
|
git describe --long --tags | sed -e 's/^v//' -e 's/-\([^-]*-g[^-]*\)$/-r\1/' -e 's/-/./g'
|
||||||
|
@ -25,7 +34,8 @@ pkgver() {
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "$srcdir/"
|
cd "$srcdir/"
|
||||||
arch-meson "$_sourcedirectory" "$_builddirectory" -Doffline=false -Dbuildtype=release
|
meson setup --prefix '/usr' --libexecdir 'lib' --sbindir 'bin' --buildtype 'release' --wrap-mode 'nodownload' \
|
||||||
|
-Db_lto='true' -Db_pie='true' -Doffline='false' -Dfeatures='warn-cache' "$_sourcedirectory" "$_builddirectory"
|
||||||
meson compile -C "$_builddirectory"
|
meson compile -C "$_builddirectory"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
40
meson-test-release.diff
Normal file
40
meson-test-release.diff
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
diff --git a/build-aux/test.sh b/build-aux/test.sh
|
||||||
|
index f8ca912..f3b9e8f 100644
|
||||||
|
--- a/build-aux/test.sh
|
||||||
|
+++ b/build-aux/test.sh
|
||||||
|
@@ -2,10 +2,19 @@
|
||||||
|
|
||||||
|
export SRC="$1"
|
||||||
|
export CARGO_TARGET_DIR="$2"/target
|
||||||
|
-export OFFLINE="$3"
|
||||||
|
+export BUILDTYPE="$3"
|
||||||
|
+export OFFLINE="$4"
|
||||||
|
+
|
||||||
|
+echo $BUILDTYPE
|
||||||
|
+
|
||||||
|
+if [[ $BUILDTYPE = "release" ]]; then
|
||||||
|
+ PROFILE_ARG="--release"
|
||||||
|
+else
|
||||||
|
+ PROFILE_ARG="--verbose"
|
||||||
|
+fi
|
||||||
|
|
||||||
|
if [[ $OFFLINE = "true" ]]; then
|
||||||
|
export CARGO_HOME="$SRC"/cargo
|
||||||
|
fi
|
||||||
|
|
||||||
|
-cargo test --manifest-path "$SRC"/Cargo.toml
|
||||||
|
\ No newline at end of file
|
||||||
|
+cargo test --manifest-path "$SRC"/Cargo.toml "$PROFILE_ARG"
|
||||||
|
\ No newline at end of file
|
||||||
|
diff --git a/src/meson.build b/src/meson.build
|
||||||
|
index 93d7387..909e9d6 100644
|
||||||
|
--- a/src/meson.build
|
||||||
|
+++ b/src/meson.build
|
||||||
|
@@ -140,6 +140,7 @@ test('Unit tests',
|
||||||
|
args: [
|
||||||
|
meson.source_root(),
|
||||||
|
meson.build_root(),
|
||||||
|
+ get_option('buildtype'),
|
||||||
|
get_option('offline') ? 'true' : 'false'
|
||||||
|
]
|
||||||
|
)
|
Loading…
Reference in a new issue