aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-03-21 17:13:32 +0100
committerGuilhem Moulin <guilhem@fripost.org>2015-03-23 12:54:09 +0100
commit80438cd2af17083d85bb12da6756961abfedecbb (patch)
treefa7f801395d3e38ceebc28cca7c14b97bbbfcbcc
parentce23c7053355aa3bdae387959eeeb2a67ced2ad3 (diff)
Move the CLI part to a dedicated dir, with a separate Makefile.
-rw-r--r--.gitignore1
-rw-r--r--cli/Makefile24
-rw-r--r--cli/bash-completion.sh (renamed from bash-completion.sh)0
-rwxr-xr-xcli/icevault (renamed from icevault)0
-rw-r--r--cli/icevault.1 (renamed from icevault.1)0
-rw-r--r--xul-ext/Makefile6
6 files changed, 27 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 15af1aa..68daace 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
*.xpi
+/cli/icevault.1.gz
diff --git a/cli/Makefile b/cli/Makefile
new file mode 100644
index 0000000..04313a6
--- /dev/null
+++ b/cli/Makefile
@@ -0,0 +1,24 @@
+PREFIX ?= /usr
+MANPREFIX ?= $(PREFIX)/share/man
+BASHCOMP_PATH ?= $(DESTDIR)$(PREFIX)/share/bash-completion/completions
+
+all:
+
+install: all installman
+ install -v -d $(DESTDIR)$(PREFIX)/bin
+ install -v -m 0755 icevault $(DESTDIR)$(PREFIX)/bin
+ install -v -d $(BASHCOMP_PATH)
+ install -v -m 0644 bash-completion.sh $(BASHCOMP_PATH)/icevault
+
+installman:
+ install -v -d $(DESTDIR)$(MANPREFIX)/man1
+ gzip -fkn icevault.1
+ install -v -m 0644 icevault.1.gz $(DESTDIR)$(MANPREFIX)/man1
+
+uninstall:
+ rm -f $(DESTDIR)$(PREFIX)/bin/icevault $(BASHCOMP_PATH)/icevault $(DESTDIR)$(MANPREFIX)/man1/icevault.1.gz
+
+clean:
+ rm -f icevault.1.gz
+
+.PHONY: all install installman clean
diff --git a/bash-completion.sh b/cli/bash-completion.sh
index 81bee51..81bee51 100644
--- a/bash-completion.sh
+++ b/cli/bash-completion.sh
diff --git a/icevault b/cli/icevault
index 43b8e50..43b8e50 100755
--- a/icevault
+++ b/cli/icevault
diff --git a/icevault.1 b/cli/icevault.1
index 1413382..1413382 100644
--- a/icevault.1
+++ b/cli/icevault.1
diff --git a/xul-ext/Makefile b/xul-ext/Makefile
index d44f648..aa2eff2 100644
--- a/xul-ext/Makefile
+++ b/xul-ext/Makefile
@@ -1,8 +1,6 @@
-XPI_NAME:=$(shell sed -nr '/.*<em:id>([^<]+)<\/em:id>.*/ {s//..\/\1.xpi/p;q}' install.rdf)
+all: ../icevault.xpi
-all: $(XPI_NAME)
-
-$(XPI_NAME): chrome.manifest install.rdf COPYING $(shell find chrome/ -type f)
+%.xpi: chrome.manifest install.rdf COPYING $(shell find chrome/ -type f)
zip $@ $^
clean: