From f6bf84ac789c430ef71123c35a91d70d8162e9b9 Mon Sep 17 00:00:00 2001 From: Hristo Venev Date: Sun, 14 Apr 2024 17:38:19 +0300 Subject: Package for Fedora --- build-rpm.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 build-rpm.sh (limited to 'build-rpm.sh') diff --git a/build-rpm.sh b/build-rpm.sh new file mode 100755 index 0000000..bd63808 --- /dev/null +++ b/build-rpm.sh @@ -0,0 +1,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 -- cgit