]> git.donarmstrong.com Git - lilypond.git/blob - bin/rpm-dist.sh
a10b49f13a3bee7ed9b71af66593ac291cac70f0
[lilypond.git] / bin / rpm-dist.sh
1 #!/bin/sh
2 # rpm-dist.sh --- make an rpm distribution
3
4 latest=lilypond-`show-latest -p`
5 { cd $LILYPOND_SOURCEDIR; cd ..; 
6 export LILYPOND_ROOTDIR=`pwd` }
7
8 icon=lelie_icon.gif
9 rpmrc=$LILYPOND_SOURCEDIR/make/out/rpmrc
10 spec=$LILYPOND_SOURCEDIR/make/out/lilypond.spec
11
12 if [ ! -e $LILYPOND_ROOTDIR/releases/$icon ]; then
13         make -C $LILYPOND_ROOTDIR/current/Documentation gifs
14         ln $LILYPOND_ROOTDIR/current/Documentation/out/$icon $LILYPOND_ROOTDIR/releases
15 fi
16
17 # urg
18 user=`whoami`
19 if [ "x$user" != "xroot" ]; then
20         echo only root wants to build RPMs
21         exit 2
22 fi
23
24 if [ ! -e $LILYPOND_ROOTDIR/redhat/BUILD ]; then
25         mkdir -p $LILYPOND_ROOTDIR/redhat/BUILD
26         mkdir -p $LILYPOND_ROOTDIR/redhat/RPMS/i386
27         mkdir -p $LILYPOND_ROOTDIR/redhat/SRPMS
28 fi
29
30 set -x
31 cd $LILYPOND_ROOTDIR/redhat || exit 1
32 rm -rf lilypond-*
33
34 rpm -ba --rcfile $rpmrc $spec
35