description | Helps build srpm's from git trees |
owner | sam@liddicott.com |
last change | Tue, 9 Mar 2010 21:46:48 +0000 (9 21:46 +0000) |
URL | git://repo.or.cz/make-srpm.git |
https://repo.or.cz/make-srpm.git | |
push URL | ssh://repo.or.cz/make-srpm.git |
https://repo.or.cz/make-srpm.git (learn more) | |
bundle info | make-srpm.git downloadable bundles |
content tags |
make-srpm [options] project.spec [...]and this should be invoked from within or below the git/svn checkout directory.
make-srpm ORIGIN_PATTERN="*alpha*" project.spec
or from within the specfile from specially formed comments.
The Name: and Version: fields are always extracted and stored
in the environment variables Name and Version.
The following comments are also searched:
#make-srpm-SOURCE_PATHS:
#make-srpm-ORIGIN:
#make-srpm-ORIGIN_PATTERN:
#make-srpm-RELEASE:
#make-srpm-PATCH_LEVEL:
#makesrpm-GIT_CLONE:
#makesrpm-GIT_CHECKOUT: HEAD
to set environment variables named without the lower case prefix. The
meaning of these is explained below:
SOURCE_PATHS - this is a space-separated list of directories
relative to the top level git folder, and specifies the folders to be exported.
Some git trees contain source for more than one project and so it can be
convenient to reduce the size of the source tar.gz by putting a line like this
in the sub-project spec file:
#make-srpm-SOURCE_PATHS: sub_project_dir includesORIGIN - this is a git reference to the commit that represents the pristine source and should probably be the most recent tag before the git rebase point. This can be a tag or a commit hash.
#make-srpm-ORIGIN_PATTERN=*release*RELEASE - is a git reference to the release that you want to build; thus patches will be emitted from ORIGIN to RELEASE. This can be a ta or a commit hash, or the value HEAD (meaning whatever is currently checked out), or the special value LOCAL which means that uncommitted changes are also included.
#make-srpm-PATCH_LEVEL=2The new spec file will also contain some convenient macro definitions at the top of the file, like:
%define makesrpm_tarname samba-release-4-0-0alpha7.tar.gzwhich you can use as a basis for your own macro definitions or package fields.
%define makesrpm_tarprefix samba-release-4-0-0alpha7
make-srpm define_project_builder=sam@liddicott.com \will replace the macro de
_define_project_version='$VERSION' \
CFLAGS="-O2" \
project.spec
GIT_CLONE - a git URL is cloned into a temporary folder, and
then used. This allows make-srpm to run against a base spec file, and checkout
the appropriate git tree. The -c flag can be used to specify a temp folder to
use, which will be deleted afterwards (if empty). -C specifys a temp path to
use but does not deleted it afterwards - useful to avoid repeated slow
checkouts. See GIT_CHECKOUT
GIT_CHECKOUT - a branch or tag or hash to checkout after
GIT_CLONE
RELEASE_COMMIT="$(git rev-parse "$RELEASE^{commit}")"
14 years ago | master | logtree |