update Sat Jan 16 12:37:00 PST 2010
[pkgsrc.git] / sysutils / foremost / patches / patch-ab
1 $NetBSD: patch-ab,v 1.1.1.1 2007/01/26 16:36:29 minskim Exp $
2
3 --- Makefile.orig       2007-01-26 15:10:20.000000000 +0100
4 +++ Makefile
5 @@ -10,7 +10,7 @@ SYS := $(shell uname -s | tr -d "[0-9]" 
6  # You can cross compile this program for Win32 using Linux and the 
7  # MinGW compiler. See the README for details. If you have already
8  # installed MinGW, put the location ($PREFIX) here:
9 -CR_BASE = /usr/local/cross-tools/i386-mingw32msvc/bin
10 +CR_BASE = $(PREFIX)/cross-tools/i386-mingw32msvc/bin
11  
12  # You shouldn't need to change anything below this line
13  #---------------------------------------------------------------------
14 @@ -27,6 +27,11 @@ RAW_FLAGS += -DVERSION=\"$(VERSION)\"
15  BIN = $(PREFIX)/bin
16  MAN = $(PREFIX)/$(PKGMANDIR)/man1
17  CONF= $(PKG_SYSCONFDIR)
18 +SAMPLES = $(PREFIX)/share/examples/foremost
19 +
20 +# Tell it to config.c
21 +RAW_FLAGS += -DCONFDIR=\"$(CONF)\"
22 +
23  # Setup for compiling and cross-compiling for Windows
24  # The CR_ prefix refers to cross compiling from OSX to Windows
25  CR_CC = $(CR_BASE)/gcc
26 @@ -120,10 +125,11 @@ foremost: $(OBJ)
27  install: goals
28         install -m 755 $(NAME) $(BIN)
29         install -m 444 $(MAN_PAGES) $(MAN)
30 -       install -m 444 foremost.conf $(CONF)
31 -macinstall: BIN = /usr/local/bin/
32 -macinstall: MAN = /usr/share/man/man1/
33 -macinstall: CONF = /usr/local/etc/
34 +       install -m 444 foremost.conf $(SAMPLES)
35 +macinstall: BIN = $(PREFIX)/bin/
36 +macinstall: MAN = $(PREFIX)/$(PKGMANDIR)/man1/
37 +macinstall: CONF = $(PREFIX)/etc/
38 +macinstall: SAMPLES = $(PREFIX)/share/examples/foremost
39  macinstall: mac install
40  
41  
42 @@ -131,8 +137,8 @@ uninstall:
43         rm -f -- $(BIN)/{$(RM_GOALS)}
44         rm -f -- $(MAN)/{$(RM_DOCS)}
45  
46 -macuninstall: BIN = /usr/bin
47 -macuninstall: MAN = /usr/share/man/man1
48 +macuninstall: BIN = $(PREFIX)/bin
49 +macuninstall: MAN = $(PREFIX)/$(PKGMANDIR)/man1
50  macuninstall: uninstall
51  
52  #---------------------------------------------------------------------