File cmsfs-1.1.8-mandir.patch of Package cmsfs.14094
From 84aed65d3163e92731d86ddd9549edd4846518b9 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Wed, 4 Aug 2010 13:45:49 +0200
Subject: Use MANDIR config variable
MANDIR should be a separate config variable.
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
cmsfs.makefile | 5 +++--
cmsfssed.sh | 7 +++++++
configure | 3 +++
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/cmsfs.makefile b/cmsfs.makefile
index 3055fa9..b3d17fb 100644
--- a/cmsfs.makefile
+++ b/cmsfs.makefile
@@ -25,6 +25,7 @@ CMSMOUNT = /tmp/cms1fs
DEFINES = %DEFINES%
INCLUDES = %INCLUDES%
PREFIX = %PREFIX%
+MANDIR = %MANDIR%
LINUX_RELEASE = %LINUX_RELEASE%
DRIVER_SOURCE = %DRIVER_SOURCE%
MODULES_DIRECTORY = %MODULES_DIRECTORY%
@@ -248,8 +249,8 @@ install: $(OBJECTS) libcmsfs.a
cp -p libcmsfs.a $(PREFIX)/lib/.
### $(MAKE) /sbin/fsck.cms
# touch install
- mkdir -p $(PREFIX)/man/man8
- cp -p *.8 $(PREFIX)/man/man8/.
+ mkdir -p $(MANDIR)/man8
+ cp -p *.8 $(MANDIR)/man8/.
#
#
diff --git a/cmsfssed.sh b/cmsfssed.sh
index ac29e10..8c9e936 100755
--- a/cmsfssed.sh
+++ b/cmsfssed.sh
@@ -24,6 +24,7 @@ Z=`basename "$0"`
#
#
PREFIX="/usr"
+MANDIR="${PREFIX}/man"
DEFINES=""
INCLUDES=""
LINUX_RELEASE=""
@@ -39,6 +40,11 @@ while [ ! -z "$*" ] ; do
if [ -z "$PREFIX" ] ; then PREFIX="/usr" ; fi
shift
;;
+ --mand*)
+ MANDIR=`echo "$1" | awk -F'=' '{print $2}'`
+ if [ -z "$MANDIR" ] ; then MANDIR="/usr/man" ; fi
+ shift
+ ;;
--debug)
DEFINES="$DEFINES -DCMSFS_DEBUG"
shift
@@ -129,6 +135,7 @@ if [ `uname -r` = "2.4.19" ] ; then
#
# platform-specific substutions ...
echo "s#%PREFIX%#$PREFIX#g"
+echo "s#%MANDIR%#$MANDIR#g"
echo "s#%DEFINES%#$DEFINES#g"
echo "s#%INCLUDES%#$INCLUDES#g"
echo "s#%LINUX_RELEASE%#$LINUX_RELEASE#g"
diff --git a/configure b/configure
index e60d449..3c1fc48 100755
--- a/configure
+++ b/configure
@@ -42,6 +42,7 @@ if [ "$RC" != 0 ] ; then exit $RC ; fi
#
# retrieve substitutions from the 'sed' operation
sh -c ' echo "PREFIX=%PREFIX%" ; \
+ echo "MANDIR=%MANDIR%" ; \
echo "MODULES_DIRECTORY=%MODULES_DIRECTORY%" ; \
echo "DRIVER_SOURCE=%DRIVER_SOURCE%"' \
| sed -f cmsfscfg.sed > cmsfscfg.tmp
@@ -55,6 +56,8 @@ rm cmsfscfg.tmp
# report
if [ ! -z "$PREFIX" ] ; then
echo "*** will install utilities to '$PREFIX'" ; fi
+if [ ! -z "$MANDIR" ] ; then
+ echo "*** will install man-pages to '$MANDIR'" ; fi
if [ ! -z "$MODULES_DIRECTORY" ] ; then
echo "*** will install module to '$MODULES_DIRECTORY'" ; fi
if [ ! -z "$DRIVER_SOURCE" ] ; then
--
1.8.1.4