File: Makefile

package info (click to toggle)
netconsole 0.3.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 96 kB
  • sloc: sh: 134; makefile: 33
file content (39 lines) | stat: -rw-r--r-- 1,088 bytes parent folder | download | duplicates (3)
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
PREFIX ?= /usr/local
SYSTEMD_PATH ?= /etc/systemd/system
SYSV_INIT ?= /etc/init.d

VERSION := 0.3.1
DIST := default LICENSE Makefile netconsole.init netconsole.service netconsole-setup netconsole-setup.8.md NEWS README.md

all: doc

clean:
	rm -f netconsole-setup.8

check:
	shellcheck -e SC1090,SC1091 netconsole.init netconsole-setup

dist: netconsole-$(VERSION).tar.xz netconsole-$(VERSION).tar.xz.asc

version:
	@echo $(VERSION)

%.asc: %
	gpg --armor --batch --detach-sign --yes --output $@ $^

%.tar.xz: $(DIST)
	tar -c --exclude-vcs --transform="s@^@$*/@" $^ | xz -cz9 > $@

doc: netconsole-setup.8

%.8: %.8.md
	pandoc -s -t man $^ -o $@

install: doc
	install -D -m 755 netconsole-setup $(DESTDIR)$(PREFIX)/sbin/netconsole-setup
	install -D -m 644 netconsole-setup.8 $(DESTDIR)$(PREFIX)/share/man/man8/netconsole-setup.8
	install -D -m 755 netconsole.init $(DESTDIR)$(SYSV_INIT)/netconsole
	install -D -m 644 netconsole.service $(DESTDIR)$(SYSTEMD_PATH)/netconsole.service
	install -D -m 644 default $(DESTDIR)/etc/default/netconsole

.PHONY: all check clean doc install version