# Basic Makefile for (un)installing the files, and creating archives manually.
#
# Supports standard GNU Makefile variables for specifying the paths:
# * prefix
# * datarootdir
# * datadir
# * DESTDIR
#
SHELL = /bin/bash
AUTHOR = adobe
PACKAGE = mapping-resources-pdf
NAME = $(AUTHOR)-$(PACKAGE)
# So far there's no versioning in place. If there will be any, then we will
# switch to commented line below...
VERSION =
ARCHIVE_NAME = $(NAME)
#ARCHIVE_NAME = $(NAME)-$(VERSION)
# Other files might be written in $(packagedir), remove only what has been installed:
uninstall:
rm -rf $(DESTDIR)$(packagedir)/$(PDF_mappings_other)
rm -rf $(DESTDIR)$(packagedir)/$(PDF_mappings_unicode)
# We are putting the source files into subfolder, same as Github does for its releases:
git-archive:
git archive -v --format=$(GIT_ARCHIVE_TYPE) --prefix=$(ARCHIVE_NAME)/ HEAD -o $(ARCHIVE_NAME).$(GIT_ARCHIVE_TYPE)
# The --transform option is what will put the source files into a $(ARCHIVE_NAME) subdirectory:
tar.bz2:
tar --transform="s|^|$(ARCHIVE_NAME)/|" -cjvf $(ARCHIVE_NAME).tar.bz2 $(PDF_mappings_other) $(PDF_mappings_unicode) $(DISTFILES)
tar.gz:
tar --transform="s|^|$(ARCHIVE_NAME)/|" -czvf $(ARCHIVE_NAME).tar.gz $(PDF_mappings_other) $(PDF_mappings_unicode) $(DISTFILES)
tar.xz:
tar --transform="s|^|$(ARCHIVE_NAME)/|" -cJvf $(ARCHIVE_NAME).tar.xz $(PDF_mappings_other) $(PDF_mappings_unicode) $(DISTFILES)