summaryrefslogtreecommitdiff
path: root/www/mozplugger/files/patch-Makefile
blob: a7383100fb67ff7c2734a4c074681d5e072eb5f2 (plain) (blame)
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
--- Makefile.orig	2008-10-04 16:12:18.000000000 -0500
+++ Makefile	2008-10-04 16:14:19.000000000 -0500
@@ -1,5 +1,5 @@
 # Where is your Xwindows located?
-X11=/usr/X11R6
+X11=${LOCALBASE}
 
 #
 # For building rpms
@@ -7,14 +7,14 @@
 
 #
 # For installing
-prefix=/usr
+prefix=${PREFIX}
 
 #
 #
 RPMDIR=/usr/src/RPM
 
 # Choose compiler
-CC=gcc
+CC?=gcc
 LD=gcc
 BINFORMAT=bin
 
@@ -70,7 +70,7 @@
 	${MAKE} all CC=gcc XCFLAGS='-fPIC -aout' LD=gcc XLDFLAGS='-shared -aout'
 
 freebsd:
-	${MAKE} all CC=gcc XCFLAGS=-fPIC LD=gcc XLDFLAGS=-shared X11=/usr/X11R6/
+	${MAKE} all CC=${CC} XCFLAGS=-fPIC LD=gcc XLDFLAGS=-shared X11=${LOCALBASE}
 
 openbsd:
 	${MAKE} all CC=gcc XCFLAGS=-fPIC LD=gcc XLDFLAGS=-shared X11=/usr/X11R6/
@@ -114,7 +114,7 @@
 	  mozplugger-controller \
 	  mozplugger-linker
 
-DEFINES= -DXP_UNIX -DVERSION=\"$(VERSION)\" -D$(BUILD) #-D__amd64__
+DEFINES= -DXP_UNIX -DVERSION=\"$(VERSION)\" -DPREFIX=\"$(prefix)\" -D$(BUILD) #-D__amd64__
 INCLUDES= -Inpapi/include -I$(X11)/include
 RPM_OPT_FLAGS ?= -O2
 COMMON_CFLAGS=$(RPM_OPT_FLAGS) $(INCLUDES) $(DEFINES)
@@ -185,15 +185,15 @@
 
 install:
 	-@mkdir -p $(root)$(prefix)/bin
-	-@mkdir -p $(root)$(prefix)/lib/mozilla/plugins
-	-@mkdir -p $(root)$(prefix)/share/man/man7
-	-@mkdir -p $(root)/etc
+	-@mkdir -p $(root)${WEBPLUGINS_DIR}
+	-@mkdir -p $(root)$(prefix)/man/man7
+	-@mkdir -p $(root)$(prefix)/etc
 	cp mozplugger-helper $(root)$(prefix)/bin/
 	cp mozplugger-controller $(root)$(prefix)/bin/
 	cp mozplugger-linker $(root)$(prefix)/bin/
-	cp mozplugger.so $(root)$(prefix)/lib/mozilla/plugins/
-	cp mozpluggerrc $(root)/etc/
-	cp mozplugger.7 $(root)$(prefix)/share/man/man7/
+	cp mozplugger.so $(root)${WEBPLUGINS_DIR}/
+	cp mozpluggerrc $(root)$(prefix)/etc/
+	cp mozplugger.7 $(root)$(prefix)/man/man7/
 
 mozplugger.tar.gz: $(BASE_FILES) $(SOURCE_FILES)
 	@( DIR=`pwd`;\