From 1da2132956748d9c713ea4f6ef734015682fa030 Mon Sep 17 00:00:00 2001 From: Forest Date: Mon, 8 Sep 2014 11:01:29 -0700 Subject: [PATCH 1/3] Avoid spaces in the productID / installation directory name. The productID is used as the installation directory name, and a space character within it can be problematic for some packaging tools. We therefore use a - instead. --- Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 7da514dda1..d04ddb2df3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,7 +6,8 @@ ACLOCAL_AMFLAGS = -I autoconf/m4 ## Black magic (read: sed) for getting the product ID as defined in code, not by the autotools. ## Quotes are making vim's highlighting of this even worse, so just escape everything, ## including the escapes. Make it lowercase to match ArchHooks::MountInitialFileSystems(). -productID := $(shell sed -nr /define\\s+PRODUCT_ID_BARE/\{s/.*define\\s+PRODUCT_ID_BARE\\s+\(.+\)/\\1/\;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/\;p\;q\} $(srcdir)/src/ProductInfo.h) +## Replace space with - so package build tools won't choke on the installation directory. +productID := $(shell sed -nr /define\\s+PRODUCT_ID_BARE/\{s/.*define\\s+PRODUCT_ID_BARE\\s+\(.+\)/\\1/\;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ\ /abcdefghijklmnopqrstuvwxyz-/\;p\;q\} $(srcdir)/src/ProductInfo.h) installFiles = src/stepmania if HAVE_GTK From e8a56b17e39a0f7c1b4056e160730d9c946ea557 Mon Sep 17 00:00:00 2001 From: Forest Date: Mon, 8 Sep 2014 11:09:31 -0700 Subject: [PATCH 2/3] Prepend $(DESTDIR) to install directories, for packaging tools. --- Makefile.am | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index d04ddb2df3..0835b739e0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -27,14 +27,14 @@ dist-hook: SMData cp -r -t "$(distdir)" $(installFiles) install-exec-hook: - mkdir -p "$(prefix)/$(productID)" - $(INSTALL) $(installFiles) "$(prefix)/$(productID)" + mkdir -p "$(DESTDIR)$(prefix)/$(productID)" + $(INSTALL) $(installFiles) "$(DESTDIR)$(prefix)/$(productID)" install-data-local: - cp -r -t "$(prefix)/$(productID)" $(installData) - mkdir -p "$(prefix)/$(productID)/Songs" + cp -r -t "$(DESTDIR)$(prefix)/$(productID)" $(installData) + mkdir -p "$(DESTDIR)$(prefix)/$(productID)/Songs" uninstall-hook: - rm -f "$(prefix)/$(productID)/stepmania" - rm -f "$(prefix)/$(productID)/GtkModule.so" + rm -f "$(DESTDIR)$(prefix)/$(productID)/stepmania" + rm -f "$(DESTDIR)$(prefix)/$(productID)/GtkModule.so" # todo: properly remove data From bdaf0542f8a3d246365d2b3705a9c19c546f9c09 Mon Sep 17 00:00:00 2001 From: Forest Date: Mon, 8 Sep 2014 11:11:28 -0700 Subject: [PATCH 3/3] Make sure the target dir exists before copying to it. Parallel builds (make -j4) were failing because the installation directory wasn't guaranteed to exist before we tried copying files to it. --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 0835b739e0..271f0346ed 100644 --- a/Makefile.am +++ b/Makefile.am @@ -31,8 +31,8 @@ install-exec-hook: $(INSTALL) $(installFiles) "$(DESTDIR)$(prefix)/$(productID)" install-data-local: - cp -r -t "$(DESTDIR)$(prefix)/$(productID)" $(installData) mkdir -p "$(DESTDIR)$(prefix)/$(productID)/Songs" + cp -r -t "$(DESTDIR)$(prefix)/$(productID)" $(installData) uninstall-hook: rm -f "$(DESTDIR)$(prefix)/$(productID)/stepmania"