summary refs log tree commit diff
path: root/Makefile
blob: 9df2287faa4a628f1d07c9b30a586fb350b7647e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
PREFIX ?=	/usr/local
SCRIPTS=	1 2 3 ctrlaltdel

all:
	$(CC) $(CFLAGS) halt.c -o halt
	$(CC) $(CFLAGS) pause.c -o pause

install:
	install -d ${DESTDIR}/${PREFIX}/bin
	install -m755 halt ${DESTDIR}/${PREFIX}/bin
	install -m755 pause ${DESTDIR}/${PREFIX}/bin
	ln -s halt ${DESTDIR}/${PREFIX}/bin/poweroff
	ln -s halt ${DESTDIR}/${PREFIX}/bin/reboot
	install -d ${DESTDIR}/${PREFIX}/share/man/man1
	install -m644 pause.1 ${DESTDIR}/${PREFIX}/share/man/man1
	install -d ${DESTDIR}/etc/sv
	install -d ${DESTDIR}/etc/runit/runsvdir
	install -m755 ${SCRIPTS} ${DESTDIR}/etc/runit
	install -m644 rc.conf ${DESTDIR}/etc
	cp -aP runsvdir/* ${DESTDIR}/etc/runit/runsvdir/
	cp -aP services/* ${DESTDIR}/etc/sv/