From 7f43d03a0df198bb0bbd5ea8effe68ea85caceef Mon Sep 17 00:00:00 2001
From: speedie
Date: Mon, 8 May 2023 11:39:34 +0200
Subject: [PATCH] update docs, remove makefile
---
Makefile | 142 ----------------------------
PKGBUILD | 22 +++--
README.html | 27 ++----
README.md | 16 ++--
code.html | 4 +-
scripts/make/generate-pacman-pkg.sh | 4 +-
scripts/make/generate-pkg.sh | 3 +-
7 files changed, 35 insertions(+), 183 deletions(-)
delete mode 100644 Makefile
diff --git a/Makefile b/Makefile
deleted file mode 100644
index e6f721c..0000000
--- a/Makefile
+++ /dev/null
@@ -1,142 +0,0 @@
-# spmenu - fancy dynamic menu
-# See LICENSE file for copyright and license details.
-
-include host.mk
-include toggle.mk
-
-# spmenu version
-VERSION = 1.1
-
-CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XINERAMATOGGLE) $(BDTOGGLE) $(PANGOTOGGLE) $(IMLIB2TOGGLE) $(LIBCONFIGTOGGLE) $(XRDBTOGGLE)
-CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations $(OPT) $(INCS) $(CPPFLAGS)
-LDFLAGS = $(LIBS)
-INCS = -I$(X11INC) -I$(FREETYPEINC) -I$(BDINC) `pkg-config --cflags $(PANGOCONF) $(PANGOXFTCONF) $(OPENSSLCONF) $(LIBCONFIGCONF)`
-LIBS = -L$(X11LIB) $(X11LIBS) $(XINERAMALIBS) $(FREETYPELIBS) $(XRENDERLIBS) -lm `pkg-config --libs $(PANGOCONF) $(PANGOXFTCONF) $(OPENSSLCONF) $(LIBCONFIGCONF)` $(BDLIBS) $(IMLIB2LIBS)
-
-SRC = libs/libdrw/draw.c spmenu.c libs/sl/main.c
-OBJ = $(SRC:.c=.o)
-
-all: options spmenu
-
-options:
- @echo spmenu build options:
- @echo "CFLAGS = $(CFLAGS)"
- @echo "LDFLAGS = $(LDFLAGS)"
- @echo "CC = $(CC)"
-
-.c.o:
- $(CC) -c $(CFLAGS) -g $<
-
-
-$(OBJ): options.h libs/libdrw/draw.h
-
-spmenu: spmenu.o libs/libdrw/draw.o libs/sl/main.o
- $(CC) -o $@ spmenu.o draw.o main.o $(LDFLAGS)
-
-clean:
- rm -f spmenu spmenu-$(VERSION).tar.gz spmenu-$(VERSION).PKGBUILD *.o *zst*
-
-dist: clean man
- mkdir -p spmenu-$(VERSION)
- cp -rf LICENSE Makefile *.h *.mk *.c scripts/ docs/ libs/ PKGBUILD build.sh spmenu-$(VERSION)
- [ -f buildconf ] && cp buildconf spmenu-$(VERSION) || :
- [ -f spmenu.1 ] && cp spmenu.1 spmenu-$(VERSION) || :
- tar -cf spmenu-$(VERSION).tar spmenu-$(VERSION)
- gzip spmenu-$(VERSION).tar
- rm -rf spmenu-$(VERSION)
-
-install: spmenu
- rm -rf $(DESTDIR)$(PREFIX)/share/spmenu/
- mkdir -p $(DESTDIR)$(PREFIX)/bin
- mkdir -p $(DESTDIR)$(PREFIX)/share/spmenu
- cp docs/example.Xresources example.Xresources.orig && sed -i "s/VERSION/$(VERSION)/g" docs/example.Xresources
- cp -r docs/* $(DESTDIR)$(PREFIX)/share/spmenu/
- mv example.Xresources.orig docs/example.Xresources
- echo "$(VERSION)" > $(DESTDIR)$(PREFIX)/share/spmenu/version
- echo "$(CC)" > $(DESTDIR)$(PREFIX)/share/spmenu/cc
- echo "$(CFLAGS)" > $(DESTDIR)$(PREFIX)/share/spmenu/cflags
- echo "$$(date "+%D %T")" > $(DESTDIR)$(PREFIX)/share/spmenu/compile-date
- cp -r spmenu scripts/spmenu* $(DESTDIR)$(PREFIX)/bin
- [ -f spmenu.1 ] && mkdir -p $(DESTDIR)$(MANPREFIX)/man1 || :
- [ -f spmenu.1 ] && cp spmenu.1 $(DESTDIR)$(MANPREFIX)/man1/spmenu.1 || :
- chmod 755 $(DESTDIR)$(PREFIX)/bin/spmenu*
- rm -f *.o
- rm -f spmenu
-
-install_mac: spmenu
- rm -rf $(DESTDIR)$(PREFIX)/share/spmenu/
- mkdir -p $(DESTDIR)$(PREFIX)/bin
- mkdir -p $(DESTDIR)$(PREFIX)/share/spmenu
- cp -r docs/* $(DESTDIR)$(PREFIX)/share/spmenu/
- echo "$(VERSION)" > $(DESTDIR)$(PREFIX)/share/spmenu/version
- echo "$(CC)" > $(DESTDIR)$(PREFIX)/share/spmenu/cc
- echo "$(CFLAGS)" > $(DESTDIR)$(PREFIX)/share/spmenu/cflags
- echo "$$(date "+%D %T")" > $(DESTDIR)$(PREFIX)/share/spmenu/compile-date
- cp -r spmenu scripts/spmenu* $(DESTDIR)$(PREFIX)/bin
- [ -f spmenu.1 ] && mkdir -p $(DESTDIR)$(MANPREFIX)/man1 || :
- [ -f spmenu.1 ] && cp spmenu.1 $(DESTDIR)$(MANPREFIX)/man1/spmenu.1 || :
- chmod 755 $(DESTDIR)$(PREFIX)/bin/spmenu*
- rm -f *.o
- rm -f spmenu
-
-compat:
- rm -f $(DESTDIR)$(PREFIX)/bin/dmenu
- rm -f $(DESTDIR)$(PREFIX)/bin/dmenu_run
- ln -s $(DESTDIR)$(PREFIX)/bin/spmenu $(DESTDIR)$(PREFIX)/bin/dmenu
- ln -s $(DESTDIR)$(PREFIX)/bin/spmenu_run $(DESTDIR)$(PREFIX)/bin/dmenu_run
-
-uninstall:
- rm -f \
- $(DESTDIR)$(PREFIX)/bin/spmenu*
-
-help:
- @echo spmenu Makefile help
- @echo
- @echo install: Installs spmenu. You may need to run this as root.
- @echo install_mac: Installs spmenu on a Mac. You may need to run this as root.
- @echo uninstall: Uninstalls spmenu. You may need to run this as root.
- @echo install_arch: Uses the PKGBUILD to install spmenu using pacman.
- @echo dist: Creates a release for spmenu.
- @echo clean: Removes objects and tarballs.
- @echo docs: Generate full documentation for spmenu
- @echo man: Generate man page for spmenu
- @echo compat: Installs compatibility with dmenu. WARNING: This will overwrite dmenu and dmenu_run
- @echo commit: Commit to the repository
- @echo pkg_arch: Creates an Arch package based on the PKGBUILD
- @echo help: Displays this help sheet.
-
-man:
- printf "%% spmenu(1) $(VERSION) | fancy dynamic menu\n" > .man.md
- grep -v docs/preview.png docs/docs.md >> .man.md
- pandoc --standalone --to man .man.md -o spmenu.1
- pandoc --standalone .man.md -o spmenu.html
- rm -f .man.md
-
-docs: man
- scripts/make/generate-code-docs.sh docs/code-docs.md code.html || exit 1
- pandoc --standalone README.md -o README.html
-
-pkg_arch: dist
- command -v makepkg > /dev/null || exit 1
- [ -f PKGBUILD ] || exit 1
- cp -f PKGBUILD PKGBUILD.orig
- sed -i "s/VERSION/$(VERSION)/g; s/MD5SUM/$$(md5sum *.tar.gz | cut -d ' ' -f 1)/g" PKGBUILD
- makepkg -sfr --sign || exit 1
- rm -rf src/ pkg/ *.tar.gz
- cp PKGBUILD spmenu-$(VERSION).PKGBUILD; mv PKGBUILD.orig PKGBUILD
-
-install_arch: dist
- command -v makepkg > /dev/null || exit 1
- [ -f PKGBUILD ] || exit 1
- cp -f PKGBUILD PKGBUILD.orig
- sed -i "s/VERSION/$(VERSION)/g; s/MD5SUM/$$(md5sum *.tar.gz | cut -d ' ' -f 1)/g" PKGBUILD
- makepkg -si || :
- rm -rf src/ pkg/ *.tar.gz
- cp PKGBUILD spmenu-$(VERSION).PKGBUILD; mv PKGBUILD.orig PKGBUILD
-
-commit: docs
- command -v git > /dev/null || exit 1
- git add *
- git commit -a || :
-
-.PHONY: all options clean dist install install_mac install_arch uninstall pkg_arch help man docs commit
diff --git a/PKGBUILD b/PKGBUILD
index 9e6c6cd..111d8eb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,8 +7,8 @@ pkgdesc="Fancy dynamic menu, compatible with dmenu!"
url="https://git.speedie.site/spmenu"
arch=(i686 x86_64)
license=(MIT)
-depends=(sh libxinerama libxft pango libx11 imlib2 fribidi libconfig gcc)
-makedepends=(git)
+depends=(sh libxinerama libxft pango libx11 imlib2 fribidi libconfig)
+makedepends=(git meson ninja pandoc)
provides=($pkgname)
conflicts=($pkgname)
source=(
@@ -20,14 +20,20 @@ md5sums=(MD5SUM)
build(){
cd $pkgname-$pkgver
- make \
- X11INC=/usr/include/X11 \
- X11LIB=/usr/lib/X11 \
- CC=gcc
+ mkdir -p build/
+ meson setup --reconfigure build
+ ninja -C build
}
package() {
cd "$pkgname-$pkgver"
- make PREFIX=/usr DESTDIR="$pkgdir" CC=gcc install
- install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+
+ mkdir -p "$pkgdir/usr/share/spmenu"
+ install -Dm644 docs/docs.md "$pkgdir/usr/share/spmenu/"
+ install -Dm644 docs/code-docs.md "$pkgdir/usr/share/spmenu/"
+ install -Dm644 docs/example.Xresources "$pkgdir/usr/share/spmenu/"
+ install -Dm644 docs/spmenu.conf "$pkgdir/usr/share/spmenu/"
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm755 scripts/spmenu_run "$pkgdir/usr/bin/spmenu"
+ install -Dm755 scripts/spmenu_test "$pkgdir/usr/bin/spmenu"
}
diff --git a/README.html b/README.html
index b7f265d..f95d093 100644
--- a/README.html
+++ b/README.html
@@ -220,8 +220,6 @@ with dmenu. Just pass the original arguments.
- build.sh: Setting
imlib2=false
in
buildconf
.
-- Makefile: Editing
toggle.mk
and commenting out a few
-lines.
libXinerama
@@ -230,16 +228,12 @@ lines.
- build.sh: Setting
xinerama=false
in
buildconf
.
-- Makefile: Editing
toggle.mk
and commenting out a few
-lines.
tcc compiler
- You can swap it out for GCC or any other C99 compatible compiler by:
-- Makefile: Passing
CC="gcc"
to the make
-command.
- build.sh: Adding
CC="gcc"
to the
buildconf
. command if you want)
@@ -251,8 +245,6 @@ disabled if you don’t want this by:
- build.sh: Setting
imlib2=false
and
openssl=false
in buildconf
.
-- Makefile: Editing
toggle.mk
and commenting out a few
-lines.
Pango
@@ -261,8 +253,6 @@ lines.
- build.sh: Setting
pango=false
and
pangoxft=false
in buildconf
.
-- Makefile: Editing
toggle.mk
and commenting out a few
-lines.
libconfig
@@ -271,10 +261,12 @@ lines.
- build.sh: Setting
libconfig=false
in
buildconf
.
-- Makefile: Editing
toggle.mk
and commenting out a few
-lines.
+meson
+
+- Used to compile spmenu
+
Installation (GNU/Linux, *BSD)
emerge dev-vcs/git
, pacman -S git
,
@@ -282,9 +274,7 @@ lines.
git clone https://git.speedie.site/spmenu
cd spmenu/
./build.sh # Run as root. Install any missing dependencies.
-Report any issues with the build.sh script. There’s also a Makefile
-which you can use but it may require editing host.mk and toggle.mk
-manually.
+Report any issues with the build.sh script.
Installation (macOS/OS X/Mac OS
X)
NOTE: Adds Xquartz as a dependency. I highly recommend you use
@@ -309,9 +299,10 @@ packages.
If you are on Arch GNU/Linux, you can add my repository
which includes spmenu
as well as other useful packages.
-There’s also a PKGBUILD. To use it, simply
-make install_arch
in the directory the PKGBUILD is
-located.
+There’s also a PKGBUILD. To use it, simply run
+scripts/make/generate-pacman-pkg.sh
in the directory the
+PKGBUILD is located. You can then pacman -U
this package,
+or add it to your repository.
If you wish to package spmenu for your GNU/Linux distribution, feel
free to add it to this list.
TODO
diff --git a/README.md b/README.md
index a7fb6a0..46fa73f 100644
--- a/README.md
+++ b/README.md
@@ -45,29 +45,25 @@ Just pass the original arguments.
- imlib2
- Used for image support, can be disabled if you don't want this by:
- build.sh: Setting `imlib2=false` in `buildconf`.
- - Makefile: Editing `toggle.mk` and commenting out a few lines.
- libXinerama
- Can be disabled if you don't want/need multi-monitor support by:
- build.sh: Setting `xinerama=false` in `buildconf`.
- - Makefile: Editing `toggle.mk` and commenting out a few lines.
- tcc compiler
- You can swap it out for GCC or any other C99 compatible compiler by:
- - Makefile: Passing `CC="gcc"` to the `make` command.
- build.sh: Adding `CC="gcc"` to the `buildconf`.
command if you want)
- OpenSSL
- Used to calculate MD5 of images if image support is enabled, can be
disabled if you don't want this by:
- build.sh: Setting `imlib2=false` and `openssl=false` in `buildconf`.
- - Makefile: Editing `toggle.mk` and commenting out a few lines.
- Pango
- Can be disabled if you don't want/need Pango markup by:
- build.sh: Setting `pango=false` and `pangoxft=false` in `buildconf`.
- - Makefile: Editing `toggle.mk` and commenting out a few lines.
- libconfig
- Can be disabled if you don't want/need config file support by:
- build.sh: Setting `libconfig=false` in `buildconf`.
- - Makefile: Editing `toggle.mk` and commenting out a few lines.
+- meson
+ - Used to compile spmenu
## Installation (GNU/Linux, \*BSD)
@@ -79,8 +75,7 @@ disabled if you don't want this by:
`./build.sh # Run as root. Install any missing dependencies.`
-Report any issues with the build.sh script. There's also a Makefile which
-you can use but it may require editing host.mk and toggle.mk manually.
+Report any issues with the build.sh script.
## Installation (macOS/OS X/Mac OS X)
@@ -110,8 +105,9 @@ If you are on Arch GNU/Linux, you can add
[my repository](https://git.speedie.site/speedie-repository) which includes
`spmenu` as well as other useful packages.
-There's also a PKGBUILD. To use it, simply `make install_arch` in the directory
-the PKGBUILD is located.
+There's also a PKGBUILD. To use it, simply run
+`scripts/make/generate-pacman-pkg.sh` in the directory the PKGBUILD is
+located. You can then `pacman -U` this package, or add it to your repository.
If you wish to package spmenu for your GNU/Linux distribution, feel free to add
it to this list.
diff --git a/code.html b/code.html
index aca1524..3d2f7e1 100644
--- a/code.html
+++ b/code.html
@@ -4,7 +4,7 @@
- spmenu documentation 1.1
+ spmenu documentation unknown