Dynamically specify version for RPM builds

This commit is contained in:
James Campbell 2025-04-19 00:22:26 -04:00
parent 2afeb827ed
commit 8ace133c23
Signed by: james
GPG Key ID: 2287C33A40DC906A
3 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
# Package details
PACKAGE_NAME := pgmon
VERSION := 1.0
VERSION := 1.0.1
SCRIPT := src/$(PACKAGE_NAME).py
@ -158,7 +158,7 @@ actually-package-debian-%:
# RedHat package creation
actually-package-rockylinux-%:
mkdir -p /output/rockylinux-$*/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
cp RPM/$(PACKAGE_NAME).spec /output/rockylinux-$*/SPECS/
sed -e "s/@@VERSION@@/$(VERSION)/g" RPM/$(PACKAGE_NAME).spec > /output/rockylinux-$*/SPECS/$(PACKAGE_NAME).spec
rpmbuild --define '_topdir /output/rockylinux-$*' \
--define 'version $(VERSION)' \
-bb /output/rockylinux-$*/SPECS/$(PACKAGE_NAME).spec
@ -173,7 +173,7 @@ actually-package-ubuntu-%:
# OracleLinux package creation
actually-package-oraclelinux-%:
mkdir -p /output/oraclelinux-$*/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
cp RPM/$(PACKAGE_NAME)-el7.spec /output/oraclelinux-$*/SPECS/$(PACKAGE_NAME).spec
sed -e "s/@@VERSION@@/$(VERSION)/g" RPM/$(PACKAGE_NAME)-el7.spec > /output/oraclelinux-$*/SPECS/$(PACKAGE_NAME).spec
rpmbuild --define '_topdir /output/oraclelinux-$*' \
--define 'version $(VERSION)' \
-bb /output/oraclelinux-$*/SPECS/$(PACKAGE_NAME).spec

View File

@ -1,5 +1,5 @@
Name: pgmon
Version: 1.0
Version: @@VERSION@@
Release: 1%{?dist}
Summary: A bridge to sit between monitoring tools and PostgreSQL

View File

@ -1,5 +1,5 @@
Name: pgmon
Version: 1.0
Version: @@VERSION@@
Release: 1%{?dist}
Summary: A bridge to sit between monitoring tools and PostgreSQL