From 977d94a6e02998a53240711cbb817b693022eeff Mon Sep 17 00:00:00 2001 From: Richard Siddall Date: Sat, 13 Feb 2010 16:27:13 -0500 Subject: [PATCH] Modify RPM packaging to allow an SRPM to be built. --- packaging/rpm/Makefile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/packaging/rpm/Makefile b/packaging/rpm/Makefile index da8b75a..23756e1 100644 --- a/packaging/rpm/Makefile +++ b/packaging/rpm/Makefile @@ -43,6 +43,19 @@ buildrpmdist: buildtargz --define "_release ${RELEASE}" \ -ta ./build/$(TARBALL).gz +# -- the "srpmdist" target will build an SRPM out of the SCM, but +# will use the user's default build settings (which in many +# cases is exposed as an RPM repository) +# +srpmdist: buildsrpmdist + +buildsrpmdist: buildtargz + @rpmbuild \ + --define "_package ${PACKAGE}" \ + --define "_version ${VERSION}" \ + --define "_release ${RELEASE}" \ + -ts --nodeps ./build/$(TARBALL).gz + # -- the "rpm" target will build out of the SCM, but will leave # the resulting package in the relative ./build/ directory # @@ -59,6 +72,23 @@ buildrpm: buildtargz --define "_release ${RELEASE}" \ -ta ./build/$(TARBALL).gz +# -- the "srpm" target will build an SRPM out of the SCM, but +# will leave the resulting package in the relative ./build/ +# directory +# +srpm: buildsrpm $(SCM_TYPE)-clean + +buildsrpm: buildtargz + @echo ${PACKAGE} ${VERSION} ${RELEASE} + @rpmbuild \ + --define "_rpmdir ./build/" \ + --define "_sourcedir ./build/" \ + --define "_srcrpmdir ./build/" \ + --define "_package ${PACKAGE}" \ + --define "_version ${VERSION}" \ + --define "_release ${RELEASE}" \ + -ts --nodeps ./build/$(TARBALL).gz + buildtarball: prepbuildtarball @tar \ --create \