summaryrefslogtreecommitdiff
blob: 38a07e9c39494d1ecb0d3ae58b2b77fd697474c4 (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
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
diff -Naupr foo2zjs.orig/hplj.usermap foo2zjs/hplj.usermap
--- foo2zjs.orig/hplj.usermap	1970-01-01 01:00:00.000000000 +0100
+++ foo2zjs/hplj.usermap	2005-12-28 19:33:22.000000000 +0100
@@ -0,0 +1,3 @@
+hplj1000 0x0003 0x03f0 0x0517 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+hplj1005 0x0003 0x03f0 0x1317 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+hplj1020 0x0003 0x03f0 0x2B17 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
diff -Naupr foo2zjs.orig/icc2ps/Makefile foo2zjs/icc2ps/Makefile
--- foo2zjs.orig/icc2ps/Makefile	2005-12-28 19:32:58.000000000 +0100
+++ foo2zjs/icc2ps/Makefile	2005-12-28 19:33:22.000000000 +0100
@@ -1,10 +1,9 @@
-PREFIX=	/usr
+PREFIX=	$(DESTDIR)/usr
 BIN=	$(PREFIX)/bin
 SRC=	icc2ps.c xgetopt.c
 LIB=	cmscam97.c cmscnvrt.c cmserr.c cmsgamma.c cmsgmt.c cmsintrp.c cmsio1.c \
 	cmslut.c cmsmatsh.c cmsmtrx.c cmsnamed.c cmspack.c cmspcs.c cmsps2.c \
 	cmssamp.c cmswtpnt.c cmsxform.c
-CFLAGS=	-O3
 
 all: foo2zjs-icc2ps
 
diff -Naupr foo2zjs.orig/Makefile foo2zjs/Makefile
--- foo2zjs.orig/Makefile	2005-12-28 19:32:58.000000000 +0100
+++ foo2zjs/Makefile	2005-12-28 19:36:03.000000000 +0100
@@ -6,8 +6,8 @@ EUID := $(shell id -u)
 VERSION=0.0
 
 # Installation prefix...
-PREFIX=/usr/local
-PREFIX=/usr
+PREFIX=$(DESTDIR)/usr/local
+PREFIX=$(DESTDIR)/usr
 
 # Pathnames for this package...
 BIN=$(PREFIX)/bin
@@ -18,7 +18,7 @@ MANDIR=$(PREFIX)/share/man
 DOCDIR=$(PREFIX)/share/doc/foo2zjs/
 
 # Pathnames for referenced packages...
-FOODB=/usr/share/foomatic/db/source
+FOODB=$(PREFIX)/share/foomatic/db/source
 
 # User ID's
 LPuid=-olp
@@ -126,9 +126,6 @@ ifeq ($(UNAME),Linux)
 	endif
 endif
 
-# Compiler flags
-CFLAGS +=	-O2 -Wall
-
 #
 # Rules to create test documents
 #
@@ -245,11 +242,13 @@ install: all install-prog install-icc2ps
 	# On Ubunto 5.10, run "gnome-cups-manager"
 
 install-prog:
+	[ -d $(BIN) ] || install -d -m 755 $(BIN)/
+	[ -d $(DESTDIR)/bin/ ] || install -d -m 755 $(DESTDIR)/bin/
 	#
 	# Install driver, wrapper, and development tools
 	#
 	install -c $(PROGS) $(SHELLS) $(BIN)/
-	install -c $(BINPROGS) /bin/
+	install -c $(BINPROGS) $(DESTDIR)/bin/
 	#
 	# Install gamma correction files.  These are just templates,
 	# and don't actually do anything right now.  If anybody wants
@@ -274,6 +273,7 @@ install-foo:
 	#
 	@if [ -d $(FOODB) ]; then \
 	    for dir in driver printer opt; do \
+		[ -d $(FOODB)/$$dir/ ] || install -d -m 755 $(FOODB)/$$dir/; \
 		echo install -m 644 foomatic-db/$$dir/*.xml $(FOODB)/$$dir/; \
 		install -c -m 644 foomatic-db/$$dir/*.xml $(FOODB)/$$dir/; \
 	    done \
@@ -291,9 +291,9 @@ install-foo:
 	#
 	# Clear foomatic cache and rebuild database if needed
 	#
-	rm -rf /var/cache/foomatic/*/*
-	if [ -d /var/cache/foomatic/compiled ]; then \
-	    cd /var/cache/foomatic/compiled; \
+	rm -rf $(DESTDIR)/var/cache/foomatic/*/*
+	if [ -d $(DESTDIR)/var/cache/foomatic/compiled ]; then \
+	    cd $(DESTDIR)/var/cache/foomatic/compiled; \
 	    foomatic-combo-xml -O >overview.xml; \
 	fi
 
@@ -357,7 +357,7 @@ install-extra:
 	    fi; \
 	done
 
-MODEL=/usr/share/cups/model
+MODEL=$(PREFIX)/share/cups/model
 install-ppd:
 	#
 	# Install PPD files for CUPS
@@ -369,20 +369,13 @@ install-ppd:
 	    done; \
 	fi
 
-USBDIR=/etc/hotplug/usb
-UDEVDIR=/etc/udev/rules.d
-RULES=hplj10xx.rules
+USBDIR=$(DESTDIR)/etc/hotplug/usb
 install-hotplug:
 	[ -d $(USBDIR) ] || install -d -m 755 $(USBDIR)/
 	install -c -m 755 hplj1000 $(USBDIR)/
 	ln -sf $(USBDIR)/hplj1000 $(USBDIR)/hplj1005
 	ln -sf $(USBDIR)/hplj1000 $(USBDIR)/hplj1020
-	$(USBDIR)/hplj1000 install-usermap
-	$(USBDIR)/hplj1005 install-usermap
-	$(USBDIR)/hplj1020 install-usermap
-	if [ -d $(UDEVDIR) ]; then \
-	    install -c -m 644 $(RULES) $(UDEVDIR)/11-$(RULES); \
-	fi
+	install -c -m 755 hplj.usermap $(USBDIR)/
 
 uninstall:
 	-rm -f /etc/hotplug/usb/hplj1000
@@ -606,7 +599,6 @@ install-doc: doc
 	install -c -m 644 README $(DOCDIR)
 	install -c -m 644 ChangeLog $(DOCDIR)
 
-GROFF=/usr/local/test/bin/groff
 GROFF=groff
 manual.pdf: $(MANPAGES)
 	-$(GROFF) -t -man $(MANPAGES) | ps2pdf - $@