From d785fa7e094fc9db5d5fcc54df0f14e1ae473b9e Mon Sep 17 00:00:00 2001 From: Serghei Mihai Date: Wed, 4 May 2016 09:49:16 +0200 Subject: [PATCH] debian packaging (#10796) --- debian/changelog | 5 +++++ debian/compat | 1 + debian/control | 20 +++++++++++++++++ debian/mail2redmine.install | 2 ++ debian/rules | 10 +++++++++ eo-redmine-mailfilter.sh | 0 setup.py | 45 +++++++++++++++++++++++++++++++++++++ 7 files changed, 83 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/mail2redmine.install create mode 100755 debian/rules mode change 100644 => 100755 eo-redmine-mailfilter.sh create mode 100644 setup.py diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..37b6128 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +mail2redmine (0-1) unstable; urgency=low + + * source package automatically created by stdeb 0.8.5 + + -- Serghei Mihai Mon, 09 May 2016 17:42:19 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..ffc1a8d --- /dev/null +++ b/debian/control @@ -0,0 +1,20 @@ +Source: mail2redmine +Maintainer: Serghei Mihai +Section: python +Priority: optional +Build-Depends: python-setuptools (>= 0.6b3), python-all (>= 2.6.6-3), debhelper (>= 7.4.3) +Standards-Version: 3.9.1 + + +Package: mail2redmine +Architecture: all +Depends: ${misc:Depends}, ${python:Depends} +Description: Converts incoming exim emails to tickets + mail2redmine converts incoming email from Exim to Redmine tracker tickets by + using mail subject and body as ticket title and description respectively. + . + Ticket owner is detected from sender's address if a corresponding account + exists on Redmine. The email is sent to a fallback address if account doesn't + exist. + . + Email attachment are joined to the ticket. diff --git a/debian/mail2redmine.install b/debian/mail2redmine.install new file mode 100644 index 0000000..40492da --- /dev/null +++ b/debian/mail2redmine.install @@ -0,0 +1,2 @@ +eo-redmine-mailfilter.sh /usr/bin/ +mail2redmine.py /usr/bin/ \ No newline at end of file diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..f9e8abf --- /dev/null +++ b/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f + +# This file was automatically generated by stdeb 0.8.5 at +# Mon, 09 May 2016 17:42:19 +0200 + +%: + dh $@ --with python2 + + + diff --git a/eo-redmine-mailfilter.sh b/eo-redmine-mailfilter.sh old mode 100644 new mode 100755 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..9cb5fda --- /dev/null +++ b/setup.py @@ -0,0 +1,45 @@ +#! /usr/bin/env python +# -*- coding: utf-8 -*- + +import os +import subprocess +import sys + +from setuptools import setup, find_packages + +def get_version(): + if os.path.exists('VERSION'): + version_file = open('VERSION', 'r') + version = version_file.read() + version_file.close() + return version + if os.path.exists('.git'): + p = subprocess.Popen(['git', 'describe', '--dirty', '--match=v*'], stdout=subprocess.PIPE) + result = p.communicate()[0] + if p.returncode == 0: + version = result.split()[0][1:] + version = version.replace('-', '.') + return version + return '0' + + +setup( + name='mail2redmine', + version=get_version(), + description='Converts incoming exim emails to tickets', + author='Serghei Mihai', + author_email='smihai@entrouvert.com', + packages=find_packages(), + include_package_data=True, + scripts=('mail2redmine.py', 'eo-redmine-mailfilter.sh'), + url='https://dev.entrouvert.org/', + classifiers=[ + 'Development Status :: 2 - Pre-Alpha', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + ], + install_requires=['python-redmine'] +)