This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ITP] antiword-0.34


On Mon, 6 Oct 2003, Gerrit P. Haase wrote:

> [snip]
> http://familiehaase.de/cywgin/antiword/antiword-0.34-1-src.tar.bz2
> http://familiehaase.de/cywgin/antiword/antiword-0.34-1.tar.bz2
> http://familiehaase.de/cywgin/antiword/setup.hint
>
> And it is not reviewed yet (IIRC).
>
> Would some kind soul take a quick look (it is really a tiny package
> which compiles in a minute)?
>
> Gerrit

Gerrit,

I've looked at the binary and source packages.  In the binary package, is
there a reason antiword.1 is duplicated in both usr/share/man/man1/ and
usr/share/antiword-0.34/?

The script in the source package doesn't give you any options for partial
make, and doesn't accept the parameters of the generic_build_script (e.g.,
"all", "conf", "prep", "make", etc).  I don't know how important that is,
but thought I'd mention it.
Another, much more important thing is that the script builds files on top
of the root filesystem (i.e., installs directly into /usr/bin, etc) --
IMO, the source package should NOT place anything in the root hierarchy,
that's the job of setup.exe; the source build should be contained in the
source directory.  Because of the latter I didn't build from the source.
Oh, and the script is not space-in-filename friendly.

FWIW, I had to make a change to the wtf Makefile to allow the DESTDIR
parameter in the "install" rule, so I know it's not that much work.
Especially since you're providing a Makefile.Cygwin yourself in the patch.
I'm attaching a preliminary patch to your script and patch -- I tried to
catch all the places that modify the global hierarchy, but please verify
that.  HTH,
	Igor

------------- Note: cutting here may damage your screen surface -------------
--- antiword-0.34-1.sh-orig	2003-10-04 05:31:24.000000000 -0400
+++ antiword-0.34-1.sh	2003-10-06 10:05:22.307708800 -0400
@@ -1,6 +1,6 @@
 #!/bin/sh

-PWD=`pwd`
+PWD="`pwd`"

 # Prepare
 tar -xzf antiword-0.34.tar.gz
@@ -8,13 +8,15 @@ cd antiword-0.34/
 rm -f Makefile
 patch -p1<../antiword-0.34-1.patch
 ln -s Makefile.Cygwin Makefile
+mkdir .inst
+DESTDIR="$PWD/antiword-0.34/.inst"

 # Build
 make
-make global_install
+make DESTDIR="$DESTDIR" global_install

 # Docs
-mkdir -p /usr/share/doc/antiword-0.34/
+mkdir -p "$DESTDIR/usr/share/doc/antiword-0.34/"
 /bin/install -c -m 644 \
 	Docs/antiword.1 \
 	Docs/antiword.man \
@@ -31,10 +33,10 @@ mkdir -p /usr/share/doc/antiword-0.34/
 	Docs/QandA \
 	Docs/ReadMe \
 	Docs/testdoc.doc \
-	/usr/share/doc/antiword-0.34/
+	"$DESTDIR/usr/share/doc/antiword-0.34/"

 # Package
-(cd /; tar cjvf ${PWD}/antiword-0.34-1.tar.bz2 \
+(cd "$DESTDIR"; tar cjvf ${PWD}/antiword-0.34-1.tar.bz2 \
 	usr/bin/antiword.exe \
 	usr/share/antiword/ \
 	usr/share/doc/antiword-0.34 \
--- antiword-0.34-1.patch-orig	2003-10-04 05:31:01.000000000 -0400
+++ antiword-0.34-1.patch	2003-10-06 10:03:09.446664000 -0400
@@ -1,11 +1,12 @@
 diff -urdN antiword-0.34~/Makefile.Cygwin antiword-0.34/Makefile.Cygwin
 --- antiword-0.34~/Makefile.Cygwin	1970-01-01 01:00:00.000000000 +0100
 +++ antiword-0.34/Makefile.Cygwin	2003-10-03 22:08:33.255004800 +0200
-@@ -0,0 +1,78 @@
+@@ -0,0 +1,79 @@
 +#
 +# Makefile for antiword (Cygwin standalone version for Windows)
 +#
 +
++DESTDIR =
 +CC	= gcc
 +LD	= gcc
 +
@@ -34,8 +35,8 @@ diff -urdN antiword-0.34~/Makefile.Cygwi
 +LOCAL_INSTALL_DIR = $(HOME)/bin
 +LOCAL_RESOURCES_DIR = $(HOME)/.antiword
 +
-+GLOBAL_INSTALL_DIR = /usr/bin
-+GLOBAL_RESOURCES_DIR = /usr/share/antiword
++GLOBAL_INSTALL_DIR = "$(DESTDIR)/usr/bin"
++GLOBAL_RESOURCES_DIR = "$(DESTDIR)/usr/share/antiword"
 +
 +all:		$(PROGS)
 +
@@ -47,11 +48,11 @@ diff -urdN antiword-0.34~/Makefile.Cygwi
 +
 +# NOTE: you must be root to do this
 +global_install:	all
-+	/bin/install -c -s -m 755 $(PROGS) $(GLOBAL_INSTALL_DIR)
-+	/bin/install -c -m 644 Docs/antiword.1 /usr/share/man/man1/antiword.1
-+	mkdir -p $(GLOBAL_RESOURCES_DIR)
-+	/bin/install -c -m 644 Resources/*.txt $(GLOBAL_RESOURCES_DIR)
-+	/bin/install -c -m 644 Resources/fontnames $(GLOBAL_RESOURCES_DIR)
++	/bin/install -c -s -m 755 $(PROGS) "$(GLOBAL_INSTALL_DIR)"
++	/bin/install -c -m 644 Docs/antiword.1 "$(DESTDIR)/usr/share/man/man1/antiword.1"
++	mkdir -p "$(GLOBAL_RESOURCES_DIR)"
++	/bin/install -c -m 644 Resources/*.txt "$(GLOBAL_RESOURCES_DIR)"
++	/bin/install -c -m 644 Resources/fontnames "$(GLOBAL_RESOURCES_DIR)"
 +
 +clean:
 +	rm -f $(OBJS)
------------- Note: cutting here may damage your screen surface -------------

--
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]