[SCM] davmail packaging branch, master, updated. 02c2b101f323ee4dc652f941a0d9441a59cfa0da
Alexandre Rossi
alexandre.rossi at gmail.com
Mon Oct 1 09:07:37 UTC 2012
The following commit has been merged in the master branch:
commit 1e55a170050810544db5eebff96e6fccb5856b77
Author: Alexandre Rossi <alexandre.rossi at gmail.com>
Date: Mon Oct 1 10:54:35 2012 +0200
update build system adaptations :
- upstream now builds jar manifest
- exclude OSX files from the build rather than removing src files
- new davmail-lib target to build only the jar
diff --git a/debian/ant.properties b/debian/ant.properties
index 163300d..8bc2436 100644
--- a/debian/ant.properties
+++ b/debian/ant.properties
@@ -1,5 +1,4 @@
# Build flags
-windows-dist = false
installdir = /usr/share/java
# Deps
@@ -13,3 +12,4 @@ jackrabbit-webdav = /usr/share/java/jackrabbit-webdav.jar
woodstox-core = /usr/share/java/woodstox-core-lgpl.jar
stax2-api = /usr/share/java/stax2-api.jar
swt = /usr/share/java/swt.jar
+slf4j-api = /usr/share/java/slf4j-api.jar
diff --git a/debian/patches/fix-build b/debian/patches/fix-build
index d2fb4a9..d199754 100644
--- a/debian/patches/fix-build
+++ b/debian/patches/fix-build
@@ -2,12 +2,12 @@ Description: Use system libraries in the build system and disable windows dist
Forwarded: no
Author: Alexandre Rossi <alexandre.rossi at gmail.com>
-Index: davmail-src-3.9.9-1976/build.xml
+Index: davmail-src-4.0.0-2016/build.xml
===================================================================
---- davmail-src-3.9.9-1976.orig/build.xml 2012-07-10 23:13:26.000000000 +0200
-+++ davmail-src-3.9.9-1976/build.xml 2012-08-23 17:57:56.353182085 +0200
-@@ -3,12 +3,22 @@
- <property name="version" value="3.9.9"/>
+--- davmail-src-4.0.0-2016.orig/build.xml 2012-09-14 15:51:01.894386526 +0200
++++ davmail-src-4.0.0-2016/build.xml 2012-09-30 20:33:10.618922857 +0200
+@@ -3,10 +3,17 @@
+ <property name="version" value="4.0.0"/>
<path id="classpath">
- <pathelement location="classes"/>
@@ -24,65 +24,73 @@ Index: davmail-src-3.9.9-1976/build.xml
+ <pathelement location="${woodstox-core}" />
+ <pathelement location="${stax2-api}" />
+ <pathelement location="${swt}" />
++ <pathelement location="${slf4j-api}" />
</path>
-+ <condition property="windows-dist-run">
-+ <equals arg1="${windows-dist}" arg2="true" />
-+ </condition>
-+
<target name="clean">
- <delete dir="target"/>
- <delete dir="dist"/>
-@@ -230,8 +240,20 @@
+@@ -59,7 +66,7 @@
+ <mkdir dir="target/classes"/>
+ <javac srcdir="src/java" destdir="target/classes" source="1.5" target="1.5" debug="on" encoding="UTF-8"
+ excludes="davmail/service/DavService.java,
+- src/java/davmail/ui/tray/OSX*.java"
++ davmail/ui/tray/OSX*.java"
+ includeantruntime="false">
+ <classpath>
+ <path refid="classpath"/>
+@@ -232,35 +239,13 @@
</target>
-+ <target name="windows-dist" depends="compile" if="windows-dist-run">
-+
-+ <taskdef name="jsmoothgen"
-+ classname="net.charabia.jsmoothgen.ant.JSmoothGen"
-+ classpathref="classpath"/>
-+ <jsmoothgen project="davmail.jsmooth" skeletonroot="src/jsmooth/skeletons"/>
-+ <jsmoothgen project="davmailconsole.jsmooth" skeletonroot="src/jsmooth/skeletons"/>
-+ <!-- use WinRun4J to generate DavMail service -->
-+ <copy file="src/winrun4j/davmailservice.exe" todir="dist"/>
-+ <jsmoothgen project="davmail64.jsmooth" skeletonroot="src/jsmooth/skeletons"/>
-
+-
- <target name="dist" depends="compile">
-+ </target>
-+
-+ <target name="dist" depends="compile, windows-dist">
++ <target name="davmail-lib" depends="compile">
<property name="release-name" value="${release}-trunk"/>
<delete dir="dist"/>
<mkdir dir="dist"/>
-@@ -242,6 +264,7 @@
- <attribute name="Implementation-Title" value="DavMail Gateway"/>
- <attribute name="Implementation-Version" value="${release-name}"/>
- <attribute name="Implementation-Vendor" value="Mickael Guessant"/>
-+ <attribute name="Main-Class" value="davmail.DavGateway"/>
+ <echo file="dist/version.txt" message="${release}"/>
+ <pathconvert property="manifest-classpath" pathsep=" ">
+- <mapper>
+- <chainedmapper>
+- <!-- remove absolute path -->
+- <flattenmapper/>
+- <globmapper from="*" to="lib/*"/>
+- </chainedmapper>
+- </mapper>
+- <path>
+- <fileset dir="lib">
+- <include name="*.jar"/>
+- <exclude name="ant-deb*.jar"/>
+- <exclude name="jarbundler-*.jar"/>
+- <exclude name="jsmoothgen-ant-*.jar"/>
+- <exclude name="junit-*.jar"/>
+- <exclude name="libgrowl-*.jar"/>
+- <exclude name="nsisant-*.jar"/>
+- <exclude name="redline-*.jar"/>
+- <exclude name="servlet-api-*.jar"/>
+- <exclude name="swt-*.jar"/>
+- <exclude name="winrun4j-*.jar"/>
+- </fileset>
+- </path>
++ <path refid="classpath"/>
+ </pathconvert>
+ <jar basedir="target/classes" destfile="dist/davmail.jar">
+ <manifest>
+@@ -273,6 +258,10 @@
</section>
</manifest>
</jar>
-@@ -259,14 +282,6 @@
- </copy>
- <copy file="src/java/tray48.png" tofile="dist/davmail.png"/>
- <copy file="davmail.sh" todir="dist"/>
-- <taskdef name="jsmoothgen"
-- classname="net.charabia.jsmoothgen.ant.JSmoothGen"
-- classpathref="classpath"/>
-- <jsmoothgen project="davmail.jsmooth" skeletonroot="src/jsmooth/skeletons"/>
-- <jsmoothgen project="davmailconsole.jsmooth" skeletonroot="src/jsmooth/skeletons"/>
-- <!-- use WinRun4J to generate DavMail service -->
-- <copy file="src/winrun4j/davmailservice.exe" todir="dist"/>
-- <jsmoothgen project="davmail64.jsmooth" skeletonroot="src/jsmooth/skeletons"/>
- <zip file="dist/davmail-${release-name}.zip">
- <fileset dir="dist">
- <include name="lib/*.jar"/>
-Index: davmail-src-3.9.9-1976/build.properties
++ </target>
++
++ <target name="dist" depends="compile, davmail-lib">
++ <property name="release-name" value="${release}-trunk"/>
+ <copy todir="dist/lib">
+ <fileset dir="lib">
+ <include name="*.jar"/>
+Index: davmail-src-4.0.0-2016/build.properties
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ davmail-src-3.9.9-1976/build.properties 2012-08-23 18:01:27.492683383 +0200
-@@ -0,0 +1,14 @@
++++ davmail-src-4.0.0-2016/build.properties 2012-09-30 20:32:36.330921201 +0200
+@@ -0,0 +1,15 @@
+# Build flags
+windows-dist = yes
+
@@ -97,3 +105,4 @@ Index: davmail-src-3.9.9-1976/build.properties
+woodstox-core = lib/woodstox-core-asl-4.1.2.jar
+stax2-api = lib/stax2-api-3.1.1.jar
+swt = lib/swt-3.7-*.jar
++slf4j-api = lib/slf4j-api-1.3.1.jar
diff --git a/debian/patches/no-osx-tray b/debian/patches/no-osx-tray
index 3921c6e..0ae35a3 100644
--- a/debian/patches/no-osx-tray
+++ b/debian/patches/no-osx-tray
@@ -2,234 +2,10 @@ Description: Remove OSX specific code.
Forwarded: not-needed
Author: Alexandre Rossi <alexandre.rossi at gmail.com>
-Index: davmail-src-3.9.9-1976/src/java/davmail/ui/tray/OSXAwtGatewayTray.java
+Index: davmail-src-4.0.0-2016/src/java/davmail/ui/tray/DavGatewayTray.java
===================================================================
---- davmail-src-3.9.9-1976.orig/src/java/davmail/ui/tray/OSXAwtGatewayTray.java 2011-04-06 22:01:14.000000000 +0200
-+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
-@@ -1,133 +0,0 @@
--/*
-- * DavMail POP/IMAP/SMTP/CalDav/LDAP Exchange Gateway
-- * Copyright (C) 2009 Mickael Guessant
-- *
-- * This program is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU General Public License
-- * as published by the Free Software Foundation; either version 2
-- * of the License, or (at your option) any later version.
-- *
-- * This program is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-- */
--package davmail.ui.tray;
--
--import davmail.BundleMessage;
--import davmail.DavGateway;
--import davmail.ui.OSXAdapter;
--import info.growl.Growl;
--import info.growl.GrowlException;
--import info.growl.GrowlUtils;
--import org.apache.log4j.Level;
--import org.apache.log4j.Logger;
--
--import javax.swing.*;
--import java.awt.*;
--import java.awt.image.BufferedImage;
--import java.awt.image.RenderedImage;
--
--/**
-- * Extended Awt tray with OSX extensions.
-- */
--public class OSXAwtGatewayTray extends AwtGatewayTray {
-- protected static final String OSX_TRAY_ACTIVE_PNG = "osxtray2.png";
-- protected static final String OSX_TRAY_PNG = "osxtray.png";
-- protected static final String OSX_TRAY_INACTIVE_PNG = "osxtrayinactive.png";
--
-- private static final Logger LOGGER = Logger.getLogger(OSXAwtGatewayTray.class);
--
-- /**
-- * Exit DavMail Gateway.
-- *
-- * @return true
-- */
-- @SuppressWarnings({"SameReturnValue", "UnusedDeclaration"})
-- public boolean quit() {
-- DavGateway.stop();
-- // dispose frames
-- settingsFrame.dispose();
-- aboutFrame.dispose();
-- if (logBrokerMonitor != null) {
-- logBrokerMonitor.dispose();
-- }
-- return true;
-- }
--
-- @Override
-- protected void createAndShowGUI() {
-- System.setProperty("apple.laf.useScreenMenuBar", "true");
-- super.createAndShowGUI();
-- trayIcon.removeActionListener(settingsListener);
-- try {
-- OSXAdapter.setAboutHandler(this, AwtGatewayTray.class.getDeclaredMethod("about", (Class[]) null));
-- OSXAdapter.setPreferencesHandler(this, AwtGatewayTray.class.getDeclaredMethod("preferences", (Class[]) null));
-- OSXAdapter.setQuitHandler(this, OSXAwtGatewayTray.class.getDeclaredMethod("quit", (Class[]) null));
-- } catch (Exception e) {
-- DavGatewayTray.error(new BundleMessage("LOG_ERROR_LOADING_OSXADAPTER"), e);
-- }
-- }
--
-- @Override
-- protected String getTrayIconPath() {
-- return OSXAwtGatewayTray.OSX_TRAY_PNG;
-- }
--
-- @Override
-- protected String getTrayIconActivePath() {
-- return OSXAwtGatewayTray.OSX_TRAY_ACTIVE_PNG;
-- }
--
-- @Override
-- protected String getTrayIconInactivePath() {
-- return OSXAwtGatewayTray.OSX_TRAY_INACTIVE_PNG;
-- }
--
-- @Override
-- public void displayMessage(final String message, final Level level) {
-- if (!GrowlUtils.isGrowlLoaded()) {
-- super.displayMessage(message, level);
-- } else {
-- SwingUtilities.invokeLater(new Runnable() {
-- public void run() {
-- if (trayIcon != null) {
-- Icon icon = null;
-- if (level.equals(Level.INFO)) {
-- icon = UIManager.getIcon("OptionPane.informationIcon");
-- } else if (level.equals(Level.WARN)) {
-- icon = UIManager.getIcon("OptionPane.warningIcon");
-- } else if (level.equals(Level.ERROR)) {
-- icon = UIManager.getIcon("OptionPane.errorIcon");
-- }
--
-- if (icon != null && message != null && message.length() > 0) {
-- try {
-- String title = BundleMessage.format("UI_DAVMAIL_GATEWAY");
-- Growl growl = GrowlUtils.getGrowlInstance("DavMail");
-- growl.addNotification(title, true);
-- growl.register();
-- growl.sendNotification(title, title, message, (RenderedImage) getImageForIcon(icon));
-- } catch (GrowlException growlException) {
-- LOGGER.error(growlException);
-- }
-- }
-- trayIcon.setToolTip(BundleMessage.format("UI_DAVMAIL_GATEWAY") + '\n' + message);
-- }
-- }
-- });
-- }
-- }
--
-- protected Image getImageForIcon(Icon icon) {
-- BufferedImage bufferedimage = new BufferedImage(icon.getIconWidth(), icon.getIconHeight(), BufferedImage.TYPE_INT_ARGB);
-- Graphics g = bufferedimage.getGraphics();
-- icon.paintIcon(null, g, 0, 0);
-- g.dispose();
-- return bufferedimage;
-- }
--}
-Index: davmail-src-3.9.9-1976/src/java/davmail/ui/tray/OSXFrameGatewayTray.java
-===================================================================
---- davmail-src-3.9.9-1976.orig/src/java/davmail/ui/tray/OSXFrameGatewayTray.java 2011-07-31 21:26:52.000000000 +0200
-+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
-@@ -1,81 +0,0 @@
--/*
-- * DavMail POP/IMAP/SMTP/CalDav/LDAP Exchange Gateway
-- * Copyright (C) 2009 Mickael Guessant
-- *
-- * This program is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU General Public License
-- * as published by the Free Software Foundation; either version 2
-- * of the License, or (at your option) any later version.
-- *
-- * This program is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-- */
--package davmail.ui.tray;
--
--import davmail.BundleMessage;
--import davmail.DavGateway;
--import davmail.ui.OSXAdapter;
--
--import javax.swing.*;
--import java.awt.event.ActionEvent;
--import java.awt.event.ActionListener;
--
--/**
-- * MacOSX specific frame to handle menu
-- */
--public class OSXFrameGatewayTray extends FrameGatewayTray {
--
-- /**
-- * Exit DavMail Gateway.
-- *
-- * @return true
-- */
-- @SuppressWarnings({"SameReturnValue", "UnusedDeclaration"})
-- public boolean quit() {
-- DavGateway.stop();
-- // dispose frames
-- settingsFrame.dispose();
-- aboutFrame.dispose();
-- if (logBrokerMonitor != null) {
-- logBrokerMonitor.dispose();
-- }
-- return true;
-- }
--
-- @Override
-- protected void buildMenu() {
-- // create a popup menu
-- JMenu menu = new JMenu(BundleMessage.format("UI_LOGS"));
-- JMenuBar menuBar = new JMenuBar();
-- menuBar.add(menu);
-- mainFrame.setJMenuBar(menuBar);
--
-- JMenuItem logItem = new JMenuItem(BundleMessage.format("UI_SHOW_LOGS"));
-- logItem.addActionListener(new ActionListener() {
-- public void actionPerformed(ActionEvent e) {
-- showLogs();
-- }
-- });
-- menu.add(logItem);
-- }
--
--
-- @Override
-- protected void createAndShowGUI() {
-- System.setProperty("apple.laf.useScreenMenuBar", "true");
-- super.createAndShowGUI();
-- try {
-- OSXAdapter.setAboutHandler(this, FrameGatewayTray.class.getDeclaredMethod("about", (Class[]) null));
-- OSXAdapter.setPreferencesHandler(this, FrameGatewayTray.class.getDeclaredMethod("preferences", (Class[]) null));
-- OSXAdapter.setQuitHandler(this, OSXFrameGatewayTray.class.getDeclaredMethod("quit", (Class[]) null));
-- } catch (Exception e) {
-- DavGatewayTray.error(new BundleMessage("LOG_ERROR_LOADING_OSXADAPTER"), e);
-- }
-- }
--}
-Index: davmail-src-3.9.9-1976/src/java/davmail/ui/tray/DavGatewayTray.java
-===================================================================
---- davmail-src-3.9.9-1976.orig/src/java/davmail/ui/tray/DavGatewayTray.java 2011-10-29 23:29:19.000000000 +0200
-+++ davmail-src-3.9.9-1976/src/java/davmail/ui/tray/DavGatewayTray.java 2012-07-18 10:36:06.439321059 +0200
+--- davmail-src-4.0.0-2016.orig/src/java/davmail/ui/tray/DavGatewayTray.java 2012-09-14 14:22:17.814184063 +0200
++++ davmail-src-4.0.0-2016/src/java/davmail/ui/tray/DavGatewayTray.java 2012-09-14 14:22:23.390184274 +0200
@@ -240,11 +240,7 @@
if (davGatewayTray == null) {
try {
@@ -257,3 +33,17 @@ Index: davmail-src-3.9.9-1976/src/java/davmail/ui/tray/DavGatewayTray.java
davGatewayTray.init();
}
}
+Index: davmail-src-4.0.0-2016/build.xml
+===================================================================
+--- davmail-src-4.0.0-2016.orig/build.xml 2012-09-14 14:22:12.906183875 +0200
++++ davmail-src-4.0.0-2016/build.xml 2012-09-14 14:24:53.494189982 +0200
+@@ -58,7 +58,8 @@
+ <target name="compile" depends="init">
+ <mkdir dir="target/classes"/>
+ <javac srcdir="src/java" destdir="target/classes" source="1.5" target="1.5" debug="on" encoding="UTF-8"
+- excludes="davmail/service/DavService.java"
++ excludes="davmail/service/DavService.java,
++ src/java/davmail/ui/tray/OSX*.java"
+ includeantruntime="false">
+ <classpath>
+ <path refid="classpath"/>
diff --git a/debian/rules b/debian/rules
index 586b7eb..3d3c06c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,4 +11,5 @@ export DH_OPTIONS
dh $@ --with javahelper
override_dh_auto_build:
- ant -propertyfile debian/ant.properties
+ ant -propertyfile debian/ant.properties davmail-lib
+ cp -a src/java/tray48.png dist/davmail.png
--
davmail packaging
More information about the pkg-java-commits
mailing list