On Tue, Dec 25, 2001 at 06:17:39PM +0100, Per Jessen wrote:
> Hi,
> 
> I've just retrieved jfsutils 1.0.11 and tried to build
> it. Which fails miserably. 

Here is a small patch you might want to try. It will make the following
modifications to the source: patch the file "autogen.sh" (from the cvs)
to the source and modify the spec files slightly.

1) just save this message as "jfsutils.patch", there is a patch near the
end of this message (please do not cut and paste, you need to preserve
the format of the patch file)

2) get your original jfsutils-1.0.11.tar.gz, open it (as root)
somewhere such as ~/tmp/
        cd ~/tmp
        tar xzf jfsutils-1.0.11.tar.gz

3) patch the source
        cd jfsutils-1.0.11
        cat ../jfsutils.patch | patch -p1
        chmod +x autogen.sh

4) Put the changes back to the tar file
        cd ..
        tar cfz jfsutils-1.0.11.tar.gz ./jfsutils-1.0.11/

5) Done. Remember not to miss the "chmod" line in 3). Now the source
is ready to build:
        rpm -tb --target=i386 jfsutils-1.0.11.tar.gz

Please tell me if you have any build problem, especially check the man
pages location to see if has any conflict with your distribution.

The patch starts below...

diff -ruN jfsutils-1.0.11/autogen.sh jfsutils-1.0.11.patched/autogen.sh
--- jfsutils-1.0.11/autogen.sh  Thu Jan  1 08:00:00 1970
+++ jfsutils-1.0.11.patched/autogen.sh  Sun Jan  6 04:21:26 2002
@@ -0,0 +1,64 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+THEDIR=`pwd`
+cd $srcdir
+DIE=0
+
+(autoconf --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "You must have autoconf installed to compile jfsutils."
+ echo "Download the appropriate package for your distribution,"
+ echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/";
+ DIE=1
+}
+
+(libtool --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "You must have libtool installed to compile jfsutils."
+ echo "Get ftp://alpha.gnu.org/gnu/libtool-1.0h.tar.gz";
+ echo "(or a newer version if it is available)"
+ DIE=1
+}
+
+(automake --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "You must have automake installed to compile jfsutils."
+ echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz";
+ echo "(or a newer version if it is available)"
+ DIE=1
+}
+
+if test "$DIE" -eq 1; then
+ exit 1
+fi
+
+test -f README || {
+ echo "You must run this script in the top-level jfsutils directory"
+ exit 1
+}
+
+if test -z "$*"; then
+ echo "I am going to run ./configure with no arguments - if you wish "
+        echo "to pass any to it, please specify them on the $0 command line."
+fi
+
+aclocal $ACLOCAL_FLAGS
+autoheader
+automake --add-missing
+autoconf
+
+cd $THEDIR
+
+if test x$OBJ_DIR != x; then
+    mkdir -p "$OBJ_DIR"
+    cd "$OBJ_DIR"
+fi
+
+$srcdir/configure "$@"
+
+echo
+echo "Now type 'make' to compile jfsutils."
diff -ruN jfsutils-1.0.11/jfsutils.spec jfsutils-1.0.11.patched/jfsutils.spec
--- jfsutils-1.0.11/jfsutils.spec       Tue Dec 18 06:26:13 2001
+++ jfsutils-1.0.11.patched/jfsutils.spec       Sun Jan  6 04:21:32 2002
@@ -28,7 +28,7 @@
 %setup -q
 
 %Build
-CFLAGS="${RPM_OPTFLAGS}" ./configure --mandir=/usr/share/man/en/
+CFLAGS="${RPM_OPT_FLAGS}" ./autogen.sh --mandir=%{_mandir}
 make
 
 %Install
@@ -40,5 +40,5 @@
 %Files
 %defattr(-,root,root)
 /sbin/*
-%{_mandir}/en/man8/*
+%{_mandir}/man8/*
 %doc AUTHORS COPYING INSTALL NEWS README ChangeLog
diff -ruN jfsutils-1.0.11/jfsutils.spec.in jfsutils-1.0.11.patched/jfsutils.spec.in
--- jfsutils-1.0.11/jfsutils.spec.in    Tue Dec 18 06:11:42 2001
+++ jfsutils-1.0.11.patched/jfsutils.spec.in    Sun Jan  6 04:22:25 2002
@@ -28,7 +28,7 @@
 %setup -q
 
 %Build
-CFLAGS="${RPM_OPTFLAGS}" ./configure --mandir=/usr/share/man/en/
+CFLAGS="${RPM_OPT_FLAGS}" ./autogen.sh --mandir=%{_mandir}
 make
 
 %Install
@@ -40,5 +40,5 @@
 %Files
 %defattr(-,root,root)
 /sbin/*
-%{_mandir}/en/man8/*
+%{_mandir}/man8/*
 %doc AUTHORS COPYING INSTALL NEWS README ChangeLog

Reply via email to