2012-11-22 12:35:37 -01:00
|
|
|
GITVER := $(shell git rev-parse HEAD)
|
2013-08-11 10:17:53 +00:00
|
|
|
VERSION = 0.19
|
2012-07-06 13:29:12 +00:00
|
|
|
PREFIX ?= /usr/local
|
|
|
|
SBINDIR ?= $(PREFIX)/sbin
|
|
|
|
SHAREDIR ?= $(PREFIX)/share
|
|
|
|
DRACUTMODDIR ?= $(PREFIX)/lib/dracut/modules.d/01vmklive
|
2012-06-12 14:27:17 +00:00
|
|
|
|
2013-05-19 07:39:56 +00:00
|
|
|
SHIN += $(shell find -type f -name '*.sh.in')
|
|
|
|
SCRIPTS += $(SHIN:.sh.in=.sh)
|
|
|
|
|
|
|
|
%.sh: %.sh.in
|
|
|
|
sed -e "s|@@MKLIVE_VERSION@@|$(VERSION) $(GITVER)|g" $^ > $@
|
|
|
|
|
|
|
|
all: $(SCRIPTS)
|
2012-06-12 14:27:17 +00:00
|
|
|
|
|
|
|
install: all
|
|
|
|
install -d $(DESTDIR)$(SBINDIR)
|
2013-08-11 10:18:47 +00:00
|
|
|
install -m755 mkimage.sh $(DESTDIR)$(SBINDIR)/void-mkimage
|
2012-06-12 14:27:17 +00:00
|
|
|
install -m755 mklive.sh $(DESTDIR)$(SBINDIR)/void-mklive
|
2013-05-19 07:39:56 +00:00
|
|
|
install -m755 mkrootfs.sh $(DESTDIR)$(SBINDIR)/void-mkrootfs
|
|
|
|
install -m755 installer.sh $(DESTDIR)$(SBINDIR)/void-installer
|
2012-06-12 14:27:17 +00:00
|
|
|
install -d $(DESTDIR)$(DRACUTMODDIR)
|
2012-06-14 09:21:54 +00:00
|
|
|
install -m755 dracut/*.sh $(DESTDIR)$(DRACUTMODDIR)
|
2012-07-06 13:29:12 +00:00
|
|
|
install -d $(DESTDIR)$(SHAREDIR)/void-mklive
|
|
|
|
install -m644 grub/*.cfg* $(DESTDIR)$(SHAREDIR)/void-mklive
|
|
|
|
install -m644 isolinux/*.cfg* $(DESTDIR)$(SHAREDIR)/void-mklive
|
2012-06-12 14:27:17 +00:00
|
|
|
|
|
|
|
clean:
|
2013-05-19 07:39:56 +00:00
|
|
|
-rm -f *.sh
|
2012-06-12 14:27:17 +00:00
|
|
|
|
2012-06-12 14:39:45 +00:00
|
|
|
dist:
|
|
|
|
@echo "Building distribution tarball for tag: v$(VERSION) ..."
|
|
|
|
-@git archive --format=tar --prefix=void-mklive-$(VERSION)/ \
|
|
|
|
v$(VERSION) | xz -9 > ~/void-mklive-$(VERSION).tar.xz
|
|
|
|
|
|
|
|
.PHONY: all clean install dist
|