Modify RPM packaging to allow an SRPM to be built.

This commit is contained in:
Richard Siddall 2010-02-13 16:27:13 -05:00 committed by Ask Bjørn Hansen
parent ef1b493b18
commit 977d94a6e0

View File

@ -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 \