summaryrefslogtreecommitdiff
path: root/textproc/antiword/patches/patch-aa
blob: b0fe49e7320350088d21cf5a356680c9fa9e0b98 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
$NetBSD: patch-aa,v 1.12 2009/11/12 05:03:47 obache Exp $

--- Makefile.orig	2005-10-29 19:13:15.000000000 +0200
+++ Makefile
@@ -2,8 +2,8 @@
 # Makefile for antiword (Linux version)
 #
 
-CC	= gcc
-LD	= gcc
+#CC	= gcc
+#LD	= gcc
 
 INSTALL		= cp -f
 INSTALL_PROGRAM	= $(INSTALL)
@@ -16,7 +16,7 @@ OPT	= -O2
 
 LDLIBS	=
 
-CFLAGS	= -Wall -pedantic $(OPT) -D$(DB)
+CFLAGS	+= -D$(DB)
 LDFLAGS	=
 
 OBJS	=\
@@ -30,22 +30,30 @@ OBJS	=\
 	wordlib.o wordmac.o wordole.o wordwin.o xmalloc.o xml.o
 
 PROGS =\
-	antiword\
+	antiword
+SCRIPTS=\
 	kantiword
 
 LOCAL_INSTALL_DIR = $(HOME)/bin
 LOCAL_RESOURCES_DIR = $(HOME)/.antiword
 
-GLOBAL_INSTALL_DIR = /usr/local/bin
-GLOBAL_RESOURCES_DIR = /usr/share/antiword
+GLOBAL_INSTALL_DIR = ${DESTDIR}${PREFIX}/bin
+GLOBAL_RESOURCES_DIR = ${DESTDIR}${PREFIX}/share/antiword
 
 all:		$(PROGS)
 
 install:	all
-	mkdir -p $(LOCAL_INSTALL_DIR)
-	cp -pf $(PROGS) $(LOCAL_INSTALL_DIR)
-	mkdir -p $(LOCAL_RESOURCES_DIR)
-	cp -pf Resources/* $(LOCAL_RESOURCES_DIR)
+		${BSD_INSTALL_PROGRAM} ${PROGS} ${GLOBAL_INSTALL_DIR}
+		${BSD_INSTALL_SCRIPT} ${SCRIPTS} ${GLOBAL_INSTALL_DIR}
+		${BSD_INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/antiword
+.for file in COPYING ChangeLog FAQ History Netscape QandA ReadMe
+		${BSD_INSTALL_DATA} Docs/${file} ${DESTDIR}${PREFIX}/share/doc/antiword
+.endfor
+		${BSD_INSTALL_MAN} Docs/antiword.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/antiword.1
+		${BSD_INSTALL_DATA_DIR} ${GLOBAL_RESOURCES_DIR}
+		for i in Resources/* ; do				\
+			${BSD_INSTALL_DATA} $$i ${GLOBAL_RESOURCES_DIR};\
+		done
 
 # NOTE: you might have to be root to do this
 global_install:	all
@@ -70,10 +78,11 @@ global_uninstall:
 clean:
 	rm -f $(OBJS)
 	rm -f $(PROGS)
+	rm -f $(SCRIPTS)
 
 antiword:	$(OBJS)
 	@rm -f $@
-	$(LD) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@
+	$(CC) $(CFLAGS) $(OBJS) -o $@
 	@chmod 750 $@
 
 kantiword:	Unix-only/KDE3-only/kantiword.sh
@@ -82,9 +91,6 @@ kantiword:	Unix-only/KDE3-only/kantiword
 	cat $? >> $@
 	@chmod 750 $@
 
-.c.o:
-	$(CC) $(CFLAGS) -c $<
-
 main_u.o:	version.h
 postscript.o:	version.h
 pdf.o:		version.h