Skip to content

Commit

Permalink
rpm spec file: Fill in Version automatically
Browse files Browse the repository at this point in the history
With this change the RPM spec file no longer has to be updated with each
release.  Apart from not repeating ourselves this lends itself to more
automation around the release process and the possibility of creating
development RPMs in a continuous fashion using the OpenSUSE Build Service.
  • Loading branch information
wmanley committed Feb 20, 2014
1 parent 52cd89c commit 91556b8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ VERSION
extra/vm/.vagrant
tests/test-install
nosetest-issue-49-workaround-stbt-control.py
extra/stb-tester.spec
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ VERSION?=$(shell cat VERSION)

all: stbt stbt.1 defaults.conf

extra/debian/changelog stbt : % : %.in .stbt-prefix VERSION
extra/stb-tester.spec extra/debian/changelog stbt : % : %.in .stbt-prefix VERSION
sed -e 's,@VERSION@,$(VERSION),g' \
-e 's,@ESCAPED_VERSION@,$(subst -,_,$(VERSION)),g' \
-e 's,@LIBEXECDIR@,$(libexecdir),g' \
-e 's,@SYSCONFDIR@,$(sysconfdir),g' \
-e "s/@RFC_2822_DATE@/$$(date -R)/g" \
Expand Down
1 change: 1 addition & 0 deletions extra/openbuildservice.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ To build a new release:
cd ~/src/stb-tester
git checkout <latest tag>
make dist
make extra/stb-tester.spec
cp stb-tester-<latest tag>.tar.gz extra/stb-tester.spec \
~/src/stb-tester-openbuildservice/home:stb-tester/stb-tester/
cd ~/src/stb-tester-openbuildservice/home:stb-tester/stb-tester
Expand Down
6 changes: 3 additions & 3 deletions extra/stb-tester.spec → extra/stb-tester.spec.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Name: stb-tester
Version: 0.18
Version: @ESCAPED_VERSION@
Release: 1%{?dist}
Summary: Automated user interface testing for set-top boxes
Group: Development/Tools
URL: http://stb-tester.com
License: LGPLv2.1+
Source: %{name}-%{version}.tar.gz
Source: %{name}-@VERSION@.tar.gz
BuildArch: noarch
BuildRequires: python-docutils

Expand All @@ -31,7 +31,7 @@ Test scripts are written in Python and can be generated with the `stbt record`
command.

%prep
%setup
%setup -n stb-tester-@VERSION@

%build
make prefix=/usr sysconfdir=/etc
Expand Down

0 comments on commit 91556b8

Please sign in to comment.