blob: 5e361102cbaea3622d36ab653a4e7ac7b338e337 (
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
|
--- Makefile.orig 2014-07-02 11:08:31.459626724 +0800
+++ Makefile 2014-07-02 11:11:50.634611079 +0800
@@ -1,7 +1,7 @@
#!/usr/bin/make -f
.PHONY: all install uninstall dist correctpermissions install-doc uninstall-doc
-prefix?=/usr/local
+prefix=$(PREFIX)
docdir?=$(prefix)/share/doc/fvwm-crystal/
addondir?=$(prefix)/share/fvwm-crystal/addons
@@ -12,13 +12,13 @@ all:
install: uninstall correctpath
@echo Installing fvwm-crystal $(RELEASE) to $(prefix)
- mkdir -p $(prefix)/bin $(prefix)/share/fvwm-crystal/fvwm
+ mkdir -p $(DESTDIR)$(prefix)/bin $(DESTDIR)$(prefix)/share/fvwm-crystal/fvwm
- install -m 755 bin/fvwm-crystal.apps bin/fvwm-crystal.wallpaper bin/fvwm-crystal bin/fvwm-crystal.generate-menu bin/fvwm-crystal.infoline bin/fvwm-crystal.mplayer-wrapper $(prefix)/bin
- cp -d -r fvwm/* $(prefix)/share/fvwm-crystal/fvwm/
+ install -m 755 bin/fvwm-crystal.apps bin/fvwm-crystal.wallpaper bin/fvwm-crystal bin/fvwm-crystal.generate-menu bin/fvwm-crystal.infoline bin/fvwm-crystal.mplayer-wrapper $(DESTDIR)$(prefix)/bin
+ cp -r fvwm/* $(DESTDIR)$(prefix)/share/fvwm-crystal/fvwm/
- mkdir -p $(prefix)/share/man/man1
- cp -d -r man/* $(prefix)/share/man/man1
+ mkdir -p $(DESTDIR)$(prefix)/man/man1
+ cp -r man/* $(DESTDIR)$(prefix)/man/man1
uninstall:
@echo "Uninstalling previously installed fvwm-crystal"
@@ -40,7 +40,7 @@ dist-minimal:
mkdir -p "fvwm-crystal-minimal-$(RELEASE)"
mkdir -p "fvwm-crystal-minimal-$(RELEASE)/fvwm"
# Copy basic files
- cp -r AUTHORS COPYING INSTALL Makefile NEWS README fvwm-crystal-minimal-$(RELEASE)/
+ cp -r AUTHORS INSTALL Makefile NEWS README fvwm-crystal-minimal-$(RELEASE)/
cp -r fvwm/config fvwm-crystal-minimal-$(RELEASE)/fvwm/
# Copy addons/
mkdir -p "fvwm-crystal-minimal-$(RELEASE)/addons"
@@ -190,15 +190,15 @@ dist-minimal:
# It is needed to adjust some path inside fvwm-crystal.generate-menu since this file must know the install path
correctpath:
- sed -i 's:FC_MENUBASEROOT="/usr/share:FC_MENUBASEROOT="$(prefix)/share:' bin/fvwm-crystal.generate-menu
- sed -i 's:FC_ICONBASEROOT="/usr/share:FC_ICONBASEROOT="$(prefix)/share:' bin/fvwm-crystal.generate-menu
+ sed 's:FC_MENUBASEROOT="/usr/share:FC_MENUBASEROOT="$(prefix)/share:' bin/fvwm-crystal.generate-menu > bin/fvwm-crystal.generate-menu.new
+ sed 's:FC_ICONBASEROOT="/usr/share:FC_ICONBASEROOT="$(prefix)/share:' bin/fvwm-crystal.generate-menu.new > bin/fvwm-crystal.generate-menu
uninstall-doc:
-rm -rf $(docdir)
-rm -rf $(addondir)
install-doc:
- mkdir -p $(addondir) $(docdir)
- install -m 644 addons/* $(addondir)
- install -m 644 AUTHORS COPYING NEWS ChangeLog README INSTALL $(docdir)
- install -m 644 doc/* $(docdir)
+ mkdir -p $(DESTDIR)$(addondir) $(DESTDIR)$(docdir)
+ install -m 644 addons/* $(DESTDIR)$(addondir)
+ install -m 644 AUTHORS NEWS ChangeLog README INSTALL $(DESTDIR)$(docdir)
+ install -m 644 doc/* $(DESTDIR)$(docdir)
|