Krolyxon
Commit 9e22f32

Branches

Refs →

nsxiv9e22f32

Change location of example scripts (#86)

* Use DOCPREFIX similar to MANPREFIX
Author
Berke Kocaoğlu
Date
2021-09-22 21:36 +0300
Committer
GitHub · 2021-09-22 18:36 +0000
Parent
915a7fd
Commit
9e22f32c07db0b3b2d72fb252872c9f7bc7141e3

+10 −5

5 files changed

  1. M Makefile +4 −3
  2. M README.md +4 −0
  3. R exec/image-info → examples/image-info +0 −0
  4. R exec/key-handler → examples/key-handler +0 −0
  5. M nsxiv.1 +2 −2
M Makefile View
@@ -9,6 +9,7 @@ VERSION = 27.1
99 # PREFIX for install
1010 PREFIX ?= /usr/local
1111 MANPREFIX = $(PREFIX)/share/man
12+DOCPREFIX = $(PREFIX)/share/doc/nsxiv
1213
1314 # autoreload backend: inotify/nop
1415 AUTORELOAD = inotify
@@ -82,11 +83,11 @@ install: all
8283 install -Dt $(DESTDIR)$(PREFIX)/bin nsxiv
8384 @echo "INSTALL nsxiv.1"
8485 mkdir -p $(DESTDIR)$(MANPREFIX)/man1
85− sed "s!PREFIX!$(PREFIX)!g; s!VERSION!$(VERSION)!g" nsxiv.1 \
86+ sed "s!DOCPREFIX!$(DOCPREFIX)!g; s!PREFIX!$(PREFIX)!g; s!VERSION!$(VERSION)!g" nsxiv.1 \
8687 >$(DESTDIR)$(MANPREFIX)/man1/nsxiv.1
8788 chmod 644 $(DESTDIR)$(MANPREFIX)/man1/nsxiv.1
8889 @echo "INSTALL share/nsxiv/"
89− install -Dt $(DESTDIR)$(PREFIX)/share/nsxiv/exec exec/*
90+ install -Dt $(DESTDIR)$(DOCPREFIX)/examples examples/*
9091
9192 uninstall:
9293 @echo "REMOVE bin/nsxiv"
@@ -94,5 +95,5 @@ uninstall:
9495 @echo "REMOVE nsxiv.1"
9596 rm -f $(DESTDIR)$(MANPREFIX)/man1/nsxiv.1
9697 @echo "REMOVE share/nsxiv/"
97− rm -rf $(DESTDIR)$(PREFIX)/share/nsxiv
98+ rm -rf $(DESTDIR)$(DOCPREFIX)
9899
M README.md View
@@ -87,6 +87,10 @@ You can install nsxiv into a directory of your choice by changing this command t
8787
8888 $ make PREFIX="/your/dir" install
8989
90+Example scripts are installed using `DOCPREFIX` which defaults to
91+`/usr/local/share/doc/nsxiv`. You can change `DOCPREFIX` the same way you can
92+change `PREFIX` shown above.
93+
9094 The build-time specific settings of nsxiv can be found in the file *config.h*.
9195 Please check and change them, so that they fit your needs.
9296 If the file *config.h* does not already exist, then you have to create it with
R exec/image-info → examples/image-info View

[No content changes]

R exec/key-handler → examples/key-handler View

[No content changes]

M nsxiv.1 View
@@ -428,7 +428,7 @@ and the arguments given to it are: 1) path to image file, 2) image width,
428428 3) image height.
429429 .P
430430 There is also an example script installed together with nsxiv as
431−.IR PREFIX/share/nsxiv/exec/image-info .
431+.IR DOCPREFIX/examples/image-info .
432432 .SH EXTERNAL KEY HANDLER
433433 Additional external keyboard commands can be defined using a handler program
434434 located in
@@ -446,7 +446,7 @@ where C/M/S indicate Ctrl/Meta(Alt)/Shift modifier states and KEY is the X
446446 keysym as listed in /usr/include/X11/keysymdef.h without the "XK_" prefix.
447447
448448 There is also an example script installed together with nsxiv as
449−.IR PREFIX/share/nsxiv/exec/key-handler .
449+.IR DOCPREFIX/examples/key-handler .
450450 .SH THUMBNAIL CACHING
451451 nsxiv stores all thumbnails under
452452 .IR $XDG_CACHE_HOME/nsxiv/ .