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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
From 130ecd15116cf45d70a88be3870749888a571f8d Mon Sep 17 00:00:00 2001
From: Ivan Shapovalov <intelfx@intelfx.name>
Date: Sat, 22 Oct 2016 12:35:14 +0300
Subject: [PATCH 1/9] Makefile: DESTDIR support
---
Makefile | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/Makefile b/Makefile
index 7cc2094..2906fec 100644
--- a/Makefile
+++ b/Makefile
@@ -39,7 +39,7 @@ INSTALL=install
ROOT=root
# Pathnames for referenced packages...
-FOODB=$(DESTDIR)/usr/share/foomatic/db/source
+FOODB=$(PREFIX)/share/foomatic/db/source
# User ID's
LPuid=-oroot
@@ -253,8 +253,9 @@ FILES = \
# CUPS vars
CUPS_SERVERBIN := $(DESTDIR)$(shell cups-config --serverbin 2>/dev/null)
-CUPS_DEVEL := $(shell grep cupsSideChannelDoRequest /usr/include/cups/sidechannel.h 2>/dev/null)
-CUPS_GOODAPI := $(shell cups-config --api-version 2>/dev/null | sed "s/1\.[0123].*//")
+CUPS_DEVEL := $(DESTDIR)$(shell grep cupsSideChannelDoRequest /usr/include/cups/sidechannel.h 2>/dev/null)
+CUPS_GOODAPI := $(DESTDIR)$(shell cups-config --api-version 2>/dev/null | sed "s/1\.[0123].*//")
+
# hpclj2600n-0.icm km2430_0.icm km2430_1.icm km2430_2.icm samclp300-0.icm
# sihp1000.img sihp1005.img sihp1020.img sihp1018.img
@@ -679,7 +680,7 @@ install-prog:
$(INSTALL) -c $(PROGS) $(SHELLS) $(BIN)/
if [ "$(BINPROGS)" != "" ]; then \
$(INSTALL) -d $(UDEVBIN); \
- $(INSTALL) -c $(BINPROGS) $(UDEVBIN); \
+ $(INSTALL) -c $(BINPROGS) $(DESTDIR)/usr/bin/; \
fi
#
# Install gamma correction files. These are just templates,
@@ -733,10 +734,10 @@ install-foo:
#
# Clear foomatic cache and rebuild database if needed
#
- rm -rf /var/cache/foomatic/*/*
- rm -f /var/cache/foomatic/printconf.pickle
- if [ -d /var/cache/foomatic/compiled ]; then \
- cd /var/cache/foomatic/compiled; \
+ rm -rf $(DESTDIR)/var/cache/foomatic/*/*
+ rm -f $(DESTDIR)/var/cache/foomatic/printconf.pickle
+ if [ -d $(DESTDIR)/var/cache/foomatic/compiled ]; then \
+ cd $(DESTDIR)/var/cache/foomatic/compiled; \
foomatic-combo-xml -O >overview.xml; \
fi
@@ -873,7 +874,7 @@ install-extra:
done
MODEL=$(PREFIX)/share/cups/model
-LOCALMODEL=$(DESTDIR)/usr/local/share/cups/model
+LOCALMODEL=$(PREFIX)/usr/local/share/cups/model
MACMODEL=/Library/Printers/PPDs/Contents/Resources
PPD=$(PREFIX)/share/ppd
VARPPD=/var/lp/ppd
@@ -934,9 +935,9 @@ install-ppd:
done; \
fi
-APPL=$(DESTDIR)/usr/share/applications
-OLDAPPL=$(DESTDIR)/usr/share/gnome/apps/System
-PIXMAPS=$(DESTDIR)/usr/share/pixmaps
+APPL=$(PREFIX)/usr/share/applications
+OLDAPPL=$(PREFIX)/usr/share/gnome/apps/System
+PIXMAPS=$(PREFIX)/usr/share/pixmaps
install-desktop:
#
@@ -960,7 +961,7 @@ install-gui:
$(INSTALL) -c -m 755 hplj10xx_gui.tcl $(SHAREZJS)
-USBDIR=/etc/hotplug/usb
+USBDIR=$(DESTDIR)/etc/hotplug/usb
UDEVDIR=/etc/udev/rules.d
LIBUDEVDIR=/lib/udev/rules.d
RULES=hplj10xx.rules
--
2.19.0
|