build rpm package during ci

* .gitignore: don't commit spot.spec
* Makefile.am: write version number to spot.spec.in
* .gitlab-ci.yml: new job builds the tarball and rpm package
* spot.spec.in: spot.spec is used by rpmbuild to build the package
This commit is contained in:
Antoine Martin 2018-06-26 16:19:31 +02:00 committed by Antoine Martin
parent f5f5daec9a
commit 3c12015181
4 changed files with 215 additions and 1 deletions

View file

@ -68,7 +68,8 @@ debian/changelog: configure.ac
EXTRA_DIST = HACKING ChangeLog.1 tools/gitlog-to-changelog \
tools/help2man tools/man2html.pl \
tools/test-driver-teamcity $(UTF8) $(DEBIAN) \
m4/gnulib-cache.m4 .dir-locals.el
m4/gnulib-cache.m4 .dir-locals.el \
spot.spec spot.spec.in
dist-hook: gen-ChangeLog
@ -111,3 +112,6 @@ deb: dist
tar Jcvf spot_$(VERSION)$(GITPATCH).orig.tar.xz \
spot-$(VERSION)$(GITPATCH)
cd spot-$(VERSION)$(GITPATCH) && debuild $(DEBUILDFLAGS) -us -uc
spot.spec: configure.ac spot.spec.in
sed 's/[@]VERSION[@]/$(VERSION)/;s/[@]GITPATCH[@]/@@@$(GITPATCH)/;s/@@@\.//' spot.spec.in > $@.tmp && mv $@.tmp $@