summaryrefslogtreecommitdiff
path: root/reolink/Makefile
blob: 182df2a2f331e4fa781dd2498652dcff39cd4891 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Installation for the reolink daemon
#
# N.b. written for OpenBSD. YMMV on other platforms.

# protect a little against blindly typing "make"
all:
	@echo 'Try "make install" instead'

install:
	libdir=`perl -V:installsitelib | sed -e "s/^installsitelib='//" -e "s/';\$$//"`; \
	if [ -d "$$libdir" ]; then \
		install -m 0444 Reolink.pm "$$libdir/Reolink.pm"; \
	else \
		echo "perl site libdir $$libdir does not exist"; exit 1; \
	fi
	install -m 0555 reolink        /usr/sbin/reolink
	install -m 0555 reolink.rc     /etc/rc.d/reolink
	install -m 0644 reolink.conf   /etc/examples/reolink.conf
	install -m 0444 reolink.8      /usr/share/man/man8/reolink.8
	install -m 0444 reolink.conf.5 /usr/share/man/man5/reolink.conf.5
	makewhatis /usr/share/man
	@echo "-> Enable reolink service manually with rcctl(8)"