compared with
Current by Asger Askov Blekinge
on Apr 23, 2012 14:12.

This line was removed.
This word was removed. This word was added.
This line was added.

Changes (71)

View Page History
Then we come to the <build> section. The first thing to do, is to enable filtering on the resources. This is done such
<resources> <filtering>true</filtering>
<resource> <directory>src/main/resources</directory>
The effect of this is that you can use $\{\}

In the manifest, I declare the main class, and the classpath. Notice that I declare the classpathPrefix to be the maven.deb.libfolder, in order for the system to be able to resolve the dependencies when installed as a debian package.

This plugin uses the deb assembly. So, what will the deb.assembly do? Lets look at it.&nbsp;
Note that it is important that this plugin is placed below the assembly plugin, as they both execute in the package phase, and jdeb depends on the debian assembly having been run.
Description: ${maven.deb.description}
{code}Now we should generate the deb, to check that what we have done so far works. Run mvn package.

Now we should generate the deb, to check that what we have done so far works. Run mvn package.

Then we should check the deb. CD to the target directory, and use the lintian tool (lintian \*.deb). Install it if you do not have it (sudo apt-get install lintian)

Files: *
Copyright (C) 2012 by State and University Library, Denmark
License: Apache-2.0 ${maven.deb.license}
{code}Now the jdeb plugin needs to be told to include this file. Add the following section to the plugin's list of datasets
{code}mvn clean package to generate the package once more, and lintian it again. The error should now be
{code}E: dk.statsbiblioteket.scape.arc-unpacker: changelog-file-missing-in-native-package{code}
Okay, so we need to make a changelog file for debian.&nbsp;

Here is some sample content for at changelog file, that we can use&nbsp;
{code}${} (0.8.10) (0.3) unstable; urgency=low
 * Added the maven repository, so we can build without local caches.
 * Added the debian package functionality

* Minor bugfix releases:
 -- Asger Askov Blekinge <[email protected]> Mon, 23 Apr 2011 15:00:00 +0100

o manual page confused --dbname and --dbsystem (Closes: #573235)
${} (0.2) unstable; urgency=low
  * Added the command line interface
  * Added the min/max response code restriction
  * Added the multiple naming of extracted resources

o applied patch by Warren Thompson to use the registered default
currency rather than a hard-code 'USD'
 -- Asger Askov Blekinge <[email protected]> Fri, 2 Dec 2011 17:34:00 +0100

* debian/control: Standards-Version: increased to 3.8.4
* debian/source/format: Added with "3.0 (native)"
* debian/rules: Updated Perl invocation
${} (0.1) unstable; urgency=low
  * Updated maven structure for better git support
  * Stuff actually works
  * First release

-- Dirk Eddelbuettel <[email protected]> Sun, 13 Jun 2010 17:24:30 -0500

${} (0.8.9) unstable; urgency=low

* Minor bugfix releases:

o DateCalc() now requires an error code variable, so supply one

o finally release the OandA fx code (Closes: #532743)

* debian/control: Standards-Version: increased to 3.8.3

* debian/copyright: Updated to newer format

-- Dirk Eddelbuettel <[email protected]> Tue, 22 Dec 2009 20:13:59 -0600
 -- Asger Askov Blekinge <[email protected]> Mon, 30 Nov 2011 15:21:00 +0100
{code}Put this content in "resources/debian/changelog/changelog

{code}So, after this change, the deb package should validate. But we have forgotten something. The most important thing, actually. The executable file.

{code}Regenerate and validate the deb file. You should now receive the following warning:
{code}W: dk.statsbiblioteket.scape.arc-unpacker: binary-without-manpage usr/bin/arc-unpack{code}So, we need to add man pages to the project.&nbsp;

Create the file "arc-unpack.8" in resources/man/man8, and give it this content:
{code:language=none|title=sample stolen manpage}.TH arc-unpack 8 "September 10, 2003" "version 0.3" "USER COMMANDS"
{code:language=none|title=sample manpage}.TH arc-unpack 8  "April 23, 2012" "version ${project.version}" "USER COMMANDS"
cdspeed \- decrease the speed of you cdrom to get faster access time
arc-unpack \- ${maven.deb.description}
.B cdspeed arc-unpack
[\-h] [\-d device] \-s speed
\-f dataFile [\-o outputDir] [\-minResp number] [\-maxResp number] [\-naming [MD5,OFFSET,URL]]
Modern cdrom drives are too fast. It can take several seconds
on a 60x speed cdrom drive to spin it up and read data from
the drive. The result is that these drives are just a lot slower
than a 8x or 24x drive. This is especially true if you are only
occasionally (e.g every 5 seconds) reading a small file. This
utility limits the speed and makes the drive more responsive
when accessing small files.
.PP ${maven.deb.extendedDescription}
cdspeed makes the drive also less noisy and is very useful if
you want to listen to music on your computer.
display a short help text
\-f dataFile
Data file to extract. Can be an arc or warc file, and can be compressed.
use the given device instead of /dev/cdrom
\-o outputDir
extracts the resources to this dir. Defaults to the current dir.
set the speed. The argument is a integer. Zero means restore maximum
\-minResp number
Ignore resources, if the http return code is lower than minResp. Useful to filter out returns below the 200 range
Set the maximum speed to 8 speed cdrom:
.B cdspeed
\-s 8
\-maxResp number
Ignore resources, if the http return code is higher than maxResp. Useful to filter out returns above the 200 range
Restore maximum speed:
.B cdspeed
\-s 0
\-naming [MD5,OFFSET,URL]
Naming scheme for the extracted resources. Each resource in the archive is identified by an URL, but URLs do not map
neatly to filenames.
The URL scheme tries to map the resource urls to files, but can fail.
The OFFSET scheme uses offsets into the arc file as filenames
The MD5 scheme md5hash the resource URLs to ensure valid unique filenames
cdspeed returns a zero exist status if it succeeds to change to set the
maximum speed of the cdrom drive. Non zero is returned in case of failure.
arc-unpack returns zero if the extraction succeeded
Guido Socher (guido (at)
eject(1){code} ${maven.deb.maintainer}
It is important that the file starts with ".TH arc-unpack 8" but the rest seems optional

{code}Clean, regenerate and validate the package.

{code}The package should now be complete and validate. Lets try to install it.

The package should install without a problem. Play around, and try "man arc-unpacker" to see the manpage work