Changeset 388


Ignore:
Timestamp:
Feb 14, 2006, 11:36:15 PM (14 years ago)
Author:
bcornec
Message:

RPMs are now made with a .spec containing m4 macros expanded with tools/mkrpm
this allows for a simpler spec file at the end,
which should be suited for at least Mandriva official packages.
Added a new mkspec tool which does the expansion
This way of dealing with distributions will be used is some other areas in the future

Location:
branches/stable
Files:
16 added
8 edited
1 copied
1 moved

Legend:

Unmodified
Added
Removed
  • branches/stable/documentation/mondorescue-howto.sgml

    r348 r388  
    44
    55<!ENTITY WWWB "http://www.mondorescue.org/">
    6 <!ENTITY WWW '<ulink url=&WWWB;>MondoRescue</ulink>'>
     6<!ENTITY WWW '<ulink url="http://www.mondorescue.org">MondoRescue</ulink>'>
    77<!ENTITY ML '<ulink url="http://lists.sourceforge.net/lists/listinfo/mondo-devel">mondorescue mailing list</ulink>'>
    88<!ENTITY gfdl SYSTEM "fdl.sgml">
     
    13711371        to work, please refer to the file README.pxe provided with
    13721372        your mindi package.
     1373</para>
    13731374</sect2>
    13741375</sect1>
     
    22672268see what you're kernel must support.</para>
    22682269</answer>
     2270</qandaentry>
     2271<qandaentry>
    22692272<question>
    22702273<para><anchor id="COPYBOOTDATADISK"/>Q: How do i copy boot+data
  • branches/stable/mindi/distributions/rpm/mindi.spec

    r347 r388  
    22# $Id$
    33#
    4 %define is_mandriva %(test -e /etc/mandriva-release && echo 1 || echo 0)
    5 %define is_mandrake %(test -e /etc/mandrake-release && echo 1 || echo 0)
    6 %define is_suse %(test -e /etc/SuSE-release && echo 1 || echo 0)
    7 %define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
    8 %define is_redhat %(test -e /etc/redhat-release && echo 1 || echo 0)
    9 
    104%define name    mindi
    115%define version VVV
    126%define mrel    RRR
     7%define src     SSS
     8%define grp     GRP
     9%define addreqb bzip2 >= 0.9, mkisofs, ncurses, binutils, gawk, dosfstools
     10%define addreq  DDD
     11
    1312# if mandriva official build (rpm --with is_official)
    1413%{?is_official:%define rel %{mkrel} %{mrel}}%{!?is_official:%define rel %{mrel}}
    15 %define src     %{name}-%{version}.tgz
    16 %define grp     Archiving/Backup
    17 %define addreqb bzip2 >= 0.9, mkisofs, ncurses, binutils, gawk, dosfstools, afio
    18 
    19 %if %is_redhat
    20 %define grp     Applications/Archiving
    21 %define addreq  %{addreqb}, which, grep >= 2.5
    22 Autoreq:    0
    23 %endif
    24 
    25 %if %is_mandrake
    26 %define src     %{name}-%{version}.tar.bz2
    27 %define addreq  %{addreqb}, which, grep >= 2.5
    28 Autoreqprov: no
    29 %endif
    30 
    31 %if %is_mandriva
    32 %define src     %{name}-%{version}.tar.bz2
    33 %define addreq  %{addreqb}, which, grep >= 2.5
    34 Autoreqprov: no
    35 %endif
    36 
    37 %if %is_suse
    38 %define addreq  %{addreqb}
    39 %endif
    4014
    4115# define the mkrel macro if it is not already defined if mandriva offical build
     
    8256
    8357./install.sh
    84 
    85 %if %is_suse
    86 %{__rm} -rf $RPM_BUILD_ROOT/%{_datadir}/doc/%name-%{version}
    87 %endif
    8858
    8959%clean
  • branches/stable/mondo/distributions/rpm/mondo.spec

    r367 r388  
    22# $Id$
    33#
    4 %define is_mandriva %(test -e /etc/mandriva-release && echo 1 || echo 0)
    5 %define is_mandrake %(test -e /etc/mandrake-release && echo 1 || echo 0)
    6 %define is_suse %(test -e /etc/SuSE-release && echo 1 || echo 0)
    7 %define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
    8 %define is_redhat %(test -e /etc/redhat-release && echo 1 || echo 0)
    94
    105%define name    mondo
     
    138# if mandriva official build (rpm --with is_official)
    149%{?is_official:%define rel %{mkrel} %{mrel}}%{!?is_official:%define rel %{mrel}}
    15 %define src     %{name}-%{version}.tgz
    16 %define grp     Archiving/Backup
     10%define src     SSS
     11%define grp     GRP
    1712%define addreqb mindi >= 1.05, bzip2 >= 0.9, afio, mkisofs, binutils, newt >= 0.50, slang >= 1.4.1
    18 
    19 %if %is_redhat
    20 %define grp     Applications/Archiving
    21 %define addreq  %{addreqb}
    22 Autoreq:        0
    23 %endif
    24 
    25 %if %is_mandrake
    26 %define src     %{name}-%{version}.tar.bz2
    27 %define addreq  %{addreqb}
    28 Autoreqprov:    no
    29 %endif
    30 
    31 %if %is_mandriva
    32 %define src     %{name}-%{version}.tar.bz2
    33 %define addreq  %{addreqb}
    34 Autoreqprov:    no
    35 %endif
    36 
    37 %if %is_suse
    38 %define addreq  %{addreqb}
    39 %endif
    4013
    4114Summary:    A program which a Linux user can utilize to create a rescue/restore CD/tape
  • branches/stable/mondo/distributions/rpm/mondorescue.conf

    r344 r388  
    55# We tried to give sensible defaults in this file.
    66# Changing some values may render mondorescue instable
    7 # or causes failures. Use with care.
     7# or cause failures. Use with care.
    88
    99
     
    165165# Images creation dir
    166166#
    167 image_dir="/root/images/mindi"
     167images_dir="/root/images/mindi"
  • branches/stable/tools/mkcommon

    r339 r388  
    2222    rm -fr mindi-kernel-${MINDI_VER}
    2323    svn export ${VER}/mindi-kernel mindi-kernel-${MINDI_VER}
    24     #cp -a ${VER}/mindi-kernel mindi-kernel-${MINDI_VER}
    25     #find mindi-kernel-${MINDI_VER} -type d -name .svn | xargs rm -rf
    26     #find mindi-kernel-${MINDI_VER} -type f -name '.*.swp' | xargs rm -rf
    27     #find mindi-kernel-${MINDI_VER} -type f -name '*~' | xargs rm -rf
    2824    mkdir -p ${TOPDIR}/SOURCES
    2925
     
    3733    rm -fr mindi-${MINDI_VER}
    3834    svn export ${VER}/mindi mindi-${MINDI_VER}
    39     #cp -a ${VER}/mindi mindi-${MINDI_VER}
    4035    cp -a /tmp/mondorescue-svn.log mindi-${MINDI_VER}/svn.log
    4136    echo "$REVISION" > mindi-${MINDI_VER}/REVISION
    42     #find mindi-${MINDI_VER} -type d -name .svn | xargs rm -rf
    43     #find mindi-${MINDI_VER} -type f -name '.*.swp' | xargs rm -rf
    44     #find mindi-${MINDI_VER} -type f -name '*~' | xargs rm -rf
    4537    rm -f mindi-${MINDI_VER}/rootfs/sbin/parted2fdisk-ia64
    46     #rm -f mindi-${MINDI_VER}/parted2fdisk mindi-${MINDI_VER}/parted2fdisk.c mindi-${MINDI_VER}/rootfs/sbin/parted2fdisk-ia64
    4738
    4839    echo "Creating mindi tar files"
     
    5647    rm -rf mondo-${MONDO_VER}
    5748    svn export ${VER}/mondo mondo-${MONDO_VER}
    58     #cp -a ${VER}/mondo mondo-${MONDO_VER}
    5949    cp -a /tmp/mondorescue-svn.log mondo-${MONDO_VER}/svn.log
    6050    echo "$REVISION" > mondo-${MONDO_VER}/REVISION
     
    6353    cd documentation-${MONDO_VER}
    6454    make install INSTALLDIR=../mondo-${MONDO_VER}/mondo/docs/en
     55    if [ $? != 0 ]; then
     56        exit -1
     57    fi
    6558    cd ../mondo-${MONDO_VER}
    6659    echo "Bootstraping mondo ... "
    6760    ./bootstrap
    68     #find . -type d -name .svn | xargs rm -rf
    69     #find . -type f -name '.*.swp' | xargs rm -rf
    70     #find . -type f -name '*~' | xargs rm -rf
    7161    cd ..
    7262
  • branches/stable/tools/mkrpm

    r319 r388  
    2828    cd ${BASE}/svn
    2929    mkdir -p ${TOPDIR}/SOURCES
    30     sed "s/^%define mrel..*RRR/%define mrel ${REVISION}${suf}/" mindi-kernel-${MINDI_VER}/mindi-kernel.spec > ${TOPDIR}/SPECS/mindi-kernel.spec
     30    $TOOLHOME/mkspec ${MINDI_VER} mindi-kernel-${MINDI_VER}/mindi-kernel.spec > ${TOPDIR}/SPECS/mindi-kernel.spec
    3131    pkg="$pkg ${TOPDIR}/RPMS/${ARCH}/mindi-kernel-${MINDI_VER}-${REVISION}${suf}.${ARCH}.rpm"
    3232fi
    3333if [ "`echo $c | grep -v kernel | grep mindi`" != "" ]; then
    3434    cd ${BASE}/svn
    35     if [ -f mindi-${MINDI_VER}/distributions/${ddir}/mindi.spec ]; then
    36         specfile=mindi-${MINDI_VER}/distributions/${ddir}/mindi.spec
    37     else
    38         specfile=mindi-${MINDI_VER}/distributions/common/mindi.spec
    39     fi
    40     sed -e "s/^%define mrel..*RRR/%define mrel  ${REVISION}${suf}/" -e "s/VVV/${MINDI_VER}/" $specfile > ${TOPDIR}/SPECS/mindi.spec
     35    $TOOLHOME/mkspec ${MINDI_VER} mindi-${MINDI_VER}/distributions/rpm/mindi.spec > ${TOPDIR}/SPECS/mindi.spec
    4136    rm -rf mindi-${MINDI_VER}/distributions
    4237    mkdir -p ${TOPDIR}/SOURCES
     
    4843if [ "`echo $c | grep  mondo`" != "" ]; then
    4944    cd ${BASE}/svn
    50     if [ -f mondo-${MONDO_VER}/distributions/${ddir}/mondo.spec ]; then
    51         specfile=mondo-${MONDO_VER}/distributions/${ddir}/mondo.spec
    52     else
    53         specfile=mondo-${MONDO_VER}/distributions/common/mondo.spec
    54     fi
    55     sed -e "s/^%define mrel..*RRR/%define mrel  ${REVISION}${suf}/" -e "s/VVV/${MONDO_VER}/" $specfile > ${TOPDIR}/SPECS/mondo.spec
     45    $TOOLHOME/mkspec ${MONDO_VER} mondo-${MONDO_VER}/distributions/rpm/mondo.spec > ${TOPDIR}/SPECS/mondo.spec
    5646    rm -rf mondo-${MONDO_VER}/distributions
    5747
  • branches/stable/tools/rpm-env

    r356 r388  
    3232
    3333if [ -e /etc/mandriva-release ]; then
     34    export dfam="mandriva"
    3435    export ddir="mandriva"
    3536    export dver=`awk '{print $4}' /etc/mandriva-release`
    3637    export suf=".`echo $dver | sed 's/\.//'`mdk"
    3738elif [ -e /etc/mandrake-release ]; then
     39    export dfam="mandriva"
    3840    export ddir="mandrake"
    3941    export dver=`awk '{print $3}' /etc/mandrake-release`
     
    4244    grep -q Enterprise /etc/redhat-release
    4345    if [ $? -eq 0 ]; then
     46        export dfam="redhat"
    4447        export ddir="rhel"
    4548        export dver=`awk '{print $7}' /etc/redhat-release`
    4649    elif grep -q Fedora /etc/redhat-release ; then
     50        export dfam="redhat"
    4751        export ddir="fedora"
    4852        export dver=`awk '{print $4}' /etc/redhat-release`
    4953        export suf=".fc${dver}"
    5054    else
     55        export dfam="redhat"
    5156        export ddir="redhat"
    5257        dver=`awk '{print $5}' /etc/redhat-release`
     
    5762    grep -q Enterprise /etc/SuSE-release
    5863    if [ $? -eq 0 ]; then
     64        export dfam="suse"
    5965        export ddir="sles"
    6066        export dver=`head -1 /etc/SuSE-release | awk '{print $5}'`
    6167    else
     68        export dfam="suse"
    6269        export ddir="suse"
    6370        export dver=`head -1 /etc/SuSE-release | awk '{print $3}'`
    6471    fi
    6572else
     73    export dfam="generic"
    6674    export dver=""
    6775    export ddir="generic"
Note: See TracChangeset for help on using the changeset viewer.