source: MondoRescue/branches/stable/tools/mkspec @ 388

Last change on this file since 388 was 388, checked in by bcornec, 15 years ago

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

  • Property svn:executable set to *
File size: 689 bytes
Line 
1#!/bin/bash
2#
3# Creates SPEC file for RPMs packages from SVN repository
4#
5# 1st parameter: the version of the tool
6# 2nd parameter: the original file to process
7#
8# $Id$
9#
10
11dir=`dirname $2`
12if [ -f ${dir}/../$ddir/spec.m4 ]; then 
13    inc=${dir}/../$ddir/spec.m4
14elif [ -f ${dir}/../$ddmir/spec.m4 ]; then 
15    inc=${dir}/../$ddmir/spec.m4
16else
17    echo "Unable to build RPM for this distro. Please report to authors"
18    exit -1
19fi
20
21# Do not echo as stdout redirected
22#echo "Using $inc customization to build SPEC file"
23
24cp $inc /tmp/mondorescue.mc
25cat >> /tmp/mondorescue.mc << EOF
26define(\`RRR', ${REVISION}${suf})dnl
27define(\`VVV', ${1})dnl
28EOF
29m4 /tmp/mondorescue.mc $2
30rm -f /tmp/mondorescue.mc
Note: See TracBrowser for help on using the repository browser.