From 59e3096ccff0199270b0768b1a5cf55c9cc0f590 Mon Sep 17 00:00:00 2001 From: rv178 Date: Sat, 16 Jul 2022 11:44:12 +0530 Subject: [PATCH] [update] move *.scd files to docs/ * Makefile: update man page build for new path, remove man pages when make uninstall is invoked * contrib/PKGBUILD: update man page build for new path, replace '' with "" for more uniformity, some more changes * move *.scd to docs/*.scd --- Makefile | 20 ++++++++------ contrib/PKGBUILD | 33 ++++++++++++----------- swhkd-keys.5.scd => docs/swhkd-keys.5.scd | 0 swhkd.1.scd => docs/swhkd.1.scd | 0 swhkd.5.scd => docs/swhkd.5.scd | 0 swhks.1.scd => docs/swhks.1.scd | 0 6 files changed, 29 insertions(+), 24 deletions(-) rename swhkd-keys.5.scd => docs/swhkd-keys.5.scd (100%) rename swhkd.1.scd => docs/swhkd.1.scd (100%) rename swhkd.5.scd => docs/swhkd.5.scd (100%) rename swhks.1.scd => docs/swhks.1.scd (100%) diff --git a/Makefile b/Makefile index cb6267a..e10ee7b 100644 --- a/Makefile +++ b/Makefile @@ -15,19 +15,19 @@ build: @cargo build $(BUILDFLAGS) install: - @scdoc < ./$(DAEMON_BINARY).1.scd > $(DAEMON_BINARY).1.gz - @scdoc < ./$(SERVER_BINARY).1.scd > $(SERVER_BINARY).1.gz - @scdoc < ./$(DAEMON_BINARY).5.scd > $(DAEMON_BINARY).5.gz - @scdoc < ./$(DAEMON_BINARY)-keys.5.scd > $(DAEMON_BINARY)-keys.5.gz + @scdoc < ./docs/$(DAEMON_BINARY).1.scd > ./docs/$(DAEMON_BINARY).1.gz + @scdoc < ./docs/$(SERVER_BINARY).1.scd > ./docs/$(SERVER_BINARY).1.gz + @scdoc < ./docs/$(DAEMON_BINARY).5.scd > ./docs/$(DAEMON_BINARY).5.gz + @scdoc < ./docs/$(DAEMON_BINARY)-keys.5.scd > ./docs/$(DAEMON_BINARY)-keys.5.gz @mkdir -p $(MAN1_DIR) @mkdir -p $(MAN5_DIR) @mkdir -p $(POLKIT_DIR) @mkdir -p $(TARGET_DIR) @mkdir -p /etc/$(DAEMON_BINARY) - @mv $(DAEMON_BINARY).1.gz $(MAN1_DIR) - @mv $(SERVER_BINARY).1.gz $(MAN1_DIR) - @mv $(DAEMON_BINARY).5.gz $(MAN5_DIR) - @mv $(DAEMON_BINARY)-keys.5.gz $(MAN5_DIR) + @mv ./docs/$(DAEMON_BINARY).1.gz $(MAN1_DIR) + @mv ./docs/$(SERVER_BINARY).1.gz $(MAN1_DIR) + @mv ./docs/$(DAEMON_BINARY).5.gz $(MAN5_DIR) + @mv ./docs/$(DAEMON_BINARY)-keys.5.gz $(MAN5_DIR) @touch /etc/$(DAEMON_BINARY)/$(DAEMON_BINARY)rc @cp ./target/release/$(DAEMON_BINARY) $(TARGET_DIR) @cp ./target/release/$(SERVER_BINARY) $(TARGET_DIR) @@ -36,6 +36,10 @@ install: @chmod +x $(TARGET_DIR)/$(SERVER_BINARY) uninstall: + @rm -f $(MAN1_DIR)/$(DAEMON_BINARY).1.gz + @rm -f $(MAN1_DIR)/$(SERVER_BINARY).1.gz + @rm -f $(MAN5_DIR)/$(DAEMON_BINARY).5.gz + @rm -f $(MAN5_DIR)/$(DAEMON_BINARY)-keys.5.gz @rm $(TARGET_DIR)/$(SERVER_BINARY) @rm $(TARGET_DIR)/$(DAEMON_BINARY) @rm $(POLKIT_DIR)/$(POLKIT_POLICY_FILE) diff --git a/contrib/PKGBUILD b/contrib/PKGBUILD index 557dbf2..bcebfc5 100644 --- a/contrib/PKGBUILD +++ b/contrib/PKGBUILD @@ -1,26 +1,27 @@ # Maintainer: Aakash Sharma # Contributor: Sergey A. +# Contributor: rv178 -pkgname='swhkd-git' _pkgname="swhkd" -pkgver=1 +pkgname="${_pkgname}-git" +pkgver=.543.gf6ea9d6 pkgrel=1 -arch=('x86_64') +arch=("x86_64") url="https://github.com/waycrate/swhkd" pkgdesc="A display server independent hotkey daemon inspired by sxhkd." -license=('BSD') -depends=('polkit') -makedepends=('rustup' 'make' 'git' 'scdoc') -conflicts=('swhkd-musl-git') -source=("$_pkgname::git+https://github.com/waycrate/$_pkgname") -sha256sums=('SKIP') +license=("BSD") +depends=("polkit") +makedepends=("rustup" "make" "git" "scdoc") +conflicts=("swhkd-musl-git") +source=("${_pkgname}::git+${url}.git") +sha256sums=("SKIP") build(){ cd "$_pkgname" - scdoc < ./swhkd.1.scd > swhkd.1.gz - scdoc < ./swhks.1.scd > swhks.1.gz - scdoc < ./swhkd.5.scd > swhkd.5.gz - scdoc < ./swhkd-keys.5.scd > swhkd-keys.5.gz + scdoc < ./docs/swhkd.1.scd > ./docs/swhkd.1.gz + scdoc < ./docs/swhks.1.scd > ./docs/swhks.1.gz + scdoc < ./docs/swhkd.5.scd > ./docs/swhkd.5.gz + scdoc < ./docs/swhkd-keys.5.scd > ./docs/swhkd-keys.5.gz make setup make } @@ -31,11 +32,11 @@ package() { install -Dm 755 ./target/release/swhks "$pkgdir/usr/bin/swhks" install -Dm 644 -o root ./com.github.swhkd.pkexec.policy -t "$pkgdir/usr/share/polkit-1/actions" - install -Dm 644 ./*.1.gz -t "$pkgdir/usr/share/man/man1/" - install -Dm 644 ./*.5.gz -t "$pkgdir/usr/share/man/man5/" + install -Dm 644 ./docs/*.1.gz -t "$pkgdir/usr/share/man/man1/" + install -Dm 644 ./docs/*.5.gz -t "$pkgdir/usr/share/man/man5/" } pkgver() { cd $_pkgname - echo "$(grep '^version =' Cargo.toml|head -n1|cut -d\" -f2|cut -d\- -f1).$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)" + echo "$(grep "^version =" Cargo.toml|head -n1|cut -d\" -f2|cut -d\- -f1).$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)" } diff --git a/swhkd-keys.5.scd b/docs/swhkd-keys.5.scd similarity index 100% rename from swhkd-keys.5.scd rename to docs/swhkd-keys.5.scd diff --git a/swhkd.1.scd b/docs/swhkd.1.scd similarity index 100% rename from swhkd.1.scd rename to docs/swhkd.1.scd diff --git a/swhkd.5.scd b/docs/swhkd.5.scd similarity index 100% rename from swhkd.5.scd rename to docs/swhkd.5.scd diff --git a/swhks.1.scd b/docs/swhks.1.scd similarity index 100% rename from swhks.1.scd rename to docs/swhks.1.scd