genspec(1)

GENSPEC(1) USER COMMANDS GENSPEC(1)

NAME

genspec - Is the script to generate RPM spec file based on template

SYNOPSIS

genspec [-h] [--version] -n MODULE [-t SPEC_TYPE] [-v VERSION]
[-s SUMMARY] [-l LICENSE] [-u URL] [-d DESCRIPTION]
[-c LASTCHANGE] [-o OWNER] [-f] [--check] [--no-check]
[--verbose] [--here] [--tag TAG] [--git] [--test ORIGINAL]
[--date DATE]

DESCRIPTION

This program generates RPM spec file based on templates for types of RPM packages. Spec and gear rules will be put in created subdirectory or in current directory if it is named as package name.

OPTIONS

-h, --help
show this help message and exit
--version
show program's version number and exit
-n MODULE
Package or module name
-t SPEC_TYPE
Package type
-v VERSION
Package version
-s SUMMARY
Package summary
-l LICENSE
Package license
-u URL
Package upstream URL
-d DESCRIPTION
Package description
-c LASTCHANGE
Package changelog
-o OWNER
Github repository owner
-f, --force
Overwrite directory or spec and .gear if already exists
--check
Treat all failures when executing external programs as errors
--no-check
Skip all failures when executing external programs
--verbose
Show output of executed programs
--here
Create spec in current directory
--tag TAG
Git tag (uses in .gear/rules)
--git
Git clone from url, clear repo and configure remotes update
--test ORIGINAL
Run in test mode to compare result with original dir
--date DATE
Pass date to changelog in format YYYY-MM-DD

TEMPLATES

Template is simple text file with substitutions as described in PEP 292. But instead of the normal "%"-based substitutions, these templates support "$"-based substitutions.

Supported templates:

java-maven for Java package using Maven for build
python for Python module
ruby for Ruby module or gem
golang for Go language module

See also: http://www.altlinux.org/Category:SampleSpecs

Supported environment variables:

GENSPEC_TEMPLATES
Path to spec templates (default /usr/share/spectemplates/)
GENSPEC_PACKAGER
Packager name (default from `rpm --eval '%{packager}'`)

EXAMPLES

genspec \
-t ruby \
-n gson \
-v 0.6.1 \
-s 'Ruby wrapper for google-gson library' \
-l ASL \
-u 'https://github.com/avsej/gson.rb' \
-c '- Initial build for ALT Linux' \
-d 'Ruby wrapper for google-gson library.'

AUTHOR

Andrey Cherepanov <cas@altlinux.org>

COPYRIGHT

Copyright © 2014-2018 Andrey Cherepanov <cas@altlinux.org>
Copyright © 2017-2018 Mikhail Gordeev <obirvalger@altlinux.org>

This program is free software; you can redistribute it and/or modify it under the terms of GNU General Public License (GPL) version 3 or later.

November 16, 2018 version 1.3.3