Changeset 939 for trunk


Ignore:
Timestamp:
Nov 17, 2006, 1:41:11 PM (13 years ago)
Author:
bruno
Message:

merge -r931:938 $SVN_M/branches/stable

Location:
trunk/mindi
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/mindi/distributions/debian/rules

    r808 r939  
    2626    dh_installdirs
    2727    # Build the installation tree:
    28     ( export RPMBUILDMINDI=true && export PREFIX=$(CURDIR)/debian/$(PACKAGE_NAME)/usr && export CONFDIR=$(CURDIR)/debian/$(PACKAGE_NAME)/etc && ./install.sh )
     28    ( export RPMBUILDMINDI=true && export HEAD=$(CURDIR)/debian/$(PACKAGE_NAME) && export PREFIX=/usr && export CONFDIR=/etc && export MANDIR=$(PREFIX)/share/man && && export LIBDIR=$(PREFIX)/lib && export DOCDIR=$(PREFIX)/share/doc && ./install.sh )
    2929
    3030# Build architecture-independent files here.
  • trunk/mindi/distributions/gentoo/mindi.ebuild

    r782 r939  
    2626
    2727src_install() {
    28     export PREFIX="${D}/usr"
    29     export CONFDIR="${D}/etc"
     28    export HEAD="${D}"
     29    export PREFIX="/usr"
     30    export CONFDIR="/etc"
     31    export MANDIR="${PREFIX}/share/man"
     32    export DOCDIR="${PREFIX}/share/doc"
     33    export LIBDIR="${PREFIX}/lib"
    3034    export DONT_RELINK=1
    3135    export RPMBUILDMINDI="true"
  • trunk/mindi/distributions/rpm/mindi.spec

    r929 r939  
    3636export DONT_RELINK=1
    3737
    38 export PREFIX=${RPM_BUILD_ROOT}%{_exec_prefix}
    39 export CONFDIR=${RPM_BUILD_ROOT}%{_sysconfdir}
     38export HEAD=${RPM_BUILD_ROOT}
     39export PREFIX=%{_exec_prefix}
     40# Bug on x86_64 on _sysconfdir on rhel4 at least
     41%ifarch x86_64
     42export CONFDIR=/etc
     43%else
     44export CONFDIR=%{_sysconfdir}
     45%endif
     46export MANDIR=%{_mandir}
     47export DOCDIR=%{_docdir}
     48export LIBDIR=%{_libdir}
    4049export RPMBUILDMINDI="true"
    4150
     
    4453%clean
    4554%{__rm} -rf $RPM_BUILD_ROOT
    46 
    47 %post
    48 if [ -f /usr/local/sbin/mindi ]; then
    49     echo "WARNING: /usr/local/sbin/mindi exists. You should probably remove your manual mindi installation !"
    50 fi
    5155
    5256%files
  • trunk/mindi/install.sh

    r932 r939  
    1010
    1111if [ "_$PREFIX" != "_" ]; then
    12     local=$PREFIX
     12    local=${HEAD}$PREFIX
     13    sublocal=$PREFIX
    1314    if [ -f /usr/local/sbin/mindi ]; then
    14         echo "WARNING: /usr/local/sbin/mindi exists. You should probably remove it !"
     15        echo "WARNING: /usr/local/sbin/mindi exists. You should probably remove your manual installation !"
    1516    fi
    16     conf=$CONFDIR/mindi
     17    if [ "_$CONFDIR" != "_" ]; then
     18        conf=${HEAD}$CONFDIR/mindi
     19        subconf=$CONFDIR/mindi
     20    else
     21        echo "CONFDIR should be defined if PREFIX is defined"
     22        exit -1
     23    fi
    1724    echo $PATH | grep /usr/sbin > /dev/null || echo "Warning - your PATH environmental variable is BROKEN. Please add /usr/sbin to your PATH."
    1825else
    1926    local=/usr/local
     27    sublocal=$local
    2028    if [ -f /usr/sbin/mindi ]; then
    2129        echo "WARNING: /usr/sbin/mindi exists. You should probably remove the mindi package !"
    2230    fi
    2331    conf=$local/etc/mindi
     32    subconf=$conf
    2433    echo $PATH | grep $local/sbin > /dev/null || echo "Warning - your PATH environmental variable is BROKEN. Please add $local/sbin to your PATH."
    2534fi
     
    2736if uname -a | grep Knoppix > /dev/null || [ -e "/ramdisk/usr" ] ; then
    2837    local=/ramdisk/usr
     38    sublocal=$local
     39    conf=/ramdisk/etc
     40    subconf=$conf
    2941    export PATH=/ramdisk/usr/sbin:/ramdisk/usr/bin:/$PATH
    3042fi
     
    3446echo "mindi ${MINDIVER}-r${MINDIREV} will be installed under $local"
    3547
    36 DOCDIR=$local/share/doc/mindi-$MINDIVER
    37 MANDIR=$local/share/man/man8
    38 
    39 ARCH=`/bin/arch`
    40 echo $ARCH | grep -E '^i[0-9]86$' &> /dev/null && ARCH=i386 && locallib=$local/lib
    41 echo $ARCH | grep -E '^x86_64$' &> /dev/null && locallib=$local/lib64
    42 echo $ARCH | grep -E '^ia64$' &> /dev/null && locallib=$local/lib
    43 export ARCH
     48if [ _"$MANDIR" == _"" ]; then
     49    MANDIR=$local/share/man/man8
     50else
     51    MANDIR=${HEAD}$MANDIR/man8
     52fi
     53if [ _"$DOCDIR" == _"" ]; then
     54    DOCDIR=$local/share/doc/mindi-$MINDIVER
     55else
     56    DOCDIR=${HEAD}$DOCDIR/mindi-$MINDIVER
     57fi
     58if [ _"$LIBDIR" == _"" ]; then
     59    ARCH=`/bin/arch`
     60    echo $ARCH | grep -E '^i[0-9]86$' &> /dev/null && ARCH=i386 && locallib=$local/lib
     61    echo $ARCH | grep -E '^x86_64$' &> /dev/null && locallib=$local/lib64
     62    echo $ARCH | grep -E '^ia64$' &> /dev/null && locallib=$local/lib
     63    sublocallib="$locallib/mindi"
     64else
     65    locallib=${HEAD}$LIBDIR
     66    sublocallib="$LIBDIR/mindi"
     67fi
    4468
    4569echo "Creating target directories ..."
     
    7296perl -pi -e "s~^MINDI_VER=VVV~MINDI_VER=$MINDIVER~ ; s~^MINDI_REV=RRR~MINDI_REV=$MINDIREV~" $locallib/mindi/rootfs/sbin/init
    7397
    74 # Substirute variables for mindi
    75 if [ "$RPMBUILDMINDI" = "true" ]; then
    76     sed -e "s~^MINDI_PREFIX=XXX~MINDI_PREFIX=/usr~" -e "s~^MINDI_CONF=YYY~MINDI_CONF=/etc/mindi~" -e "s~^MINDI_VER=VVV~MINDI_VER=$MINDIVER~" -e "s~^MINDI_REV=RRR~MINDI_REV=$MINDIREV~" mindi > $local/sbin/mindi
    77 else
    78     sed -e "s~^MINDI_PREFIX=XXX~MINDI_PREFIX=$local~" -e "s~^MINDI_CONF=YYY~MINDI_CONF=$conf~" -e "s~^MINDI_VER=VVV~MINDI_VER=$MINDIVER~" -e "s~^MINDI_REV=RRR~MINDI_REV=$MINDIREV~" mindi > $local/sbin/mindi
    79 fi
     98# Substitute variables for mindi
     99sed -e "s~^MINDI_PREFIX=XXX~MINDI_PREFIX=$sublocal~" -e "s~^MINDI_CONF=YYY~MINDI_CONF=$subconf~" -e "s~^MINDI_VER=VVV~MINDI_VER=$MINDIVER~" -e "s~^MINDI_REV=RRR~MINDI_REV=$MINDIREV~" -e "s~^MINDI_LIB=LLL~MINDI_LIB=$sublocallib~" mindi > $local/sbin/mindi
    80100chmod 755 $local/sbin/mindi
    81101install -m 755 parted2fdisk.pl $local/sbin
  • trunk/mindi/mindi

    r932 r939  
    3333MINDI_CONF=YYY
    3434MINDI_SBIN=${MINDI_PREFIX}/sbin
    35 
    36 if [ "$ARCH" = "x86_64" ] ; then
    37     MINDI_LIB=${MINDI_PREFIX}/lib64/mindi
    38 else
    39     MINDI_LIB=${MINDI_PREFIX}/lib/mindi
    40 fi
     35MINDI_LIB=LLL
    4136
    4237MINDI_CONFIG_DIST="$MINDI_CONF/mindi.conf.dist"
     
    525520        ln -sf $vanilla_lib_name $outdir$optimized_lib_name
    526521        echo "Excluding $optimized_lib_name" >> $LOGFILE
    527         grep -Fvx "$optimized_lib_name $filelist" > $filelist.tmp
     522        grep -Fvx "$optimized_lib_name" "$filelist" > $filelist.tmp
    528523        echo "Replacing it with $vanilla_lib_name" >> $LOGFILE
    529524        echo "$vanilla_lib_name" >> $filelist.tmp
     
    27872782    elif [ "$#" -ge "9" ] && [ "$1" = "--custom" ] ; then
    27882783        MONDOTMP=$2
    2789         BIDON=$3
     2784        CACHE_LOC=$3
     2785        if [ _"$CACHE_LOC" != _"" ]; then
     2786            mkdir -p $CACHE_LOC
     2787        fi
    27902788        kernelpath=$4; [ "$kernelpath" = "(null)" ] && kernelpath=""
    27912789###
     
    28462844        [ "$CDRECOVERY" = "yes" ] && [ "$TAPEDEV" != "" ] && Die "Sorry, you can't use --cd-recovery and --write-tapes at the same time"
    28472845        MONDO_ROOT=`echo $CACHEDIR | sed 's/\(.*\)\/.*/\1/'`
    2848         [ "$MONDO_ROOT" = "" ] && Die "MONDO_ROOT is undefined"
     2846        if [ _"$MONDO_ROOT" != _"" ]; then
     2847            mkdir -p $MONDO_ROOT
     2848        else
     2849            Die "MONDO_ROOT is undefined"
     2850        fi
    28492851    else
    28502852        echo "Syntax: mindi (--custom ....)" >> /dev/stderr
Note: See TracChangeset for help on using the changeset viewer.