~ubuntu-branches/ubuntu/wily/smplayer/wily

« back to all changes in this revision

Viewing changes to create_rpm.sh

  • Committer: Bazaar Package Importer
  • Author(s): Matvey Kozhev
  • Date: 2008-05-30 12:52:19 UTC
  • mto: (1.1.7 upstream) (3.1.1 lenny)
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: james.westby@ubuntu.com-20080530125219-ky15vano4ps1ppnk
ImportĀ upstreamĀ versionĀ 0.6.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#svn up
 
3
./get_svn_revision.sh
 
4
 
 
5
SVN_REVISION=`cat svn_revision.txt | sed -e 's/SVN-/svn_/g'`
 
6
SMPVERSION=`cat src/version.cpp | grep "#define VERSION " | sed -e 's/#define VERSION "//g' -e 's/ /_/g' -e 's/"$//g'`
 
7
 
 
8
svn export . /tmp/smplayer-${SMPVERSION}_${SVN_REVISION}
 
9
CURDIR=`pwd`
 
10
cd /tmp
 
11
tar cvjf smplayer-${SMPVERSION}_${SVN_REVISION}.tar.bz2 smplayer-${SMPVERSION}_${SVN_REVISION}/
 
12
rm -r /tmp/smplayer-${SMPVERSION}_${SVN_REVISION}
 
13
cat ${CURDIR}/smplayer.spec | sed -e 's/%define version [a-zA-Z0-9\.]*$/%define version '${SMPVERSION}'_'${SVN_REVISION}'/' > /tmp/smplayer.spec
 
14
PCKGDIR=/usr/src/packages/
 
15
if [ -e /etc/fedora-release ]; then
 
16
    PCKGDIR=/usr/src/redhat/
 
17
fi
 
18
if [ -e /etc/mandrake-release ]; then
 
19
    PCKGDIR=/usr/src/rpm/
 
20
fi
 
21
cp /tmp/smplayer-${SMPVERSION}_${SVN_REVISION}.tar.bz2 ${PCKGDIR}SOURCES/
 
22
rpmbuild -bb --clean --rmsource smplayer.spec