pkgsrc/textproc/antiword/patches/patch-aa
2009-11-12 05:03:47 +00:00

85 lines
2 KiB
Text

$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