1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-25 08:43:02 +01:00
toxic/cfg/targets/install.mk

42 lines
1.4 KiB
Makefile
Raw Permalink Normal View History

2014-08-25 12:54:44 +02:00
# Install target
install: $(BUILD_DIR)/toxic
@echo "Installing toxic executable"
2014-10-21 11:51:02 +02:00
@mkdir -p $(abspath $(DESTDIR)/$(BINDIR))
@install -m 0755 $(BUILD_DIR)/toxic $(abspath $(DESTDIR)/$(BINDIR)/toxic)
2015-03-16 13:16:03 +01: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
@echo "Installing data files"
2014-10-21 11:51:02 +02:00
@mkdir -p $(abspath $(DESTDIR)/$(DATADIR))
@for f in $(DATAFILES) ; do \
2014-10-21 11:51:02 +02:00
install -m 0644 $(MISC_DIR)/$$f $(abspath $(DESTDIR)/$(DATADIR)/$$f) ;\
file=$(abspath $(DESTDIR)/$(DATADIR)/$$f) ;\
sed -e 's:__DATADIR__:'$(abspath $(DATADIR))':g' $$file > temp_file && \
mv temp_file $$file ;\
done
2014-10-21 11:51:02 +02:00
@mkdir -p $(abspath $(DESTDIR)/$(DATADIR))/sounds
@for f in $(SNDFILES) ; do \
2014-10-21 11:51:02 +02:00
install -m 0644 $(SND_DIR)/$$f $(abspath $(DESTDIR)/$(DATADIR)/sounds/$$f) ;\
done
2015-03-16 13:16:03 +01:00
@echo "Installing man pages"
2014-10-21 11:51:02 +02:00
@mkdir -p $(abspath $(DESTDIR)/$(MANDIR))
@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 ;\
2018-10-02 23:31:14 +02:00
section=$(abspath $(DESTDIR)/$(MANDIR))/man`echo $${f##*.}` ;\
file=$$section/$$f ;\
2014-10-21 11:51:02 +02:00
mkdir -p $$section ;\
install -m 0644 $(DOC_DIR)/$$f $$file ;\
sed -e 's:__VERSION__:'$(VERSION)':g' $$file > temp_file && \
mv temp_file $$file ;\
sed -e 's:__DATADIR__:'$(abspath $(DATADIR))':g' $$file > temp_file && \
mv temp_file $$file ;\
2017-11-13 19:30:22 +01:00
gzip -f -n -9 $$file ;\
done
.PHONY: install