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

@ -200,6 +200,28 @@ debpkg-unstable:
paths:
- _build_unstable/
rpm-pkg:
stage: build
only:
- /-rpm$/
- master
- next
- stable
image: registry.lrde.epita.fr/spot-rpm
script:
- autoreconf -vfi
- ./configure
- make
- make dist
- cp spot-*.tar.gz ~/rpmbuild/SOURCES/
- cp spot.spec ~/rpmbuild/SPECS/
- rpmbuild -bb ~/rpmbuild/SPECS/spot.spec
- mv ~/rpmbuild/RPMS/x86_64/*.rpm .
artifacts:
when: always
paths:
- ./*.rpm
publish-stable:
only:
- stable