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