summaryrefslogtreecommitdiff
path: root/sysutils/i810switch/patches/patch-aa
blob: 6850b0c4eff0ab3d523d74a5670105ce70a3bfe5 (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
$NetBSD: patch-aa,v 1.1 2006/12/04 04:42:03 christos Exp $
--- Makefile.orig	2003-12-31 09:51:40.000000000 -0500
+++ Makefile	2006-12-03 23:40:16.000000000 -0500
@@ -1,7 +1,4 @@
-OBJECTS	= i810switch.o
-
-%.o: %.c
-	$(CC) $(CFLAGS) -c -o $@ $<
+OBJECTS	= i810switch.o getline.o
 
 all: i810switch
 
@@ -9,16 +6,19 @@
 	$(CC) $(CFLAGS) -o $@ $(OBJECTS)
 
 install: i810switch
-	install -d $(DESTDIR)/usr/bin
-	install -d $(DESTDIR)/usr/share/man/man1
-	install i810switch i810rotate $(DESTDIR)/usr/bin
-	install i810switch.1.gz i810rotate.1.gz $(DESTDIR)/usr/share/man/man1
+	install -d $(PREFIX)/bin
+	install -d $(PREFIX)/man/man1
+	install i810switch $(PREFIX)/sbin
+	ln $(PREFIX)/sbin/i810switch $(PREFIX)/sbin/i810rotate
+	install i810switch.1.gz i810rotate.1.gz $(PREFIX)/man/man1
+	gunzip $(PREFIX)/man/man1/i810switch.1.gz
+	gunzip $(PREFIX)/man/man1/i810rotate.1.gz
 
 uninstall:
-	rm -f $(DESTDIR)/usr/bin/i810switch
-	rm -f $(DESTDIR)/usr/bin/i810rotate
-	rm -f $(DESTDIR)/usr/share/man/man1/i810switch.1.gz
-	rm -f $(DESTDIR)/usr/share/man/man1/i810rotate.1.gz
+	rm -f $(PREFIX)/usr/bin/i810switch
+	rm -f $(PREFIX)/usr/bin/i810rotate
+	rm -f $(PREFIX)/usr/share/man/man1/i810switch.1.gz
+	rm -f $(PREFIX)/usr/share/man/man1/i810rotate.1.gz
 
 clean:
 	@rm -f $(OBJECTS) i810switch