summaryrefslogtreecommitdiff
path: root/sysutils/i810switch/patches/patch-aa
blob: 35e2412c78e751084f0b877adaa6d9b702dc69b6 (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
$NetBSD: patch-aa,v 1.4 2011/10/01 22:32:11 dholland Exp $
--- Makefile.orig	2003-12-31 09:51:40.000000000 -0500
+++ Makefile	2006-12-03 23:40:16.000000000 -0500
@@ -1,7 +1,5 @@
-OBJECTS	= i810switch.o
-
-%.o: %.c
-	$(CC) $(CFLAGS) -c -o $@ $<
+OBJECTS	= i810switch.o getline.o
+MANMODE?=644
 
 all: i810switch
 
@@ -9,16 +7,20 @@
 	$(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 ${DESTDIR}$(PREFIX)/bin
+	install -d ${DESTDIR}$(PREFIX)/sbin
+	install -d ${DESTDIR}$(PREFIX)/man/man1
+	install i810switch ${DESTDIR}$(PREFIX)/sbin
+	ln -s i810switch ${DESTDIR}$(PREFIX)/sbin/i810rotate
+	install -m $(MANMODE) i810switch.1.gz i810rotate.1.gz ${DESTDIR}$(PREFIX)/man/man1
+	gunzip ${DESTDIR}$(PREFIX)/${PKGMANDIR}/man1/i810switch.1.gz
+	gunzip ${DESTDIR}$(PREFIX)/${PKGMANDIR}/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 ${DESTDIR}$(PREFIX)/i810switch
+	rm -f ${DESTDIR}$(PREFIX)/i810rotate
+	rm -f ${DESTDIR}$(PREFIX)/${PKGMANDIR}/man1/i810switch.1.gz
+	rm -f ${DESTDIR}$(PREFIX)/${PKGMANDIR}/man1/i810rotate.1.gz
 
 clean:
 	@rm -f $(OBJECTS) i810switch