Skip to content

Commit

Permalink
New: intial packaging
Browse files Browse the repository at this point in the history
Signed-off-by: Miroslav Safr <Miroslav.Safr@gmail.com>
  • Loading branch information
safrm committed Jun 11, 2014
1 parent 81bda10 commit b4b4c76
Show file tree
Hide file tree
Showing 11 changed files with 233 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
*.changes
rpm/
1 change: 1 addition & 0 deletions debian/compat
@@ -0,0 +1 @@
7
16 changes: 16 additions & 0 deletions debian/control
@@ -0,0 +1,16 @@
Source: rvmb
Section: utils
Priority: optional
Maintainer: Miroslav Safr <miroslav.safr@gmail.com>
Build-Depends: debhelper (>= 5), appver, jenkins-support-scripts (>=1.2.3)
Standards-Version: 3.8.1
Homepage: http://safrm.net/projects/rvmb

Package: rvmb
Architecture: all
Depends: qemu-system-x86, qemu-utils, kvm, ${misc:Depends}, ${launcher:Depends}, ${shlibs:Depends}
Description: Rapid VM builder for qemu-kvm based portable VMs \




9 changes: 9 additions & 0 deletions debian/copyright
@@ -0,0 +1,9 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: rvmb
Upstream-Contact: Miroslav Safr <Miroslav.Safr@gmail.com>
Source: http://safrm.net/projects/rvmb
Copyright: Copyright 2010 Miroslav Safr <Miroslav.Safr@gmail.com>
License: LGPL-2.1

