$(RM) cubemap $(OBJS) $(DEPS) state.pb.h state.pb.cc
PREFIX=/usr/local
+SYSCONFDIR=/etc
+LOCALSTATEDIR=/var
install:
- $(INSTALL) -m 755 -o root -g root -d $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/share/man/man1 $(DESTDIR)/etc $(DESTDIR)/var/lib/cubemap $(DESTDIR)/var/log/cubemap $(DESTDIR)$(PREFIX)/share/munin/plugins
+ $(INSTALL) -m 755 -o root -g root -d \
+ $(DESTDIR)$(PREFIX)/bin \
+ $(DESTDIR)$(PREFIX)/share/man/man1 \
+ $(DESTDIR)$(SYSCONFDIR) \
+ $(DESTDIR)$(LOCALSTATEDIR)/lib/cubemap \
+ $(DESTDIR)$(LOCALSTATEDIR)/log/cubemap \
+ $(DESTDIR)$(PREFIX)/share/munin/plugins
$(INSTALL) -m 755 -o root -g root cubemap $(DESTDIR)$(PREFIX)/bin/cubemap
$(INSTALL) -m 755 -o root -g root munin/cubemap munin/cubemap_input $(DESTDIR)$(PREFIX)/share/munin/plugins/
sed \
- -e 's,cubemap\.stats,/var/lib/cubemap/\0,g' \
- -e 's,cubemap-input\.stats,/var/lib/cubemap/\0,g' \
- -e 's,access\.log,/var/log/cubemap/\0,g' \
- -e 's,cubemap\.log,/var/log/cubemap/\0,g' \
+ -e "s,cubemap\.stats,$(LOCALSTATEDIR)/lib/cubemap/\0,g" \
+ -e "s,cubemap-input\.stats,$(LOCALSTATEDIR)/lib/cubemap/\0,g" \
+ -e "s,access\.log,$(LOCALSTATEDIR)/log/cubemap/\0,g" \
+ -e "s,cubemap\.log,$(LOCALSTATEDIR)/log/cubemap/\0,g" \
-e 's,^stream,#\0,g' \
-e 's,^udpstream,#\0,g' \
- cubemap.config.sample > $(DESTDIR)/etc/cubemap.config
+ cubemap.config.sample > $(DESTDIR)$(SYSCONFDIR)/cubemap.config
gzip -c cubemap.1 > $(DESTDIR)$(PREFIX)/share/man/man1/cubemap.1.gz
.PHONY: clean install