mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Fixes to rpm build specifically for OBS
This commit is contained in:
8
Makefile
8
Makefile
@@ -14,6 +14,7 @@ SRC = Cargo.toml Cargo.lock Makefile $(shell find -type f -wholename '**/src/*.r
|
|||||||
BIN_C=asusctl
|
BIN_C=asusctl
|
||||||
BIN_D=asusd
|
BIN_D=asusd
|
||||||
LEDCONFIG=asusd-ledmodes.toml
|
LEDCONFIG=asusd-ledmodes.toml
|
||||||
|
VERSION:=$(shell grep -P 'version = "(\d.\d.\d)"' asus-nb-ctrl/Cargo.toml | cut -d'"' -f2)
|
||||||
|
|
||||||
DEBUG ?= 0
|
DEBUG ?= 0
|
||||||
ifeq ($(DEBUG),0)
|
ifeq ($(DEBUG),0)
|
||||||
@@ -56,11 +57,14 @@ vendor:
|
|||||||
mkdir -p .cargo
|
mkdir -p .cargo
|
||||||
cargo vendor | head -n -1 > .cargo/config
|
cargo vendor | head -n -1 > .cargo/config
|
||||||
echo 'directory = "vendor"' >> .cargo/config
|
echo 'directory = "vendor"' >> .cargo/config
|
||||||
tar pcfJ vendor.tar.xz vendor
|
mv .cargo/config ./cargo-config
|
||||||
|
rm -rf .cargo
|
||||||
|
tar pcfJ vendor-$(VERSION).tar.xz vendor
|
||||||
rm -rf vendor
|
rm -rf vendor
|
||||||
|
|
||||||
target/release/$(BIN_D): $(SRC)
|
target/release/$(BIN_D): $(SRC)
|
||||||
ifeq ($(VENDORED),1)
|
ifeq ($(VENDORED),1)
|
||||||
tar pxf vendor.tar.xz
|
@echo "version = $(VERSION)"
|
||||||
|
tar pxf vendor-$(VERSION).tar.xz
|
||||||
endif
|
endif
|
||||||
cargo build $(ARGS)
|
cargo build $(ARGS)
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
# Use hardening ldflags.
|
# Use hardening ldflags.
|
||||||
%global rustflags -Clink-arg=-Wl,-z,relro,-z,now
|
%global rustflags -Clink-arg=-Wl,-z,relro,-z,now
|
||||||
Name: asus-nb-ctrl
|
Name: asus-nb-ctrl
|
||||||
Version: 1.0.0
|
Version: 1.0.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Text editor for terminal
|
Summary: ASUS Notebook control
|
||||||
License: MPLv2
|
License: MPLv2
|
||||||
Group: Productivity/Text/Editors
|
Group: System Environment/Daemons
|
||||||
URL: https://gitlab.com/asus-linux/asus-nb-ctrl
|
URL: https://gitlab.com/asus-linux/asus-nb-ctrl
|
||||||
Source: %{name}-%{version}.tar.gz
|
Source: https://gitlab.com/asus-linux/asus-nb-ctrl/-/archive/%version/%{name}-%{version}.tar.gz
|
||||||
# cargo vendor &&
|
# cargo vendor &&
|
||||||
# tar cfJ vendor.tar.xz vendor
|
# tar cfJ vendor.tar.xz vendor
|
||||||
Source1: vendor.tar.xz
|
Source1: vendor.tar.xz
|
||||||
@@ -26,8 +26,8 @@ BuildRequires: pkgconfig(libudev)
|
|||||||
ASUS Laptop control
|
ASUS Laptop control
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %name-next
|
%setup -q
|
||||||
%setup -q -n %name-next -D -T -a 1
|
%setup -q -D -T -a 1
|
||||||
|
|
||||||
mkdir .cargo
|
mkdir .cargo
|
||||||
cat >.cargo/config <<EOF
|
cat >.cargo/config <<EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user