-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (33 loc) · 1.04 KB
/
Makefile
File metadata and controls
43 lines (33 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
SHELL = /bin/sh
PREFIX ?= /usr
DESTDIR ?=
LIBDIR ?= $(PREFIX)/lib
BINDIR ?= $(PREFIX)/bin
ALTBINDIR ?= $(PREFIX)/local/bin
DATAROOTDIR ?= $(PREFIX)/share
.PHONY: install
all: ppd test-ppd dist
ppd:
LC_NUMERIC=C ppdc xiqi.drv
test-ppd:
LC_NUMERIC=C ppdc -t xiqi.drv
clean-python:
rm -rf build dist src/rastertofunnyprint.egg-info src/rastertofunnyprint/__pycache__
clean-ppd:
rm -rf ppd
clean: clean-python clean-ppd
dist:
python3 -m build
install:
ifeq ($(DESTDIR),)
pip3 install .
else
pip3 install --root="$(DESTDIR)" .
endif
[ -f $(BINDIR)/rastertofunnyprint ] && ln -s $(BINDIR)/rastertofunnyprint $(DESTDIR)$(LIBDIR)/cups/backend/funnyprint || true
[ -f $(ALTBINDIR)/rastertofunnyprint ] && ln -s $(ALTBINDIR)/rastertofunnyprint $(DESTDIR)$(LIBDIR)/cups/backend/funnyprint || true
install -m644 xiqi.drv $(DESTDIR)$(DATAROOTDIR)/cups/drv/funnyprint-xiqi.drv
uninstall:
pip3 uninstall rastertofunnyprint || true
rm $(DESTDIR)$(LIBDIR)/cups/backend/funnyprint || true
rm $(DESTDIR)$(DATAROOTDIR)/cups/drv/funnyprint-xiqi.drv || true