Skip to content

Commit

Permalink
lenovolegionlinux-git: add patched Makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Gonçalo Negrier Duarte <[email protected]>
  • Loading branch information
MrDuartePT committed Dec 31, 2024
1 parent 318486c commit 0965173
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/lenovolegionlinux-git/.SRCINFO
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ pkgbase = lenovolegionlinux-git
maintainer = MrDuartePT <[email protected]>
source = lenovolegionlinux::git+https://github.com/johnfanv2/LenovoLegionLinux
source = https://raw.githubusercontent.com/benhoyt/inih/refs/tags/r58/ini.c
source = Makefile-debian
sha256sums = SKIP
sha256sums = 217fa78f0380669c91a565f3e414d0a8be0f7a7fdfd1e3839f213e86aa574a95
sha256sums = e4452e50cabfd488e5b04af627187bae184ce72489a6785591c1b66710af7333

pkgname = lenovolegionlinux-git
24 changes: 24 additions & 0 deletions packages/lenovolegionlinux-git/Makefile-debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
CC ?= clang

CFLAGS ?= -O2
CFLAGS += -Wall -linih

SRC = $(wildcard ini.c modules/*.c)
OBJ = $(SRC:.c=.o)

TARGET = legiond legiond-ctl
all: $(TARGET)

legiond: $(OBJ) legiond.o
$(CC) $(CFLAGS) $(OBJ) legiond.o -o legiond

legiond-ctl: legiond-ctl.o
$(CC) $(CFLAGS) legiond-ctl.o -o legiond-ctl

%.o : %.c
$(CC) $(CFLAGS) -c $< -o $@

clean:
rm -f $(OBJ) $(TARGET) legiond.o legiond-ctl.o

.PHONY: all clean
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ replaces=("${_pkgname}")
source=(
"${_pkgname}::git+https://github.com/johnfanv2/LenovoLegionLinux"
"https://raw.githubusercontent.com/benhoyt/inih/refs/tags/r58/ini.c"
"Makefile-debian"
)
sha256sums=(
'SKIP'
'217fa78f0380669c91a565f3e414d0a8be0f7a7fdfd1e3839f213e86aa574a95'
'e4452e50cabfd488e5b04af627187bae184ce72489a6785591c1b66710af7333'
)

prepare() {
Expand All @@ -45,7 +47,7 @@ build() {
# Compile legiond daemon
cd legion_linux/extra/service/legiond
cp "${srcdir}/ini.c" ./
sed -i "s/SOURCE1 = \$(TARGET1).c modules\/\*\.c/SOURCE1 = \$(TARGET1).c ini.c modules\/\*\.c/g" Makefile
cp "${srcdir}/Makefile-debian" ./Makefile
make
}

Expand Down

0 comments on commit 0965173

Please sign in to comment.