aboutsummaryrefslogblamecommitdiff
path: root/build-rpm.sh
blob: bd63808810723d43dbc28f83c173d36a696a867d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                               
#!/bin/bash
set -ex
version=$(sed -n 's/^Version: *\([0-9.]\+\)$/\1/p' < dist/fedora/pgbak.spec)
[[ -n "$version" ]]
if [[ -d "build" ]]; then
	rm -r build
fi
mkdir build build/{src,rpms,srpms}
git archive --prefix="pgbak-$version/" HEAD > "build/src/pgbak-$version.tar.xz"
rpmbuild \
	-D"_sourcedir $PWD/build/src" \
	-D"_srcrpmdir $PWD/build/srpms" \
	-D"_rpmdir $PWD/build/rpms" \
	-ba dist/fedora/pgbak.spec