From patchwork Wed Apr 10 20:29:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Zacarias X-Patchwork-Id: 235480 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 7DAB82C00BB for ; Thu, 11 Apr 2013 06:29:52 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 218A731AE2; Wed, 10 Apr 2013 20:29:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4vAaiprSlmVx; Wed, 10 Apr 2013 20:29:48 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 800B531B05; Wed, 10 Apr 2013 20:29:48 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 9CE8E8F7A4 for ; Wed, 10 Apr 2013 20:29:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id EA52D8ED7C for ; Wed, 10 Apr 2013 20:29:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mTnCAprunTQV for ; Wed, 10 Apr 2013 20:29:45 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from loknar.toptech.com.ar (loknar.toptech.com.ar [78.46.79.162]) by whitealder.osuosl.org (Postfix) with ESMTPS id 829CC8ED5A for ; Wed, 10 Apr 2013 20:29:45 +0000 (UTC) Received: from asgard (host48.186-125-224.telecom.net.ar [186.125.224.48]) (authenticated bits=0) by loknar.toptech.com.ar (8.14.6/8.14.6) with ESMTP id r3AKTdCI017225 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 10 Apr 2013 20:29:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zacarias.com.ar; s=dkey; t=1365625783; bh=zSeQ++oNQWBtFwv9h/4Dsj3M0NsiT1Tdbi3sEl6P7ic=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=c5zW/8MaUyfZSHbeDbGgx7p5WNI1qZiaS4u5siniE22XNtESMFc5ug9q4H96QokhQ ZzLU7YNo2BW7x2vXsJ7dQSeYhGmfWeedLCpOmMqnFtWU5RcU3gypNdNzA/KSYv5KXW PJ2B22W2mPbuNhRj1FWCo4vljmYDG3FgABY4DTQs= Received: by asgard (sSMTP sendmail emulation); Wed, 10 Apr 2013 17:29:38 -0300 From: Gustavo Zacarias To: buildroot@busybox.net Date: Wed, 10 Apr 2013 17:29:26 -0300 Message-Id: <1365625766-11256-3-git-send-email-gustavo@zacarias.com.ar> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1365625766-11256-1-git-send-email-gustavo@zacarias.com.ar> References: <1365625766-11256-1-git-send-email-gustavo@zacarias.com.ar> X-Virus-Scanned: clamav-milter 0.97.7 at loknar X-Virus-Status: Clean Subject: [Buildroot] [PATCHv2 3/3] python-m2crypto: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Signed-off-by: Gustavo Zacarias --- package/Config.in | 1 + package/python-m2crypto/Config.in | 10 ++++++++ package/python-m2crypto/python-m2crypto.mk | 40 ++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 package/python-m2crypto/Config.in create mode 100644 package/python-m2crypto/python-m2crypto.mk diff --git a/package/Config.in b/package/Config.in index 2e7dc67..0537ffa 100644 --- a/package/Config.in +++ b/package/Config.in @@ -327,6 +327,7 @@ menu "external python modules" source "package/python-bottle/Config.in" source "package/python-dpkt/Config.in" source "package/python-id3/Config.in" +source "package/python-m2crypto/Config.in" source "package/python-mad/Config.in" source "package/python-meld3/Config.in" source "package/python-netifaces/Config.in" diff --git a/package/python-m2crypto/Config.in b/package/python-m2crypto/Config.in new file mode 100644 index 0000000..2ee4ab1 --- /dev/null +++ b/package/python-m2crypto/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_PYTHON_M2CRYPTO + bool "python-m2crypto" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_PYTHON_ZLIB + select BR2_PACKAGE_PYTHON_SETUPTOOLS + help + M2Crypto is the most complete Python wrapper for OpenSSL. + + http://chandlerproject.org/Projects/MeTooCrypto diff --git a/package/python-m2crypto/python-m2crypto.mk b/package/python-m2crypto/python-m2crypto.mk new file mode 100644 index 0000000..8a8de84 --- /dev/null +++ b/package/python-m2crypto/python-m2crypto.mk @@ -0,0 +1,40 @@ +############################################################# +# +# python-m2crypto +# +############################################################# + +PYTHON_M2CRYPTO_VERSION = 0.21.1 +PYTHON_M2CRYPTO_SITE = http://pypi.python.org/packages/source/M/M2Crypto +PYTHON_M2CRYPTO_SOURCE = M2Crypto-$(PYTHON_M2CRYPTO_VERSION).tar.gz +PYTHON_M2CRYPTO_DEPENDENCIES = openssl python host-python-setuptools host-python-distutilscross host-swig +HOST_PYTHON_M2CRYPTO_DEPENDENCIES = host-openssl host-python host-python-setuptools host-swig + +define HOST_PYTHON_M2CRYPTO_BUILD_CMDS + (cd $(@D); \ + $(HOST_CONFIGURE_OPTS) \ + PYTHONXCPREFIX="$(HOST_DIR)/usr/" \ + LDFLAGS="-L$(HOST_DIR)/lib -L$(HOST_DIR)/usr/lib" \ + $(HOST_DIR)/usr/bin/python setup.py build_ext --openssl=$(HOST_DIR)/usr) +endef + +define PYTHON_M2CRYPTO_BUILD_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \ + LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ + $(HOST_DIR)/usr/bin/python setup.py build -x bdist_egg --exclude-source-files) +endef + +define HOST_PYTHON_M2CRYPTO_INSTALL_CMDS + (cd $(@D); PYTHONPATH=$(HOST_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ + $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(HOST_DIR)/usr) +endef + +define PYTHON_M2CRYPTO_INSTALL_TARGET_CMDS + (cd $(@D); PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ + $(HOST_DIR)/usr/bin/python setup.py install --single-version-externally-managed --root=/ --prefix=$(TARGET_DIR)/usr) +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package))