From e91e02ab1f5fd9d620e60e4a51c3eaffbfc27183 Mon Sep 17 00:00:00 2001 From: Anas Elgarhy Date: Thu, 11 May 2023 05:08:15 +0300 Subject: [PATCH] [update] Change the binary file name from `slstatus` to `yo-slstatus` --- Makefile | 32 +++++++++++++++---------------- src/{slstatus.c => yo_slstatus.c} | 2 +- src/{slstatus.h => yo_slstatus.h} | 0 slstatus.1 => yo-slstatus.1 | 0 4 files changed, 17 insertions(+), 17 deletions(-) rename src/{slstatus.c => yo_slstatus.c} (99%) rename src/{slstatus.h => yo_slstatus.h} (100%) rename slstatus.1 => yo-slstatus.1 (100%) diff --git a/Makefile b/Makefile index 9bc3120..b1e9d05 100644 --- a/Makefile +++ b/Makefile @@ -33,9 +33,9 @@ SRC_DIR = src COM_OBJ = $(COM:%=$(OBJ_DIR)/%.o) REQ_OBJ = $(REQ:%=$(OBJ_DIR)/%.o) -SLSTATUS_OBJ = $(OBJ_DIR)/slstatus.o +SLSTATUS_OBJ = $(OBJ_DIR)/yo_slstatus.o -all: $(BUILD_DIR)/slstatus +all: $(BUILD_DIR)/yo-slstatus $(COM_OBJ): $(OBJ_DIR)/%.o : $(SRC_DIR)/%.c $(REQ_OBJ) config.mk $(REQ:%=$(SRC_DIR)/%.h) @mkdir -p $(@D) @@ -45,38 +45,38 @@ $(REQ_OBJ): $(OBJ_DIR)/%.o : $(SRC_DIR)/%.c $(SRC_DIR)/%.h @mkdir -p $(@D) $(CC) -o $@ -c $(CPPFLAGS) $(CFLAGS) $< -$(SLSTATUS_OBJ): $(SRC_DIR)/slstatus.c $(SRC_DIR)/slstatus.h $(SRC_DIR)/arg.h config.mk $(REQ_OBJ) $(REQ:%=$(SRC_DIR)/%.h) +$(SLSTATUS_OBJ): $(SRC_DIR)/yo_slstatus.c $(SRC_DIR)/yo_slstatus.h $(SRC_DIR)/arg.h config.mk $(REQ_OBJ) $(REQ:%=$(SRC_DIR)/%.h) @mkdir -p $(@D) $(CC) -o $@ -c $(CPPFLAGS) $(CFLAGS) $< config.h: cp config.def.h $@ -$(BUILD_DIR)/slstatus: $(SLSTATUS_OBJ) $(COM_OBJ) $(REQ_OBJ) +$(BUILD_DIR)/yo-slstatus: $(SLSTATUS_OBJ) $(COM_OBJ) $(REQ_OBJ) $(CC) -o $@ $(LDFLAGS) $(SLSTATUS_OBJ) $(COM_OBJ) $(REQ_OBJ) $(LDLIBS) clean: rm -rf $(BUILD_DIR) dist: - rm -rf "slstatus-$(VERSION)" - mkdir -p "slstatus-$(VERSION)/components" + rm -rf "yo-slstatus_$(VERSION)" + mkdir -p "yo-slstatus_$(VERSION)/components" cp -R LICENSE Makefile README config.mk config.def.h \ - arg.h $(SRC_DIR)/slstatus.c $(COM:%=$(SRC_DIR)/%.c) $(REQ:%=$(SRC_DIR)/%.c) $(REQ:%=$(SRC_DIR)/%.h) \ - slstatus.1 "slstatus-$(VERSION)" - tar -cf - "slstatus-$(VERSION)" | gzip -c > "slstatus-$(VERSION).tar.gz" - rm -rf "slstatus-$(VERSION)" + arg.h $(SRC_DIR)/yo-slstatus.c $(COM:%=$(SRC_DIR)/%.c) $(REQ:%=$(SRC_DIR)/%.c) $(REQ:%=$(SRC_DIR)/%.h) \ + yo-slstatus.1 "yo-slstatus_$(VERSION)" + tar -cf - "yo-slstatus_$(VERSION)" | gzip -c > "yo-slstatus_$(VERSION).tar.gz" + rm -rf "yo-slstatus_$(VERSION)" install: all mkdir -p "$(DESTDIR)$(PREFIX)/bin" - cp -f $(BUILD_DIR)/slstatus "$(DESTDIR)$(PREFIX)/bin" - chmod 755 "$(DESTDIR)$(PREFIX)/bin/slstatus" + cp -f $(BUILD_DIR)/yo-slstatus "$(DESTDIR)$(PREFIX)/bin" + chmod 755 "$(DESTDIR)$(PREFIX)/bin/yo-slstatus" mkdir -p "$(DESTDIR)$(MANPREFIX)/man1" - cp -f slstatus.1 "$(DESTDIR)$(MANPREFIX)/man1" - chmod 644 "$(DESTDIR)$(MANPREFIX)/man1/slstatus.1" + cp -f yo-slstatus.1 "$(DESTDIR)$(MANPREFIX)/man1" + chmod 644 "$(DESTDIR)$(MANPREFIX)/man1/yo-slstatus.1" uninstall: - rm -f "$(DESTDIR)$(PREFIX)/bin/slstatus" - rm -f "$(DESTDIR)$(MANPREFIX)/man1/slstatus.1" + rm -f "$(DESTDIR)$(PREFIX)/bin/yo-slstatus" + rm -f "$(DESTDIR)$(MANPREFIX)/man1/yo-slstatus.1" .PHONY: all clean dist install uninstall diff --git a/src/slstatus.c b/src/yo_slstatus.c similarity index 99% rename from src/slstatus.c rename to src/yo_slstatus.c index 64da5cb..203e52f 100644 --- a/src/slstatus.c +++ b/src/yo_slstatus.c @@ -8,7 +8,7 @@ #include #include "arg.h" -#include "slstatus.h" +#include "yo_slstatus.h" #include "util.h" struct arg { diff --git a/src/slstatus.h b/src/yo_slstatus.h similarity index 100% rename from src/slstatus.h rename to src/yo_slstatus.h diff --git a/slstatus.1 b/yo-slstatus.1 similarity index 100% rename from slstatus.1 rename to yo-slstatus.1