2014-08-25 12:54:44 +02:00
|
|
|
# Install target
|
2015-03-21 18:33:51 +01:00
|
|
|
install: $(BUILD_DIR)/toxic
|
2014-07-30 14:14:13 +02:00
|
|
|
@echo "Installing toxic executable"
|
2014-10-21 11:51:02 +02:00
|
|
|
@mkdir -p $(abspath $(DESTDIR)/$(BINDIR))
|
2015-03-21 18:33:51 +01:00
|
|
|
@install -m 0755 $(BUILD_DIR)/toxic $(abspath $(DESTDIR)/$(BINDIR)/toxic)
|
2015-03-16 13:16:03 +01:00
|
|
|
|
2014-10-21 10:31:30 +02:00
|
|
|
@echo "Installing desktop file"
|
2014-10-21 11:51:02 +02:00
|
|
|
@mkdir -p $(abspath $(DESTDIR)/$(APPDIR))
|
|
|
|
@install -m 0644 $(MISC_DIR)/$(DESKFILE) $(abspath $(DESTDIR)/$(APPDIR)/$(DESKFILE))
|
2015-03-16 13:16:03 +01:00
|
|
|
|
2014-07-30 14:14:13 +02:00
|
|
|
@echo "Installing data files"
|
2014-10-21 11:51:02 +02:00
|
|
|
@mkdir -p $(abspath $(DESTDIR)/$(DATADIR))
|
2014-07-30 14:14:13 +02:00
|
|
|
@for f in $(DATAFILES) ; do \
|
2014-10-21 11:51:02 +02:00
|
|
|
install -m 0644 $(MISC_DIR)/$$f $(abspath $(DESTDIR)/$(DATADIR)/$$f) ;\
|
2014-10-21 10:31:30 +02:00
|
|
|
file=$(abspath $(DESTDIR)/$(DATADIR)/$$f) ;\
|
2014-07-30 14:14:13 +02:00
|
|
|
sed -i'' -e 's:__DATADIR__:'$(abspath $(DATADIR))':g' $$file ;\
|
|
|
|
done
|
2014-10-21 11:51:02 +02:00
|
|
|
@mkdir -p $(abspath $(DESTDIR)/$(DATADIR))/sounds
|
2014-07-30 14:14:13 +02:00
|
|
|
@for f in $(SNDFILES) ; do \
|
2014-10-21 11:51:02 +02:00
|
|
|
install -m 0644 $(SND_DIR)/$$f $(abspath $(DESTDIR)/$(DATADIR)/sounds/$$f) ;\
|
2014-07-30 14:14:13 +02:00
|
|
|
done
|
2015-03-16 13:16:03 +01:00
|
|
|
|
2014-07-30 14:14:13 +02:00
|
|
|
@echo "Installing man pages"
|
2014-10-21 11:51:02 +02:00
|
|
|
@mkdir -p $(abspath $(DESTDIR)/$(MANDIR))
|
2014-07-30 14:14:13 +02:00
|
|
|
@for f in $(MANFILES) ; do \
|
2014-10-30 15:23:47 +01:00
|
|
|
if [ ! -e "$(DOC_DIR)/$$f" ]; then \
|
2014-10-15 14:25:14 +02:00
|
|
|
continue ;\
|
|
|
|
fi ;\
|
2014-07-30 14:14:13 +02:00
|
|
|
section=$(abspath $(DESTDIR)/$(MANDIR))/man`echo $$f | rev | cut -d "." -f 1` ;\
|
|
|
|
file=$$section/$$f ;\
|
2014-10-21 11:51:02 +02:00
|
|
|
mkdir -p $$section ;\
|
|
|
|
install -m 0644 $(DOC_DIR)/$$f $$file ;\
|
2014-08-24 22:34:16 +02:00
|
|
|
sed -i'' -e 's:__VERSION__:'$(VERSION)':g' $$file ;\
|
|
|
|
sed -i'' -e 's:__DATADIR__:'$(abspath $(DATADIR))':g' $$file ;\
|
2014-07-30 14:14:13 +02:00
|
|
|
gzip -f -9 $$file ;\
|
|
|
|
done
|
|
|
|
|
|
|
|
.PHONY: install
|