New package: zwm-0.1.12

Co-authored-by: Duncaen <duncaen@voidlinux.org>
This commit is contained in:
elbachir-one 2025-04-14 18:24:40 +01:00 committed by Duncan Overbruck
parent a90b30b8bb
commit c974ab109c
3 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,32 @@
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,8 @@
CC = gcc
-CFLAGS = -Wextra -Wshadow -Wunreachable-code -Wcast-align -Wuninitialized -finline-functions -finline-small-functions
+CFLAGS = -Wextra -Wshadow -Wunreachable-code -Wcast-align -Wuninitialized
+MYCFLAGS = -finline-functions -finline-small-functions
-LDFLAGS = -lxcb -lxcb-util -lxcb-keysyms -lxcb-ewmh -lxcb-icccm -lxcb-randr -lxcb-xinerama -lxcb-cursor
+LIBS = -lxcb -lxcb-util -lxcb-keysyms -lxcb-ewmh -lxcb-icccm -lxcb-randr -lxcb-xinerama -lxcb-cursor
SRC_FILES = ./src/zwm.c ./src/logger.c ./src/tree.c ./src/config_parser.c ./src/queue.c
HEADER_FILES = ./src/logger.h ./src/tree.h ./src/type.h ./src/zwm.h ./src/config_parser.h ./src/helper.h ./src/queue.h
OBJ_FILES = $(SRC_FILES:.c=.o)
@@ -15,15 +16,15 @@
MANPAGE = zwm.1
$(TARGET): $(OBJ_FILES)
- $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+ $(CC) $(CFLAGS) $(MYCFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
%.o: %.c $(HEADER_FILES)
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(CFLAGS) $(MYCLAGS) -c $< -o $@
clean:
rm -f $(TARGET) $(OBJ_FILES)
-install: $(TARGET)
+install:
mkdir -p "$(DESTDIR)$(BINDIR)"
cp -pf $(TARGET) "$(DESTDIR)$(BINDIR)"
mkdir -p "$(DESTDIR)$(MANDIR)"

View file

@ -0,0 +1,11 @@
--- a/src/logger.c
+++ b/src/logger.c
@@ -55,7 +55,7 @@
if (!initialized) {
const char *homedir;
if ((homedir = getenv("HOME")) == NULL) {
- __uid_t id = getuid();
+ uid_t id = getuid();
struct passwd *pw = getpwuid(id);
if (pw == NULL) {
fprintf(stderr, "Failed to get home directory\n");

14
srcpkgs/zwm/template Normal file
View file

@ -0,0 +1,14 @@
# Template file for 'zwm'
pkgname=zwm
version=0.1.12
revision=1
build_style=gnu-makefile
makedepends="libxcb-devel xcb-util-wm-devel xcb-util-keysyms-devel
xcb-util-devel xcb-util-cursor-devel"
depends="wmctrl"
short_desc="Minimal tiling window manager for X11"
maintainer="elbachir-one <bachiralfa@gmail.com>"
license="GPL-3.0-or-later"
homepage="https://github.com/Yazeed1s/zwm"
distfiles="https://github.com/Yazeed1s/zwm/archive/refs/tags/${version}.tar.gz"
checksum=331e0b0e646f162a8b83cde08077b6125141104bc84b7439ca4a3ec777a0004d