forked from OpenPrinting/ipp-usb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (24 loc) · 777 Bytes
/
Makefile
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
MANDIR = /usr/share/man/
QUIRKSDIR = /usr/share/ipp-usb/quirks
MANPAGE = ipp-usb.8
# Merge DESTDIR and PREFIX
PREFIX := $(abspath $(DESTDIR)/$(PREFIX))
ifeq ($(PREFIX),/)
PREFIX :=
endif
all:
-gotags -R . > tags
go build -ldflags "-s -w" -tags nethttpomithttp2
man: $(MANPAGE)
$(MANPAGE): $(MANPAGE).md
ronn --roff --manual=$@ $<
install: all
install -s -D -t $(PREFIX)/sbin ipp-usb
install -m 644 -D -t $(PREFIX)/lib/udev/rules.d systemd-udev/*.rules
install -m 644 -D -t $(PREFIX)/lib/systemd/system systemd-udev/*.service
install -m 644 -D -t $(PREFIX)/etc/ipp-usb ipp-usb.conf
mkdir -p $(PREFIX)/$(MANDIR)/man8
gzip <$(MANPAGE) > $(PREFIX)$(MANDIR)/man8/$(MANPAGE).gz
install -m 644 -D -t $(PREFIX)/$(QUIRKSDIR) ipp-usb-quirks/*
test:
go test