RPM-Specfile

 view release on metacpan or  search on metacpan

lib/RPM/Specfile.pm  view on Meta::CPAN

will be set to this.

	$spec->group('mkdir -p $RPM_BUILD_ROOT/usr/local/mypkg');

=item license([$license])

Returns the type of license the rpm is will be released under.  If $license is
given, license will be set to $license.


=item macros([$macro_defs])

Returns the macro definitions that are before the preamble of the specfile.
If $macro_defs is given, the macro definitions will be set to it.

	$spec->macros("%define x 1\n%define y 2");

=item name([$name])

Returns the name of the rpm.  If $name is given, the name is set to $name.

	$spec->name('perl-RPM-Specfile');

=item packager([$packager])

Returns the email address of the packager.  If $packager is set, packager is set to
$packager.

	$spec->packager('someone@some.where');

=item patch([$index, $patch])

Returns a list of patches.  If $index and $patch are provided it will
set the entry referenced by $index to $patch.

	@patches = $spec->patch();

=item post([$scriptlet])

Returns the contents of the %post scriptlet.  If $scriptlet is given, %post is set
to the value of $scriptlet.

	$spec->post("echo Running %%post...\nexit 0");

=item postun([$scriptlet])

Returns the contents of the %postun scriptlet.  If $scriptlet is given, %postun is set
to the value of $scriptlet.

	$spec->postun("echo Running %%postun...\nexit 0");

=item pre([$scriptlet])

Returns the contents of the %pre scriptlet.  If $scriptlet is given, %pre is set
to the value of $scriptlet.

	$spec->pre("echo Running %%pre...\nexit 0");

=item prefix([$index, $prefix])

Returns a list of prefix/relocation entries.  If $index and $prefix are provided it will
set the entry referenced by $index to $prefix.

	@prefixes = $spec->prefix();

=item preun([$scriptlet])

Returns the contents of the %preun scriptlet.  If $scriptlet is given, %preun is set
to the value of $scriptlet.

	$spec->preun("echo Running %%preun...\nexit 0");

=item prep([$scriptlet])

Returns the contents of the %prep scriptlet.  If $scriptlet is given, %prep is set
to the value of $scriptlet.

	$spec->prep("echo Running %%prep...\nexit 0");

=item provide([$index, $provision])

Returns a list of provision entries.  If $index and $provision are provided it will
set the entry referenced by $index to $provision.

	@provides = $spec->provide();

=item push_buildrequire([$entry])

Push a build requirement onto the list of build requirments.

	$spec->push_buildrequire('gcc >= 3.2');

=item push_changelog([$entry])

Pushes a changelog entry onto the list of changelog entries.

=item push_file([$entry])

Pushes a file onto the list of files.

	$spec->push_file('%attr(0664, root, root) %dir /usr/local/mypkg');
	$spec->push_file('%attr(0664, root, root) /usr/local/mypkg/myfile');

=item push_patch([$entry])

Pushes a patch onto the list of patches.

	$spec->push_patch('autorollback.patch');

Note, adding a patch implicitly adds entries to the %prep script.

=item push_prefix([$prefix])

Push a prefix onto to the list of valid relocations.

	$spec->clear_prefix('/usr/local/mypkg');

=item push_provide([$entry])

Pushes a provision onto the list of provisions.

	$spec->push_provide('kernel-tools = 2.6');

=item push_require([$entry])

Pushes a requirement onto the list of requirements.

	$spec->push_require('perl(RPM::Specfile)');

=item push_source([$entry])

Pushes a source entry onto the list of sources.

	$spec->push_source('wget-1.8.2.tar.gz');

=item release([$release])

Returns the release of the rpm.  If $release is specified, release is set to $release.

	$spec->release('1.1');

=item require([$index, $requirement])

Returns a list of requirement entries.  If $index and $requirement are provided it will
set the entry referenced by $index to $requirement.

	@requires = $spec->require();

=item requires([$requires])

Returns the value of the Requires line.  If $requires is set, the Requires line will
be set to $requires.

	$spec->requires('xdelta > 0:1.1.3-11, vlock > 0:1.3-13');

=item source([$index, $source])

Returns a list of source entries.  If $index and $source are provided it will
set the entry referenced by $index to $source.

	@sources = $spec->source();

=item summary([$summary])

Returns the value of the Summary line.  If $summary is set, the Summary line will
be set to $summary.

=item url([$url])

Returns the url of the rpm.  If $usr is set, the url is set to $url.

	$spec->url('http://www.cpan.org');

=item vendor([$vendor])



( run in 0.581 second using v1.01-cache-2.11-cpan-71847e10f99 )