--- 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`;\