Commit e1f112c5 authored by Snir Sheriber's avatar Snir Sheriber Committed by Frediano Ziglio
Browse files

Add copr Makefile

This Makefile script is invoked by copr to build source rpm
See: https://docs.pagure.org/copr.copr/user_documentation.html#make-srpm
parent 78c219be
Pipeline #53835 passed with stage
in 6 minutes and 56 seconds
# This Makefile script is invoked by copr to build source rpm
# See: https://docs.pagure.org/copr.copr/user_documentation.html#make-srpm
PROTOCOL_GIT_REPO = https://gitlab.freedesktop.org/spice/spice-protocol
BUILD = make automake autoconf autoconf-archive libtool xz git rpm-build
srpm:
dnf install -y $(BUILD)
# get upstream spice protocol
git clone $(PROTOCOL_GIT_REPO)
cd spice-protocol && ./autogen.sh --prefix=/usr/ && make install
# get other dependencies for project excluding spice-protocol
dnf install -y `sed '/^BuildRequires:/!d; s/.*://; s/\bspice-protocol\b//; s/>.*//' *.spec.in`
# create source rpm
./autogen.sh
sed -i -E "s/(^Release:[[:space:]]*)([^%]*)/\1`date +'%Y%m%d%H%M.spice.nigthly'`/" *.spec
make dist
rpmbuild -bs *.spec --define "_sourcedir $$PWD" --define "_srcrpmdir $(outdir)"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment