Changeset 939 in MondoRescue
- Timestamp:
- Nov 17, 2006, 1:41:11 PM (18 years ago)
- Location:
- trunk/mindi
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mindi/distributions/debian/rules
r808 r939 26 26 dh_installdirs 27 27 # 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 ) 29 29 30 30 # Build architecture-independent files here. -
trunk/mindi/distributions/gentoo/mindi.ebuild
r782 r939 26 26 27 27 src_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" 30 34 export DONT_RELINK=1 31 35 export RPMBUILDMINDI="true" -
trunk/mindi/distributions/rpm/mindi.spec
r929 r939 36 36 export DONT_RELINK=1 37 37 38 export PREFIX=${RPM_BUILD_ROOT}%{_exec_prefix} 39 export CONFDIR=${RPM_BUILD_ROOT}%{_sysconfdir} 38 export HEAD=${RPM_BUILD_ROOT} 39 export PREFIX=%{_exec_prefix} 40 # Bug on x86_64 on _sysconfdir on rhel4 at least 41 %ifarch x86_64 42 export CONFDIR=/etc 43 %else 44 export CONFDIR=%{_sysconfdir} 45 %endif 46 export MANDIR=%{_mandir} 47 export DOCDIR=%{_docdir} 48 export LIBDIR=%{_libdir} 40 49 export RPMBUILDMINDI="true" 41 50 … … 44 53 %clean 45 54 %{__rm} -rf $RPM_BUILD_ROOT 46 47 %post48 if [ -f /usr/local/sbin/mindi ]; then49 echo "WARNING: /usr/local/sbin/mindi exists. You should probably remove your manual mindi installation !"50 fi51 55 52 56 %files -
trunk/mindi/install.sh
r932 r939 10 10 11 11 if [ "_$PREFIX" != "_" ]; then 12 local=$PREFIX 12 local=${HEAD}$PREFIX 13 sublocal=$PREFIX 13 14 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 !" 15 16 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 17 24 echo $PATH | grep /usr/sbin > /dev/null || echo "Warning - your PATH environmental variable is BROKEN. Please add /usr/sbin to your PATH." 18 25 else 19 26 local=/usr/local 27 sublocal=$local 20 28 if [ -f /usr/sbin/mindi ]; then 21 29 echo "WARNING: /usr/sbin/mindi exists. You should probably remove the mindi package !" 22 30 fi 23 31 conf=$local/etc/mindi 32 subconf=$conf 24 33 echo $PATH | grep $local/sbin > /dev/null || echo "Warning - your PATH environmental variable is BROKEN. Please add $local/sbin to your PATH." 25 34 fi … … 27 36 if uname -a | grep Knoppix > /dev/null || [ -e "/ramdisk/usr" ] ; then 28 37 local=/ramdisk/usr 38 sublocal=$local 39 conf=/ramdisk/etc 40 subconf=$conf 29 41 export PATH=/ramdisk/usr/sbin:/ramdisk/usr/bin:/$PATH 30 42 fi … … 34 46 echo "mindi ${MINDIVER}-r${MINDIREV} will be installed under $local" 35 47 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 48 if [ _"$MANDIR" == _"" ]; then 49 MANDIR=$local/share/man/man8 50 else 51 MANDIR=${HEAD}$MANDIR/man8 52 fi 53 if [ _"$DOCDIR" == _"" ]; then 54 DOCDIR=$local/share/doc/mindi-$MINDIVER 55 else 56 DOCDIR=${HEAD}$DOCDIR/mindi-$MINDIVER 57 fi 58 if [ _"$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" 64 else 65 locallib=${HEAD}$LIBDIR 66 sublocallib="$LIBDIR/mindi" 67 fi 44 68 45 69 echo "Creating target directories ..." … … 72 96 perl -pi -e "s~^MINDI_VER=VVV~MINDI_VER=$MINDIVER~ ; s~^MINDI_REV=RRR~MINDI_REV=$MINDIREV~" $locallib/mindi/rootfs/sbin/init 73 97 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 99 sed -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 80 100 chmod 755 $local/sbin/mindi 81 101 install -m 755 parted2fdisk.pl $local/sbin -
trunk/mindi/mindi
r932 r939 33 33 MINDI_CONF=YYY 34 34 MINDI_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 35 MINDI_LIB=LLL 41 36 42 37 MINDI_CONFIG_DIST="$MINDI_CONF/mindi.conf.dist" … … 525 520 ln -sf $vanilla_lib_name $outdir$optimized_lib_name 526 521 echo "Excluding $optimized_lib_name" >> $LOGFILE 527 grep -Fvx "$optimized_lib_name 522 grep -Fvx "$optimized_lib_name" "$filelist" > $filelist.tmp 528 523 echo "Replacing it with $vanilla_lib_name" >> $LOGFILE 529 524 echo "$vanilla_lib_name" >> $filelist.tmp … … 2787 2782 elif [ "$#" -ge "9" ] && [ "$1" = "--custom" ] ; then 2788 2783 MONDOTMP=$2 2789 BIDON=$3 2784 CACHE_LOC=$3 2785 if [ _"$CACHE_LOC" != _"" ]; then 2786 mkdir -p $CACHE_LOC 2787 fi 2790 2788 kernelpath=$4; [ "$kernelpath" = "(null)" ] && kernelpath="" 2791 2789 ### … … 2846 2844 [ "$CDRECOVERY" = "yes" ] && [ "$TAPEDEV" != "" ] && Die "Sorry, you can't use --cd-recovery and --write-tapes at the same time" 2847 2845 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 2849 2851 else 2850 2852 echo "Syntax: mindi (--custom ....)" >> /dev/stderr
Note:
See TracChangeset
for help on using the changeset viewer.