spec2arch(1)

NAME
RPM SpecFile to Arch Linux PKGBUILD converter

SYNOPSIS
spec2arch RPMSpecFile PKGBUILDFile [options]

DESCRIPTION
spec2arch does a raw "convert" from a given .spec file to an Arch Linux PKGBUILD file. The resulting file will rarely be that perfect to use it straight ahead, and will at least need to be reviewed if not even corrected - but it will make it much easier to get started with it. For these corrections, you can specify to call the editor after the auto-create has been finished (default) - and additionally, namcap.py will be called to verify after that, if it's found in the $PATH. spec2arch will most probably fail with too complex .spec files. But for "easy packages", you may successfully use it in conjunction with pkgmake, and may even be as lucky again as to only maintain the one .spec file, but create packages for even one more distribution.

OPTIONS

RPMSpecFile
    This is the input file to read, which obviously has to be a RPM .spec file. The templates used for pkgmake will not work for obvious reasons: They contain placeholders instead of the real values...

PKGBUILDFile
    The output file to generate. It will most likely be named PKGBUILD, but this way you can provide the directory and name where to store it.

-b  Don't apply corrections to the build() block. Overwrites the DO_BUILD_REPLACE configuration parameter.

+b  Apply corrections to the build() block. Overwrites the DO_BUILD_REPLACE configuration parameter.

-e  Do not invoke the editor with the PKGBUILD file once it is created (overwrites EDIT_PKGBUILD setting)

+e  Invoke the editor with the PKGBUILD file once it is created (overwrites EDIT_PKGBUILD setting)

-n  Don't check the generated PKGBUILD file with namcap.py - even if the config says USE_NAMCAP=1 and namcap.py is found in the $PATH

+n  Check the generated PKGBUILD file with namcap.py - even if the config says USE_NAMCAP=0. Does only have effect if namcap.py can be found in the $PATH

-o  Don't overwrite target if exists (overwrites config setting OVERWRITE_TARGET)

+o  Overwrite target if exists (overwrites config setting OVERWRITE_TARGET)

-w  Do not put the warning in the PKGBUILD file (overwrites config setting USE_WARNING)

+w  Put the warning in the PKGBUILD file (overwrites config setting USE_WARNING)

--baseurl <baseurl>
    Set SRC_BASEURL to <baseurl> (overwrites config setting SRC_BASEURL)

--editor <editor>
    Define the editor to use to edit the created PKGBUILD file for manual control (overwrites the EDITOR config setting)

--md5of <filespec>
    Calculate md5sums of the given file(s). If you need to specify multiple files, you must separate them by colons (e.g. "file1.ext:file2.ext").

EXAMPLES
# Simple call - use settings from the config only
spec2arch sample.spec /usr/local/src/sample/PKGBUILD # Same as above, but overwrite existing output and skip build()
spec2arch sample.spec /usr/local/src/sample/PKGBUILD +o -b # Same as first, but put no warning and use vi to edit PKGBUILD file
spec2arch sample.spec /usr/local/src/sample/PKGBUILD -w --editor vi

CONFIGURATION
Not that much to configure - for now it's just one line at the top of the script itself, where you may configure the URL path for the source tarball.

FILES
/usr/bin/spec2arch

SEE ALSO

spec2arch.conf(5)

AUTHOR

This manual page was written by Andreas Itzchak Rehberg (devel@izzysoft.de), the author of the program. Credit should be given also to Daenyth <Daenyth+Arch AT gmail DOT com> who added a lot concerning the Arch Linux specials - so if you are using Arch Linux, you may also want to have a look at his pkgtools:
    https://aur.archlinux.org/packages/pkgtools/
    https://aur.archlinux.org/packages/pkgtools-git/ which may already ship with a copy of this script. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2. More information may be found on the authors website, http://www.izzysoft.de/