Skip to content
Snippets Groups Projects
Commit 4c4a3809 authored by Christoph Berg's avatar Christoph Berg :satellite:
Browse files

Set rpm version number from debian/changelog

Use "make rpmbuild" to set the necessary 'version' rpm macro.
parent a23b1e2b
No related branches found
No related tags found
No related merge requests found
......@@ -31,13 +31,11 @@ clean:
# rpm
DPKG_VERSION=$(shell sed -ne '1s/.*(//; 1s/).*//p' debian/changelog)
RPM_VERSION=$(shell awk '/^Version:/ { print $$2 }' rpm/postgresql-common.spec)
RPMDIR=$(HOME)/rpmbuild
TARBALL=$(RPMDIR)/SOURCES/postgresql-common_$(DPKG_VERSION).tar.xz
rpm: $(TARBALL)
[ "$(DPKG_VERSION)" = "$(RPM_VERSION)" ]
rpmbuild -ba rpm/postgresql-common.spec
rpmbuild: $(TARBALL)
rpmbuild --define='version $(DPKG_VERSION)' -ba rpm/postgresql-common.spec
$(TARBALL):
mkdir -p $(dir $(TARBALL))
......@@ -46,5 +44,8 @@ $(TARBALL):
rpminstall:
sudo rpm --upgrade --replacefiles --replacepkgs -v $(RPMDIR)/RPMS/noarch/*-$(DPKG_VERSION)-*.rpm
rpmremove:
-sudo rpm -e postgresql-common postgresql-client-common postgresql-server-dev-all
rpmclean:
rm -rf $(TARBALL) $(RPMDIR)/BUILD
Name: postgresql-common
Version: 189
Version: %{version}
Release: 1%{?dist}
BuildArch: noarch
Summary: PostgreSQL database-cluster manager
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment