summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-11-09 09:27:15 -0300
committerEuAndreh <eu@euandre.org>2023-11-09 10:33:56 -0300
commitb044318951258e39ef4a547c2b00a05b795d827a (patch)
tree319ba916a3d2758800dcdd827b9d1ed92ac4223e /Makefile
parentRefine description and long-description (diff)
downloadpapod-b044318951258e39ef4a547c2b00a05b795d827a.tar.gz
papod-b044318951258e39ef4a547c2b00a05b795d827a.tar.xz
Setup correct project install and uninstall
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index f590e16..beb18b1 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,7 @@ TRANSLATIONS =
PREFIX = /usr
BINDIR = $(PREFIX)/bin
LIBDIR = $(PREFIX)/lib
-JSLIBDIR = $(LIBDIR)/$(NAME)
+JSLIBDIR = $(LIBDIR)/node_modules/$(NAME)
SHAREDIR = $(PREFIX)/share
LOCALEDIR = $(SHAREDIR)/locale
MANDIR = $(SHAREDIR)/man
@@ -101,8 +101,11 @@ clean:
## ensures that all installable artifacts are crafted beforehand.
install: all
mkdir -p \
- '$(DESTDIR)$(BINDIR)'
- cp src/bin/$(NAME) '$(DESTDIR)$(BINDIR)'
+ '$(DESTDIR)$(BINDIR)' \
+ '$(DESTDIR)$(JSLIBDIR)'/src
+ cp package.json '$(DESTDIR)$(JSLIBDIR)'
+ cp src/*.js '$(DESTDIR)$(JSLIBDIR)'/src
+ ln -frs '$(DESTDIR)$(JSLIBDIR)'/src/cli.js '$(DESTDIR)$(BINDIR)'/$(NAME)
sh tools/manpages.sh -ip '$(DESTDIR)$(MANDIR)' $(manpages)
## Uninstalls from $(DESTDIR)$(PREFIX). This is a perfect mirror
@@ -111,6 +114,7 @@ install: all
uninstall:
rm -f \
'$(DESTDIR)$(BINDIR)'/$(NAME)
+ rm -rf '$(DESTDIR)$(JSLIBDIR)'
sh tools/manpages.sh -up '$(DESTDIR)$(MANDIR)' $(manpages)