Changeset 936


Ignore:
Timestamp:
Nov 16, 2006, 2:17:27 AM (13 years ago)
Author:
bruno
Message:

Try to fix issues on x86_64 for rpm based distro. Still need work for debian and gentoo

Location:
branches/stable/mindi
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/distributions/debian/rules

    r807 r936  
    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.
  • branches/stable/mindi/distributions/gentoo/mindi.ebuild

    r781 r936  
    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"
  • branches/stable/mindi/distributions/rpm/mindi.spec

    r933 r936  
    3636export DONT_RELINK=1
    3737
    38 export PREFIX=${RPM_BUILD_ROOT}%{_exec_prefix}
    39 export CONFDIR=${RPM_BUILD_ROOT}%{_sysconfdir}
    40 export MANDIR=${RPM_BUILD_ROOT}%{_mandir}
    41 export LIBDIR=${RPM_BUILD_ROOT}%{_libdir}
    42 export DOCDIR=${RPM_BUILD_ROOT}%{_docdir}
     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}
    4349export RPMBUILDMINDI="true"
    4450
     
    4753%clean
    4854%{__rm} -rf $RPM_BUILD_ROOT
    49 
    50 %post
    51 if [ -f /usr/local/sbin/mindi ]; then
    52     echo "WARNING: /usr/local/sbin/mindi exists. You should probably remove your manual mindi installation !"
    53 fi
    5455
    5556%files
  • branches/stable/mindi/install.sh

    r934 r936  
    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
     
    3749    MANDIR=$local/share/man/man8
    3850else
    39     MANDIR=$MANDIR/man8
     51    MANDIR=${HEAD}$MANDIR/man8
    4052fi
    4153if [ _"$DOCDIR" == _"" ]; then
    4254    DOCDIR=$local/share/doc/mindi-$MINDIVER
    4355else
    44     DOCDIR=$DOCDIR/mindi-$MINDIVER
     56    DOCDIR=${HEAD}$DOCDIR/mindi-$MINDIVER
    4557fi
    4658if [ _"$LIBDIR" == _"" ]; then
    47     locallib=$LIBDIR
    48 else
    4959    ARCH=`/bin/arch`
    5060    echo $ARCH | grep -E '^i[0-9]86$' &> /dev/null && ARCH=i386 && locallib=$local/lib
    5161    echo $ARCH | grep -E '^x86_64$' &> /dev/null && locallib=$local/lib64
    5262    echo $ARCH | grep -E '^ia64$' &> /dev/null && locallib=$local/lib
    53     export ARCH
     63    sublocallib=$locallib
     64else
     65    locallib=${HEAD}$LIBDIR
     66    sublocallib=$LIBDIR
    5467fi
    5568
     
    6982
    7083# Substitute variables for mindi
    71 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~" -e "s~^MINDI_LIB=LLL~MINDI_LIB=$locallib~" mindi > $local/sbin/mindi
     84sed -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
    7285chmod 755 $local/sbin/mindi
    7386install -m 755 parted2fdisk.pl $local/sbin
Note: See TracChangeset for help on using the changeset viewer.