Skip to content

Commit

Permalink
close #78: added deb package
Browse files Browse the repository at this point in the history
First implementation of Linux packaging. A deb package is created, maybe
we can add others.
  • Loading branch information
torakiki committed Feb 2, 2014
1 parent 9401fbd commit bdb9dc9
Show file tree
Hide file tree
Showing 5 changed files with 155 additions and 15 deletions.
128 changes: 113 additions & 15 deletions sejda-console/pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<url>http://www.sejda.org</url>
<artifactId>sejda-console</artifactId>
<packaging>jar</packaging>
<name>sejda console</name>
<description>Command line interface to the Sejda PDF manipulation layer library.</description>
<description>The sejda-console is a shell interface for Sejda to perform pdf manipulation tasks such as merge or split through the command line.</description>

<parent>
<groupId>org.sejda</groupId>
Expand Down Expand Up @@ -37,6 +38,113 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<file>${project.build.directory}/assembled/bin/sejda-console</file>
<outputFile>${project.build.directory}/deb/sejda-console</outputFile>
<regex>false</regex>
<replacements>
<replacement>
<token>REPO=</token>
<value>REPO=/usr/share/sejda-console</value>
</replacement>
<replacement>
<token>"$BASEDIR"/etc</token>
<value>/etc/sejda-console</value>
</replacement>
</replacements>
</configuration>
</plugin>
<plugin>
<artifactId>jdeb</artifactId>
<groupId>org.vafer</groupId>
<version>1.1-SNAPSHOT</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jdeb</goal>
</goals>
<configuration>
<deb>[[buildDir]]/[[artifactId]]_[[version]]-1_all.[[extension]]</deb>
<dataSet>
<data>
<src>${project.build.directory}/deb/sejda-console</src>
<dst>usr/bin/sejda-console</dst>
<type>file</type>
<mapper>
<type>perm</type>
<filemode>755</filemode>
</mapper>
</data>
<data>
<src>doc</src>
<type>directory</type>
<mapper>
<type>perm</type>
<strip>1</strip>
<prefix>/usr/lib/${project.artifactId}/examples</prefix>
<filemode>644</filemode>
<dirmode>755</dirmode>
</mapper>
</data>
<data>
<src>${project.build.directory}/assembled/lib</src>
<type>directory</type>
<mapper>
<type>perm</type>
<prefix>/usr/share/${project.artifactId}</prefix>
<filemode>644</filemode>
<dirmode>755</dirmode>
</mapper>
</data>
<data>
<src>${project.build.directory}/assembled/etc</src>
<type>directory</type>
<conffile>true</conffile>
<mapper>
<type>perm</type>
<prefix>/etc/${project.artifactId}</prefix>
<filemode>644</filemode>
<dirmode>755</dirmode>
</mapper>
</data>
<data>
<type>link</type>
<linkName>/usr/bin/sejda</linkName>
<linkTarget>sejda-console</linkTarget>
<symlink>true</symlink>
<mapper>
<type>perm</type>
<filemode>755</filemode>
</mapper>
</data>
<data>
<src>${project.basedir}/src/deb/doc/changelog.Debian.gz</src>
<dst>/usr/share/doc/${project.artifactId}/changelog.Debian.gz</dst>
<type>file</type>
</data>
<data>
<src>${project.basedir}/src/deb/doc/copyright</src>
<dst>/usr/share/doc/${project.artifactId}/copyright</dst>
<type>file</type>
</data>
</dataSet>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
Expand All @@ -51,19 +159,9 @@

<build>
<plugins>
<plugin>
<groupId>net.sf.debian-maven</groupId>
<artifactId>debian-maven-plugin</artifactId>
<version>1.0.6</version>
<configuration>
<packageName>sejda-console</packageName>
<packageVersion>1.0.0.M9-SNAPSHOT</packageVersion>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
Expand All @@ -85,7 +183,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<version>1.1.1</version>
<version>1.7</version>
<executions>
<execution>
<phase>package</phase>
Expand Down Expand Up @@ -203,14 +301,14 @@
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
</dependency>
<dependency>
<groupId>org.sejda</groupId>
<artifactId>sejda-core</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
Expand Down
12 changes: 12 additions & 0 deletions sejda-console/src/deb/control/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Package: sejda-console
Version: [[version]]-1
Section: utils
Priority: optional
Architecture: all
Homepage: http://www.sejda.org
Recommends: openjdk-7-jre | openjdk-6-jre | java7-runtime | java6-runtime | java5-runtime
Maintainer: Andrea Vacondio <[email protected]>
Description: Shell interface for performing pdf manipulations
The sejda-console is a shell interface for Sejda, to be able
to perform pdf manipulation tasks such as merge or split
through the command line.
5 changes: 5 additions & 0 deletions sejda-console/src/deb/doc/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sejda-console (1.0.0.M9) unstable; urgency=low

* Initial Release.

-- Andrea Vacondio <[email protected]> Wed, 29 Jan 2014 12:19:39 +0100
Binary file added sejda-console/src/deb/doc/changelog.Debian.gz
Binary file not shown.
25 changes: 25 additions & 0 deletions sejda-console/src/deb/doc/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: sejda-console
Upstream-Contact: Andrea Vacondio ([email protected])
Source: https://github.com/torakiki/sejda/

Files: *
Copyright: 2010-2014 Andrea Vacondio ([email protected])
2010-2014 Eduard Weissmann ([email protected])
License: Apache-2.0

License: Apache-2.0
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.
.
On Debian systems, the complete text of the Apache version 2.0 license
can be found in "/usr/share/common-licenses/Apache-2.0".

0 comments on commit bdb9dc9

Please sign in to comment.