On Debian systems the full text of the GNU LGPL v2.1 can be found
in the `/usr/share/common-licenses/LGPL-2.1' file.
12 changes: 12 additions & 0 deletions debian/rules
@@ -0,0 +1,12 @@
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
DEB_VERBOSE_ALL=yes
export DH_VERBOSE=1

%:
dh $@

override_dh_auto_build:
jss-docs-update ./doc -sv $(DEB_VERSION_UPSTREAM)
dh_auto_build

2 changes: 2 additions & 0 deletions debian/rvmb.dirs
@@ -0,0 +1,2 @@
/usr/share/rvmb/targets

3 changes: 3 additions & 0 deletions debian/rvmb.install
@@ -0,0 +1,3 @@
rvmb /usr/bin/
targets/* /usr/share/rvmb/targets
doc/manpages/rvmb.1 /usr/share/man/man1
1 change: 1 addition & 0 deletions debian/source/format
@@ -0,0 +1 @@
3.0 (native)
33 changes: 33 additions & 0 deletions doc/htmlpages/rvmb.html
@@ -0,0 +1,33 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>rvmb</title><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" title="rvmb"><a name="rvmb.1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>rvmb &#8212; Rapid VM builder for qemu-kvm based portable VMs</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">rvmb [COMMAND] [OPTIONS]...</code> [-h --help] [-v --verbose] [-d --debug] [-t --target &lt;conf-file&gt;] [-c --clone &lt;number&gt;] [-m --memory &lt;kB&gt;] [-V --version]</p></div></div><div class="refsect1" title="DESCRIPTION"><a name="idp1860976"></a><h2>DESCRIPTION</h2><p>
Rapid VM builder for qemu-kvm based portable VMs. As a working directory is taked current dir.
</p></div><div class="refsect1" title="COMMAND"><a name="idp1538184"></a><h2>COMMAND</h2><p>
Specify step execution:
list-targets
prepare-host create-disk download-iso install-base customize-image
run-vm connect-ssh connect-xrdp
</p><p>
If not specified usign automatic detection:
empty=install,
image installed=run-vm
running=connect-ssh
</p></div><div class="refsect1" title="OPTIONS"><a name="idp1817800"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">-h --help</span></dt><dd><p>
Print help text to the screen.
</p></dd><dt><span class="term">-v --verbosee</span></dt><dd><p>
Prints more output.
</p></dd><dt><span class="term">--d --debug</span></dt><dd><p>
Prints also debug output.
</p></dd><dt><span class="term">-t --target &lt;conf-file&gt;</span></dt><dd><p>
Select target config file. It can be a full path to the file or name of the file in targets dir (list-targets).
</p></dd><dt><span class="term">-c --clone &lt;number&gt;</span></dt><dd><p>
Cloning increment number (adds postfix, increases ports etc.). so there can be created more VMs from one configuration file.
</p></dd><dt><span class="term">-m --memory &lt;kB&gt;</span></dt><dd><p>
Uses specific VM memory amount (in kB).
</p></dd><dt><span class="term">-V --version</span></dt><dd><p>
Prints version of the scripts.
</p></dd></dl></div></div><div class="refsect1" title="SEE ALSO"><a name="idp204840"></a><h2>SEE ALSO</h2><p>
<a class="ulink" href="http://safrm.net/projects/rvmb" target="_top">http://safrm.net/projects/rvmb</a>
</p></div><div class="refsect1" title="AUTHOR"><a name="idp205600"></a><h2>AUTHOR</h2><p>
Miroslav &#352;afr &lt;miroslav.safr@gmail.com&gt;
</p></div><div class="refsect1" title="LICENSE"><a name="idp206312"></a><h2>LICENSE</h2><p>
LGPL2
</p></div></div></body></html>
94 changes: 94 additions & 0 deletions doc/manpages/rvmb.1
@@ -0,0 +1,94 @@
'\" t
.\" Title: rvmb
.\" Author: Miroslav Safr <miroslav.safr@gmail.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 20140611_1602
.\" Manual: Rapid VM builder for qemu-kvm based portable VMs
.\" Source: rvmb
.\" Language: English
.\"
.TH "RVMB" "1" "20140611_1602" "rvmb" "Rapid VM builder for qemu-kvm"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
rvmb \- Rapid VM builder for qemu\-kvm based portable VMs
.SH "SYNOPSIS"
.HP \w'\fBrvmb\ [COMMAND]\ [OPTIONS]\&.\&.\&.\fR\ 'u
\fBrvmb [COMMAND] [OPTIONS]\&.\&.\&.\fR [\-h\ \-\-help] [\-v\ \-\-verbose] [\-d\ \-\-debug] [\-t\ \-\-target\ <conf\-file>] [\-c\ \-\-clone\ <number>] [\-m\ \-\-memory\ <kB>] [\-V\ \-\-version]
.SH "DESCRIPTION"
.PP
Rapid VM builder for qemu\-kvm based portable VMs\&. As a working directory is taked current dir\&.
.SH "COMMAND"
.PP
Specify step execution: list\-targets prepare\-host create\-disk download\-iso install\-base customize\-image run\-vm connect\-ssh connect\-xrdp
.PP
If not specified usign automatic detection: empty=install, image installed=run\-vm running=connect\-ssh
.SH "OPTIONS"
.PP
\-h \-\-help
.RS 4
Print help text to the screen\&.
.RE
.PP
\-v \-\-verbosee
.RS 4
Prints more output\&.
.RE
.PP
\-\-d \-\-debug
.RS 4
Prints also debug output\&.
.RE
.PP
\-t \-\-target <conf\-file>
.RS 4
Select target config file\&. It can be a full path to the file or name of the file in targets dir (list\-targets)\&.
.RE
.PP
\-c \-\-clone <number>
.RS 4
Cloning increment number (adds postfix, increases ports etc\&.)\&. so there can be created more VMs from one configuration file\&.
.RE
.PP
\-m \-\-memory <kB>
.RS 4
Uses specific VM memory amount (in kB)\&.
.RE
.PP
\-V \-\-version
.RS 4
Prints version of the scripts\&.
.RE
.SH "SEE ALSO"
.PP

\m[blue]\fB\%http://safrm.net/projects/rvmb\fR\m[]
.SH "AUTHOR"
.PP
Miroslav Šafr <miroslav\&.safr@gmail\&.com>
.SH "LICENSE"
.PP
LGPL2
.SH "AUTHOR"
.PP
\fBMiroslav Safr\fR <\&miroslav\&.safr@gmail\&.com\&>
.RS 4
Author and maintainer
.RE
60 changes: 60 additions & 0 deletions rvmb.spec
@@ -0,0 +1,60 @@
%define APP_BUILD_DATE %(date +'%%Y%%m%%d_%%H%%M')

Name: rvmb
Summary: Rapid VM builder for qemu-kvm based portable VMs
Version: 1.0.0
Release: 1
Group: Development/Tools
License: LGPL v2.1
BuildArch: noarch
URL: http://safrm.net/projects/rvmb
Vendor: Miroslav Safr <miroslav.safr@gmail.com>
Source0: %{name}-%{version}.tar.bz2
Autoreq: on
Autoreqprov: on
BuildRequires: appver >= 1.1.1
BuildRequires: jenkins-support-scripts >= 1.2.4

%description
Rapid VM builder for qemu-kvm based portable VMs

%prep
%setup -c -n ./%{name}-%{version}

%build
jss-docs-update ./doc -sv %{version}

%install
rm -fr %{buildroot}
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/rvmb/targets
install -m 755 ./rvmb %{buildroot}%{_bindir}
sed -i".bkp" "1,/^VERSION=/s/^VERSION=.*/VERSION=%{version}/" %{buildroot}%{_bindir}/rvmb && rm -f %{buildroot}%{_bindir}/rvmb.bkp
sed -i".bkp" "1,/^VERSION_DATE=/s/^VERSION_DATE=.*/VERSION_DATE=%{APP_BUILD_DATE}/" %{buildroot}%{_bindir}/rvmb && rm -f %{buildroot}%{_bindir}/rvmb.bkp
TARGETS=`find ./targets -type f`
install -m 755 $TARGETS %{buildroot}%{_datadir}/rvmb/targets

mkdir -p %{buildroot}%{_mandir}/man1
install -m 644 ./doc/manpages/rvmb.1* %{buildroot}%{_mandir}/man1/

%clean
rm -fr %{buildroot}

%check
for TEST in $( grep -r -l -h "#\!/bin/sh" . )
do
sh -n "$TEST"
if [ $? != 0 ]; then
echo "syntax error in $TEST, exiting.."
exit 1
fi
done

%files
%defattr(-,root,root,-)
%{_bindir}/rvmb
%dir %{_datadir}/rvmb/targets
%{_datadir}/rvmb/targets/*

%{_mandir}/man1/rvmb.1*

0 comments on commit b4b4c76

Please sign in to comment.