jdeb/ 0000755 0001750 0001750 00000000000 12210355254 011641 5 ustar moeller moeller jdeb/.gitignore 0000644 0001750 0001750 00000000163 12207644255 013641 0 ustar moeller moeller .DS_Store
.classpath
.project
.settings
target
eclipse
dependency-reduced-pom.xml
*.iml
*.iws
*.ipr
/.idea
.release jdeb/.travis.yml 0000644 0001750 0001750 00000000114 12207644255 013756 0 ustar moeller moeller language: java
jdk:
- oraclejdk7
- oraclejdk6
- openjdk7
- openjdk6
jdeb/HISTORY.md 0000644 0001750 0001750 00000011323 12207644255 013334 0 ustar moeller moeller ## Version 1.1, released ?
* [ADD] xz compression support
* [ADD] Added link support to the Ant task
* [ADD] Support permission in (hard) link setup
* [FIX] On Windows, parent directories are now created automatically when adding files to the data archive
* [CHG] Links are now symbolic by default
## Version 1.0.1, released 28.02.2013
* [ADD] Override version via environment variable DEBVERSION
* [FIX] Use the joint copyright
* [FIX] Fixed the maven to debian version mapping
## Version 1.0, released 10.01.2013
* [ADD] Support for symbolic links (Maven only)
* [FIX] Unresolved variables in package maintainer scripts no longer break the build
* [CHG] Use "_all" as architecture postfix by default
## Version 0.11, released 14.07.2012
* [ADD] Added "timestamped" maven config to turn "SNAPSHOT" into a timestamp
* [ADD] Added "verbose" maven config option to show/hide INFO logs
* [ADD] Expand variables in configuration files "conffiles", "preinst", "postinst", "prerm", "postrm"
* [ADD] Added a "template" data type to create dirs
* [ADD] Added "missingSrc" maven config to control behavior on missing files/folders
* [CHG] Use "~" instead of "+" when converting from a SNAPSHOT version
* [REM] Deprecated PrefixMapper was removed (use PermMapper instead)
## Version 0.10, released 18.02.2012
Polishing and regression fixes
* [FIX] Don't throw exception when detecting zip archives
* [FIX] Make sure to close the tar output stream
* [CHG] Have warn/info level on messages
* [CHG] Fix line endings for control files
* [ADD] Access to all Maven variables
## Version 0.9, released 17.12.2011
Some smaller fixes, Support for the 1.8 format, Changes support working.
* [FIX] Default path for changes file with Maven
* [FIX] Unresolved variables are now treated as null
* [CHG] "Changes" support version 1.8
* [CHG] Warn if control files have non-unix line endings
* [CHG] Throw an exception for unknown mappers
* [REM] InvalidDescriptorException, wasn't really used anyway
* [ADD] Added an "attach" attribute to specify whether maven artifact should be attached to project.
* [ADD] Provide SHA1, SHA256 and not just MD5 for descriptors
* [ADD] Provide "project.version" when using maven
## Version 0.8, released 27.06.2010
Lot of refactoring and support for configuration on the maven plugin. Easier permission mapping.
* [CHG] Default maven artifact type is now "deb" instead of "deb-archive".
* [CHG] Switched to commons compress for archive building.
* [CHG] Renamed the maven goal from "deb" to "jdeb" to be more consistent.
* [CHG] Maven goal no longer attached to execution phase by default. (see examples)
* [CHG] Deprecated "FileSetDataProducer" in favor of "DataProducerFileSet"
* [ADD] Added a "type" attribute to the "data" elements.
* [ADD] New options to the maven plugin to configure the attached artifact.
* [ADD] Added Examples for ant and maven.
* [ADD] New "file" data source.
## Version 0.7, released 18.08.2008
Proper closing of streams!
Many improvements on the Ant task.
Quite a few fixes related to locale settings.
Support for bzip2 and more descriptor keys.
* [FIX] English locale for date format.
* [FIX] Proper installation size to be kbytes instead of bytes.
* [FIX] Close streams properly.
* [CHG] The Ant task now breaks on errors.
* [ADD] Support for bzip2 compression in data element of the Ant task.
* [ADD] Compression attribute to specify data file compression (bzip2, gzip, none).
* [ADD] More package descriptor keys (Pre-Depends, Recommends, Suggests, Breaks, Enhances, Homepage>).
* [ADD] Verbose attribute for the Ant task.
* [ADD] The Ant task now accepts tarfileset elements.
## Version 0.6, released 11.01.2008
* [FIX] Fixed the trailing linefeed in the 'changes' section of the changes file.
## Version 0.5, released 26.11.2007
* [FIX] Fixed the 'ls' parsing.
* [CHG] Switched to ArInputStream/ArOutputStream.
* [REM] Removed deprecated ant task delegate.
* [ADD] Added "changesSave" attribute to save release information to. No longer saving those information to "changesIn".
## Version 0.4, released 20.09.2007
* [FIX] Fixed mapper support.
* [CHG] Changed lookup from environment (DEBEMAIL, DEBFULLNAME) to overrule the descriptor.
* [REM] Removed deprecated prefix/strip syntax.
* [ADD] Added support for multiple mappers.
* [ADD] Added more fields to the package descriptor.
## Version 0.3, released 15.09.2007
* [ADD] Added maintainer lookup from environment (DEBEMAIL, DEBFULLNAME).
* [ADD] Added plugin implementation for maven.
* [ADD] Added stricter descriptor validation.
## Version 0.2, released 21.08.2007
* [FIX] Fixed the delete of the temporary files.
* [ADD] Added support for signed changes files.
* [ADD] Added support for mapping ownerships and rights.
## Version 0.1, released 19.02.2007
Initial release.
jdeb/LICENSE.txt 0000644 0001750 0001750 00000026135 12207644255 013503 0 ustar moeller moeller Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
jdeb/NOTICE.md 0000644 0001750 0001750 00000000245 12207644255 013155 0 ustar moeller moeller The jdeb project is under a joint copyright of the developers listed in the pom.xml file.
Thanks to all the contributors listed for their patches and contributions.
jdeb/README.md 0000644 0001750 0001750 00000003146 12207644255 013134 0 ustar moeller moeller [](http://travis-ci.org/tcurdt/jdeb)
# Debian packages in Java
This library provides an Ant task and a Maven plugin to create Debian packages
from Java builds in a truly cross platform manner. Build your Debian packages
on any platform that has Java support. Windows, Linux, OS X - it doesn't require
additional native tools installed. The API underneath is well abstracted and
can easily be adopted for other areas as well.
Check the documentation on how to use it with [Maven](http://github.com/tcurdt/jdeb/blob/master/docs/maven.md)
or [Ant](http://github.com/tcurdt/jdeb/blob/master/docs/ant.md). Especially don't forget to check out the
[examples](http://github.com/tcurdt/jdeb/blob/master/src/examples/). Current
[javadocs](http://tcurdt.github.com/jdeb/release/1.0.1/apidocs/) and a source
[xref](http://tcurdt.github.com/jdeb/release/1.0.1/xref/) is also available.
## Where to get it
The jars are available in the [Maven central repository](http://repo1.maven.org/maven2/org/vafer/jdeb/).
The source releases you can get in the [download section](http://github.com/tcurdt/jdeb/downloads).
If feel adventures or want to help out feel free to get the latest code
[via git](http://github.com/tcurdt/jdeb/tree/master).
git clone git://github.com/tcurdt/jdeb.git
## Related projects
Some links to other cross platform tools to package Linux applications:
* [ant-deb-task](http://code.google.com/p/ant-deb-task)
* [jRPM](http://jrpm.sourceforge.net)
* [RedLine](http://www.freecompany.org/redline)
* [Install-Toolkit](http://install-toolkit.sourceforge.net)
jdeb/TODO.md 0000644 0001750 0001750 00000000060 12207644255 012734 0 ustar moeller moeller please see https://github.com/tcurdt/jdeb/issues jdeb/contrib/ 0000755 0001750 0001750 00000000000 12207644255 013311 5 ustar moeller moeller jdeb/contrib/eclipse-formatting-profile.xml 0000644 0001750 0001750 00000072511 12207644255 021273 0 ustar moeller moeller
jdeb/contrib/maven_scanpackages.sh 0000644 0001750 0001750 00000006565 12207644255 017472 0 ustar moeller moeller #!/bin/bash
###############################################################################
#
# Update debian repository indexes.
#
# It actually makes maven repositories expose a debian index.
#
# It also create a "virtual" stable debian repository in which is selected only
# stable releases (filter milestonnes and release candidates).
#
# Requirements:
# * This script is based on dpkg-scanpackages. It is provided by dpkg-dev package.
# * The script expect to find (configurable)
# ** a "releases" folder containing a maven repository with the deployed
# releases
# ** a "snapshots" folder containing a maven repository with the deployed
# snaphots
# ** make sure the "stable" folder exists if you want a filtered stable debian
# repository
#
# Setup:
# You need to set the $ROOT_REP variable to where your maven repositories are
# located.
#
###############################################################################
ROOT_REP=/home/maven/public_html
SNAPSHOTS_REP="snapshots"
RELEASES_REP="releases"
STABLE_REP="stable"
cd "$ROOT_REP"
## snapshots
if [ -d $SNAPSHOTS_REP ]; then
echo "Generates snapshots index"
dpkg-scanpackages -m $SNAPSHOTS_REP /dev/null > $SNAPSHOTS_REP/Packages.tmp && mv -f $SNAPSHOTS_REP/Packages.tmp $SNAPSHOTS_REP/Packages
gzip -9c $SNAPSHOTS_REP/Packages > $SNAPSHOTS_REP/Packages.gz.tmp && mv -f $SNAPSHOTS_REP/Packages.gz.tmp $SNAPSHOTS_REP/Packages.gz
rm -rf $SNAPSHOTS_REP/Release $SNAPSHOTS_REP/Release.gpg
apt-ftparchive -c=$SNAPSHOTS_REP/Release.conf release $SNAPSHOTS_REP > $SNAPSHOTS_REP/Release
gpg -abs --default-key 0398E391 -o $SNAPSHOTS_REP/Release.gpg $SNAPSHOTS_REP/Release
fi
## releases
if [ -d $RELEASES_REP ]; then
echo "Generates releases index"
dpkg-scanpackages -m $RELEASES_REP /dev/null > $RELEASES_REP/Packages.tmp && mv -f $RELEASES_REP/Packages.tmp $RELEASES_REP/Packages
gzip -9c $RELEASES_REP/Packages > $RELEASES_REP/Packages.gz.tmp && mv -f $RELEASES_REP/Packages.gz.tmp $RELEASES_REP/Packages.gz
rm -rf $RELEASES_REP/Release $RELEASES_REP/Release.gpg
apt-ftparchive -c=$RELEASES_REP/Release.conf release $RELEASES_REP > $RELEASES_REP/Release
gpg -abs --default-key 0398E391 -o $RELEASES_REP/Release.gpg $RELEASES_REP/Release
fi
## stable
if [ -d stable ]; then
echo "Generates stable index"
rm -rf /tmp/stable_scanpackages
mkdir -p /tmp/stable_scanpackages/$RELEASES_REP
function link_package ()
{
basepath=`dirname $1`
basepath=${basepath##$ROOT_REP/}
basepath=${basepath%*/}
mkdir -p $basepath
fullpath=`readlink -f $1`
ln -sf $fullpath "/tmp/stable_scanpackages/$basepath"
}
cd /tmp/stable_scanpackages/
for i in $(find "$ROOT_REP/$RELEASES_REP" -name "*.[0-9][0-9].deb" ) ; do
link_package $i
done
for i in $(find "$ROOT_REP/$RELEASES_REP" -name "*.[0-9].deb" ) ; do
link_package $i
done
dpkg-scanpackages -m $RELEASES_REP /dev/null > "$ROOT_REP/$STABLE_REP/Packages.tmp" && mv -f "$ROOT_REP/$STABLE_REP/Packages.tmp" "$ROOT_REP/$STABLE_REP/Packages"
gzip -9c "$ROOT_REP/$STABLE_REP/Packages" > "$ROOT_REP/$STABLE_REP/Packages.gz.tmp" && mv -f "$ROOT_REP/$STABLE_REP/Packages.gz.tmp" "$ROOT_REP/$STABLE_REP/Packages.gz"
cd "$ROOT_REP"
rm -rf $STABLE_REP/Release $STABLE_REP/Release.gpg
apt-ftparchive -c=$STABLE_REP/Release.conf release $STABLE_REP > $STABLE_REP/Release
gpg -abs --default-key 0398E391 -o $STABLE_REP/Release.gpg $STABLE_REP/Release
fi
jdeb/docs/ 0000755 0001750 0001750 00000000000 12207644255 012601 5 ustar moeller moeller jdeb/docs/ant.md 0000644 0001750 0001750 00000015777 12207644255 013726 0 ustar moeller moeller # How to use jdeb with Ant
Attribute | Description | Required
------------- | ---------------------------------------------------------------------------- | --------------------------
destfile | The debian package to be generated | Yes
control | The directory containing the control files | Yes
compression | Compression method for the data file (`gzip`, `bzip2`, `xz` or `none`) | No; defaults to `gzip`
verbose | Print detailed info during the package generation | No; defaults to `false`
keyring | The file containing the PGP keys | No
key | The name of the key to be used in the keyring | No
passphrase | The passphrase to use the key | No
changesIn | The changes to add | No
changesOut | The changes file generated | No
changesSave | The merged changes file | No
The jdeb Ant task can package up a directory as Debian package. You have to
provide the control files defining meta information about the package (except
the `md5sums` which gets created automatically). It creates the archive
and if you want even a signed changes file.
```xml
```
For cross platform builds it might be important to retain permissions,
ownerships and links. When you provide the original tar as input the meta data
will be kept intact gets included directly into the deb. You can apply simple
modifications like prefixing or stripping of paths though.
```xml
```
For more complex permission and ownership adjustments you can use a "ls"
mapper. It allows you to define permissions and ownerships in a text file and
even under Windows you will be able to build your debian package.
```xml
```
The mapper will apply the output of an "ls -laR > mapping.txt" command
that should look like this
./trunk/target/test-classes/org/vafer/dependency:
total 176
drwxr-xr-x 23 tcurdt tcurdt 782 Jun 25 03:48 .
drwxr-xr-x 3 tcurdt tcurdt 102 Jun 25 03:48 ..
-rw-r--r-- 1 tcurdt tcurdt 2934 Jun 25 03:48 DependenciesTestCase.class
-rw-r--r-- 1 tcurdt tcurdt 2176 Jun 25 03:48 WarTestCase.class
drwxr-xr-x 4 tcurdt tcurdt 136 Jun 25 03:48 classes
It's also possible to use a `fileset` or even a `tarfileset` to
specify the set of files to include with their permissions :
```xml
```
Links can be added by specifying a `link` element:
```xml
```
Here are the supported attributes on the `link` element:
Attribute | Description | Required
------------- | ------------------------------------------------------ | -----------------------
name | The path of the link | Yes
target | The target of the link | Yes
symbolic | The type of the link (`true`: symbolic, `false`: hard) | No; defaults to `true`
uid | Numerical uid | No; defaults to 0
gid | Numerical gid | No; defaults to 0
user | User name | No; defaults to "root"
group | User group | No; defaults to "root"
mode | Permissions as octet | No; deftauls to 777
## Changes file
In order to also create a changes file you will need to provide the input and
output of the changes. The input file is a much simpler file where you should
list your changes. Every change should be starting with the " * " and one line
only.
* changes for the next release
release distribution=staging, date=20:13 17.08.2007,version=1.4+r89114,urgency=low,by=Torsten Curdt
* debian changes support
When you do a release jdeb will add (or complete!) the release line and create
a debian format standard changes file for you. (Don't forget to commit changes
jdeb did to the file.) From Ant you have to call jdeb like this
```xml
```
If you also provide a `changesSave` attribute the jdeb will add release
information to the original input and write out the new file.
```xml
```
## Signing changes
To have the changes be signed, make sure you have the
[BouncyCastle OpenPGP/BCPG jar](http://www.bouncycastle.org/latest_releases.html) in your
classpath (just copy it into the `$ANT_HOME/lib` folder - next to jdeb).
Then you can sign your changes file with:
```xml
```
Security Note: Hard coding the passphrase in the `` task can be a serious
security hole. Consider using variable substitution and asking the passphrase
to the user with the `` task, or retrieving it from a secured `.properties` file.
jdeb/docs/maven.md 0000644 0001750 0001750 00000024673 12207644255 014245 0 ustar moeller moeller # How to use jdeb with Maven
Generating a default Debian package with maven is particular easy. Just add
the plugin to your POM like this
```xml
jdeborg.vafer1.0packagejdeb${project.build.directory}/${project.build.finalName}.jarfileperm/usr/share/jdeb/lib
```
At least the one main control file is required to control the creation of the
debian package. This required control file should be found in the control
directory. By default the control file name is also `control` which gives a
path of `src/deb/control/control` by default. This control file contains the
metadata about the Debian package. Usually it will look something along the lines of
Package: [[name]]
Version: [[version]]
Section: misc
Priority: optional
Architecture: all
Depends: jdk (>= 1.5)
Maintainer: Torsten Curdt
Description: jetty java servlet container
Distribution: development
If the environment variables `DEBEMAIL` and `DEBFULLNAME` are both set this
will overrule the `Maintainer` field set in there. The `Installed-Size` will
also be injected. If a changes file is used, the `Distribution` usually comes
from that file. The default changes file is called `CHANGES.txt`. See below
for the syntax of the content of the changes file.
Property replacement will also occur in any of the standard debian control
files: conffiles, preinst, postinst, prerm, postrm. This allows dynamic
configuration of the form:
/etc/[[artifactId]]/[[artifactId]].properties
/etc/[[artifactId]]/log4j.xml
If you now do a `mvn clean install`, the `deb` goal will be called and
artifacts consisting of the deb and potentially the changes file will
automatically be attached to the project.
The jdeb maven plugin also supports a variety of configuration options. These
configuration options provide the same features available in the jdeb ant
task. To configure the jdeb maven plugin, populate the jdeb configuration
section with any of the following options:
Element | Description | Required
------------- | ---------------------------------------------------------------------------- | -----------------------------------------------------------------
deb | The debian package to be generated | No; defaults to `${buildDirectory}/${artifactId}_${version}.deb`
type | Artifact type | No; defaults to `deb`
classifier | Artifact classifier | No; defaults to ''
controlDir | The directory containing the control files | No; defaults to `src/deb/control`
installDir | The default directory for the project artifact if no data section is present | No; defaults to `/opt/${artifactId}`
dataSet | A list of directories, tarballs, or files to include in the deb package | No; defaults to include your maven artifact
changesIn | The changes to add | No
changesOut | The changes file generated | No
changesSave | (NYI) The merged changes file | No
compression | (NYI) Compression method for the data file (`gzip`, `bzip2`, `xz` or `none`) | No; defaults to `gzip`
keyring | (NYI) The file containing the PGP keys | No
key | (NYI) The name of the key to be used in the keyring | No
passphrase | (NYI) The passphrase to use the key | No
attach | Attach artifact to project | No; defaults to `true`
submodules | Execute the goal on all sub-modules | No; defaults to `true`
timestamped | Turn SNAPSHOT into timestamps | No; defaults to `false`
verbose | Verbose logging | No; defaults to `true`, will be `false` in the future
If you use the `dataSet` element, you'll need to populate it with a one or
more `data` elements. A `data` element is used to specify a directory, a
tarball archive, or a file. You can add as many data
elements to your dataSet as you'd like. The `data` element has the
following options:
Element | Description | Required
---------------- | ---------------------------------------------------------------------------- | ------------------------------------
src | The directory, tarball, file to include in the package | Yes
dst | New filename at destination (type must be `file`) | No
linkName | The path of the link (type must be `link`) | Yes for link
linkTarget | The target of the link (type must be `link`) | Yes for link
type | Type of the data source. (archive, directory, file, link or template) | No; but will be Yes in the future
missingSrc | Fail if src file/folder is missing (ignore or fail) | No; defaults to `fail`
includes | A comma seperated list of files to include from the directory or tarball | No; defaults to all files
excludes | A comma seperated list of files to exclude from the directory or tarball | No; defaults to no exclutions
mapper | The files to exclude from the directory or tarball | No
paths/(path..) | One or more string literal paths that will created in the package | No; Yes for type `template`
There are different kinds of mappers that can be selected via the `type` argument. The most common one is the 'perm' mapper.
Element | Description | Required
------------- | ----------------------------------------------------- | -----------------------
type | 'perm' | Yes
prefix | Add this prefix to the files | No; defaults to ""
uid | Numerical uid | No; defaults to 0
gid | Numerical gid | No; defaults to 0
user | User name | No; defaults to "root"
group | User group | No; defaults to "root"
filemode | File permissions as octet | No; deftauls to 644
dirmode | Dir permissions as octet | No; defaults to 755
strip | Strip n path components from the original file | No; defaults to 0
Below is an example of how you could configure your jdeb maven plugin to
include a directory, a tarball, and a file in your deb package:
```xml
jdeborg.vafer1.0packagejdeb${project.basedir}/target/my_archive.tar.gzarchive......perm1/somewhere/elsetcurdttcurdt600${project.build.directory}/datadirectory**/.svnlsmapping.txt${project.basedir}/README.txtREADMEfileignoretemplate/etc/${artifactId}/var/lib/${artifactId}/var/log/${artifactId}/var/run/${artifactId}link/a/path/on/the/target/fs/a/link/to/the/scr/filefalselink/a/path/on/the/target/fs/a/sym/link/to/the/scr/filetrue
```
jdeb/src/ 0000755 0001750 0001750 00000000000 12207644255 012440 5 ustar moeller moeller jdeb/src/examples/ 0000755 0001750 0001750 00000000000 12207644255 014256 5 ustar moeller moeller jdeb/src/examples/ant/ 0000755 0001750 0001750 00000000000 12207644255 015040 5 ustar moeller moeller jdeb/src/examples/ant/build.xml 0000644 0001750 0001750 00000003055 12207644255 016664 0 ustar moeller moeller