.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "GEM2DEB 1" .TH GEM2DEB 1 2024-04-08 "" "" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME gem2deb \- converts Rubygems' .gem file into Debian package .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fBgem2deb\fR [\fIOPTIONS\fR] \fIGEMNAME\fR (to download the gem with \fIgem fetch\fR) .PP \&\fBgem2deb\fR [\fIOPTIONS\fR] \fIGEMFILE\fR (to use a local .gem file) .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBgem2deb\fR converts the gem into a Debian source package, and then will attempt to build it. The process is made of several steps. .PP First, \fBgem2deb\fR converts the gem file to a tar.gz archive containing a metadata.yml file with the Gem specification. This is equivalent to what \&\fBgem2tgz\fR does. .PP Then, \fBgem2deb\fR unpacks the tar.gz archive and prepares a Debian source package, guess many of the defaults from the files included in the archive, or the Gem specification. This is equivalent to what \fBdh-make-ruby\fR does. \&\fBgem2deb\fR cannot determine all parameters for obvious reasons. It is recommended to search for the "FIXME" string in the \fIdebian/\fR directory. The generated Debian source package uses \fBdh_ruby\fR to build the package. .PP Finally, \fBgem2deb\fR tries to build the source and binary packages using \&\fBdpkg-buildpackage\fR. .SH OPTIONS .IX Header "OPTIONS" .IP "\fB\-t\fR, \fB\-\-only\-tarball\fR" 4 .IX Item "-t, --only-tarball" Stop after creating the tar.gz archive. .IP "\fB\-s\fR, \fB\-\-only\-source\-dir\fR" 4 .IX Item "-s, --only-source-dir" Stop after preparing the Debian source package directory (do not attempt to build the package). .IP "\fB\-S\fR, \fB\-\-only\-debian\-source\fR" 4 .IX Item "-S, --only-debian-source" Only build a Debian source package (do not build binary packages). .IP "\fB\-d\fR, \fB\-\-no\-check\-builddeps\fR" 4 .IX Item "-d, --no-check-builddeps" Do not check build dependencies when building the package. Equivalent to the options with the same in \fBdpkg\-buildpackage\|(1)\fR. .IP "\fB\-p PACKAGE\fR, \fB\-\-package PACKAGE\fR" 4 .IX Item "-p PACKAGE, --package PACKAGE" Specify package name (default: ruby\-*). Passed to dh-make-ruby. See \fBdh\-make\-ruby\|(1)\fR. .IP "\fB\-g\fR, \fB\-\-git\fR" 4 .IX Item "-g, --git" Import the resulting source package, if any, to a git repository under the current directory. The git repository will be named after the source package (i.e. it is influenced by \fB\-\-package\fR). .Sp Note that \fB\-\-only\-tarball\fR or \fB\-\-only\-source\-dir\fR will prevent this, since they make \fBgem2deb\fR stop early. .Sp The import uses \fBgbp import-dsc \-\-pristine\-tar\fR (see \fBgbp\-import\-dsc\|(1)\fR), and thus \fIgit-buildpackage\fR and \fBpristine-tar\fR need to be installed for this to work. .IP \fB\-\-purge\fR 4 .IX Item "--purge" After building the package, remove all files files that were produced by gem2deb. This includes source tarballs, Debian package artifacts (.dsc, .deb, \&.changes etc), and even the source directory. This is useful for example when used in conjunction with \fB\-\-git\fR. .IP \fB\-\-no\-wnpp\-check\fR 4 .IX Item "--no-wnpp-check" Prevents \fBdh-make-ruby\fR to check wnpp reports to get the number of a possible ITP (intend to package) bug report. By default, \fBdh-make-ruby\fR does check these reports, which requires an Internet access. .IP "\fB\-o\fR, \fB\-\-offline\fR" 4 .IX Item "-o, --offline" Prevents \fBdh-make-ruby\fR from accessing the internet at all. .IP "\fB\-h\fR, \fB\-\-help\fR" 4 .IX Item "-h, --help" Displays \fBgem2deb\fR usage information. .IP "\fB\-v\fR, \fB\-\-version\fR" 4 .IX Item "-v, --version" Displays \fBgem2deb\fR version information. .SH "HOW THE .GEM \-> .TGZ CONVERSION WORKS" .IX Header "HOW THE .GEM -> .TGZ CONVERSION WORKS" A gem named \fImygem\-0.1.0.gem\fR is converted in a tarball with (approximately) the following steps: .PP .Vb 9 \& mkdir mygem\-0.1.0 \& cd mygem\-0.1.0 \& tar xfm /absolute/path/to/mygem\-0.1.0.gem \& tar xzfm data.tar.gz \& zcat metadata.gz > metadata.yml \& rm \-f data.tar.gz metadata.gz \& cd .. \& tar czf mygem\-0.1.0.tar.gz mygem\-0.1.0 \& rm \-rf mygem\-0.1.0 .Ve .PP The generated tarball has the following properties: .IP Files 4 .IX Item "Files" It contains all the files the gem contains. .IP Metadata 4 .IX Item "Metadata" It contains the gem metadata in a file named ``metadata.yml`` inside the \fImygem\-0.1.0\fR directory. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBdh_ruby\fR(1) .SH "COPYRIGHT AND AUTHORS" .IX Header "COPYRIGHT AND AUTHORS" Copyright (c) 2011, Lucas Nussbaum .PP This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. .PP This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. .PP You should have received a copy of the GNU General Public License along with this program. If not, see .