summarylogtreecommitdiffstats
path: root/040_fix-install.patch
blob: 00b48367dfa6c365a3ec850aa48f237f1144f7d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Description: fix and modernize install, in accordance with FHS 3.0
Author: Joao Eriberto Mota Filho <eriberto@debian.org>
Last-Update: 2020-04-06
Index: magicrescue/Makefile.in
===================================================================
--- magicrescue.orig/Makefile.in
+++ magicrescue/Makefile.in
@@ -56,32 +56,32 @@ docs-clean:
 maintainer-clean: distclean docs-clean
 
 install: all
-	mkdir -p $(INSTALLDIR)/share/magicrescue/tools \
+	mkdir -p $(INSTALLDIR)/libexec/magicrescue/tools \
 	    $(INSTALLDIR)/share/magicrescue/recipes \
-	    $(INSTALLDIR)/man/man1 \
+	    $(INSTALLDIR)/share/man/man1 \
 	    $(INSTALLDIR)/bin
 	
 	cp magicrescue$(EXE) dupemap$(EXE) magicsort $(INSTALLDIR)/bin/
 	cp recipes/* $(INSTALLDIR)/share/magicrescue/recipes/
-	cp $(DOCS) $(INSTALLDIR)/man/man1
+	cp $(DOCS) $(INSTALLDIR)/share/man/man1
 	
 	for f in tools/*; do \
 	  if [ -x "$$f" ]; then \
-	    cp -f "$$f" $(INSTALLDIR)/share/magicrescue/tools/; \
+	    cp -f "$$f" $(INSTALLDIR)/libexec/magicrescue/tools/; \
 	  fi; \
 	done
-	cp -f tools/laola.pl $(INSTALLDIR)/share/magicrescue/tools/
+	cp -f tools/laola.pl $(INSTALLDIR)/libexec/magicrescue/tools/
+	chmod 755 $(INSTALLDIR)/libexec/magicrescue/tools/laola.pl
 
 uninstall:
 	rm -f $(INSTALLDIR)/bin/magicrescue$(EXE)
 	rm -f $(INSTALLDIR)/bin/dupemap$(EXE)
 	rm -f $(INSTALLDIR)/bin/magicsort
 	for f in $(DOCS); do \
-	   rm -f "$(INSTALLDIR)/man/man1/`basename $$f`"; \
+	   rm -f "$(INSTALLDIR)/share/man/man1/`basename $$f`"; \
 	done
-	rm -rf $(INSTALLDIR)/share/magicrescue/tools
-	rm -rf $(INSTALLDIR)/share/magicrescue/recipes
-	-rmdir $(INSTALLDIR)/share/magicrescue
+	rm -rf $(INSTALLDIR)/libexec/magicrescue/
+	rm -rf $(INSTALLDIR)/share/magicrescue/
 
 .PHONY: all clean distclean docs-clean maintainer-clean install uninstall docs
 
Index: magicrescue/config.d/80magicrescue_defs
===================================================================
--- magicrescue.orig/config.d/80magicrescue_defs
+++ magicrescue/config.d/80magicrescue_defs
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 cat >> config.h << EOF
-#define COMMAND_PATH "$prefix/share/magicrescue/tools"
+#define COMMAND_PATH "$prefix/libexec/magicrescue/tools"
 #define RECIPE_PATH  "$prefix/share/magicrescue/recipes"
 #include "largefile.h"
 EOF