Skip to content
Snippets Groups Projects
Commit a737bf94 authored by abat's avatar abat
Browse files

Merge into master from pull request #115:

debian packaging: use system libraries when possible (https://github.com/floodlight/floodlight/pull/115)
parents 42df79b2 f6fa3ce3
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,8 @@
<property name="packetstreamer-gen" location="lib/gen-java" />
<property name="packetstreamer-gen-build" location="lib/gen-java-bin"/>
<property name="packetstreamer-thrift-jar" value="packetstreamer-thrift.jar"/>
<property name="floodlight-nodeps-jar" location="${target}/floodlight-nodeps.jar"/>
<property name="floodlight-debian-jar" location="${target}/floodlight-debian.jar"/>
<property name="floodlight-jar" location="${target}/floodlight.jar"/>
<property name="floodlight-test-jar" location="${target}/floodlight-test.jar"/>
......@@ -56,6 +58,15 @@
<include name="jython-2.5.2.jar"/>
<include name="libthrift-0.7.0.jar"/>
</patternset>
<!-- Dependencies we can't get from Debian/Ubuntu. -->
<patternset id="debian-lib">
<include name="org.restlet-2.1-RC1.jar"/>
<include name="org.restlet.ext.jackson-2.1-RC1.jar"/>
<include name="org.restlet.ext.simple-2.1-RC1.jar"/>
<include name="org.restlet.ext.slf4j-2.1-RC1.jar"/>
<include name="libthrift-0.7.0.jar"/>
<include name="simple-4.1.21.jar"/>
</patternset>
<patternset id="genlib">
<include name="${packetstreamer-thrift-jar}"/>
</patternset>
......@@ -201,7 +212,7 @@
<target name="coverage" depends="instrument,test,coverage-report"/>
<target name="dist" depends="compile,compile-test">
<jar destfile="${floodlight-jar}" filesetmanifest="mergewithoutmain">
<jar destfile="${floodlight-nodeps-jar}" filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
<attribute name="Class-Path" value="."/>
......@@ -211,12 +222,30 @@
<fileset dir="${python-src}">
<include name="**/*.py"/>
</fileset>
<zipgroupfileset dir="${target}/lib">
<patternset refid="genlib"/>
</zipgroupfileset>
</jar>
<jar destfile="${floodlight-jar}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
<attribute name="Class-Path" value="."/>
</manifest>
<zipgroupfileset dir="lib">
<patternset refid="lib"/>
</zipgroupfileset>
<zipgroupfileset dir="${target}/lib">
<patternset refid="genlib"/>
<zipfileset src="${floodlight-nodeps-jar}"/>
</jar>
<jar destfile="${floodlight-debian-jar}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
<!-- JARs under /usr/share/java on Debian/Ubuntu -->
<attribute name="Class-Path" value="args4j.jar slf4j-api.jar logback-core.jar logback-classic.jar jackson-core-asl.jar jackson-mapper-asl.jar easymock.jar netty.jar concurrentlinkedhashmap-lru.jar jython.jar antlr3-runtime.jar asm3.jar asm3-tree.jar ."/>
</manifest>
<zipgroupfileset dir="lib">
<patternset refid="debian-lib"/>
</zipgroupfileset>
<zipfileset src="${floodlight-nodeps-jar}"/>
</jar>
<jar destfile="${floodlight-test-jar}" filesetmanifest="mergewithoutmain">
<manifest>
......
......@@ -2,7 +2,7 @@ Source: floodlight
Section: net
Priority: extra
Maintainer: Rich Lane <rlane@bigswitch.com>
Build-Depends: debhelper (>= 8.0.0), javahelper (>= 0.40ubuntu1)
Build-Depends: debhelper (>= 8.0.0), javahelper (>= 0.40ubuntu1), liblogback-java, libjackson-json-java, libeasymock-java, libslf4j-java, libsimple-xml-java, libnetty-java, libargs4j-java, libconcurrentlinkedhashmap-java, jython
Standards-Version: 3.9.2
Homepage: http://floodlight.openflowhub.org/
Vcs-Git: git://github.com/floodlight/floodlight.git
......
target/floodlight.jar usr/share/java
target/floodlight-debian.jar usr/share/java
debian/misc/floodlight usr/bin
#!/bin/sh
exec java -jar /usr/share/java/floodlight.jar "$@"
exec java -jar /usr/share/java/floodlight-debian.jar "$@"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment