Install the sample scripts too.
authorDaniel Carl <danielcarl@gmx.de>
Mon, 23 Feb 2015 22:40:11 +0000 (23:40 +0100)
committerDaniel Carl <danielcarl@gmx.de>
Mon, 23 Feb 2015 22:40:11 +0000 (23:40 +0100)
Makefile
config.mk
doc/vimb.1

index 02f9d7d..566f945 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -19,13 +19,13 @@ clean:
        @$(MAKE) $(MFLAGS) -C tests clean
 
 install: $(TARGET) $(DOCDIR)/$(MAN1)
-       install -d $(DESTDIR)$(BINDIR)
+       install -D -m 755 $(SRCDIR)/$(TARGET) $(DESTDIR)$(BINDIR)/$(TARGET)
+       install -d $(DESTDIR)$(EXAMPLEDIR)
+       cp -r examples/* $(DESTDIR)$(EXAMPLEDIR)
        install -d $(DESTDIR)$(MANDIR)/man1
-       install -m 755 $(SRCDIR)/$(TARGET) $(DESTDIR)$(BINDIR)/$(TARGET)
-       @echo "install -m 644 $(SRCDIR)/$(MAN1) $(DESTDIR)$(MANDIR)/man1/$(MAN1)"
-       @sed -e "s/VERSION/$(VERSION)/g" \
-               -e "s/DATE/`date +'%m %Y'`/g" < $(DOCDIR)/$(MAN1) > $(DESTDIR)$(MANDIR)/man1/$(MAN1)
-       @chmod 644 $(DESTDIR)$(MANDIR)/man1/$(MAN1)
+       @sed -e "s!VERSION!$(VERSION)!g" \
+               -e "s!PREFIX!$(PREFIX)!g" \
+               -e "s!DATE!`date +'%m %Y'`!g" $(DOCDIR)/$(MAN1) > $(DESTDIR)$(MANDIR)/man1/$(MAN1)
 
 uninstall:
        $(RM) $(DESTDIR)$(BINDIR)/$(TARGET)
index a1e3275..b94349c 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -1,10 +1,11 @@
 #----------------user/install options----------------
 VERSION = 2.9
 
-PROJECT = vimb
-PREFIX ?= /usr/local
-BINDIR ?= $(PREFIX)/bin
-MANDIR ?= $(PREFIX)/share/man
+PROJECT     = vimb
+PREFIX     ?= /usr/local
+BINDIR     ?= $(PREFIX)/bin
+MANDIR     ?= $(PREFIX)/share/man
+EXAMPLEDIR ?= $(PREFIX)/share/$(PROJECT)/examples
 
 #----------------compile options---------------------
 
index 57393af..ecf5fb1 100644 (file)
@@ -1511,7 +1511,6 @@ This fills the inputbox with the prefilled download command and replaces
 .TP
 .I $XDG_CONFIG_HOME/vimb/
 Default directory for configuration data.
-.PP
 .RS
 .PD 0
 .TP
@@ -1560,6 +1559,9 @@ Default directory for cache data.
 .TP
 .I $XDG_RUNTIME_DIR/vimb/socket/
 Directory where the control sockets are placed.
+.PP
+There are also some sample scripts installed together with vimb under
+PREFIX/share/vimb/examples.
 .SH ENVIRONMENT
 .TP
 .B http_proxy