Commit 7c9334e6 authored by Marco Mariani's avatar Marco Mariani

build junixsocket's native library

parent 50fe9f89
......@@ -38,6 +38,8 @@ parts =
jdk-sources
jdk-sources-policy
junit
junixsocket
junixsocket-sources
ant
autoconf
automake
......@@ -113,12 +115,38 @@ strip-top-level-dir = True
[junit]
recipe = hexagonit.recipe.download
url = http://zimbra.imladris.sk/download/jars/junit-4.8.2.jar
filename = junit-4.8.2.jar
url = http://zimbra.imladris.sk/download/jars/${:filename}
md5sum = 8a498c3d820db50cc7255d8c46c1ebd1
download-only = True
destination = ${zimbra-sources:location}/ZimbraCommon/jars
[junixsocket]
# build the native junixsocket library. the .jar parts are already inside the jars/ folder
recipe = hexagonit.recipe.cmmi
url = http://junixsocket.googlecode.com/files/junixsocket-1.3-src.tar.bz2
md5sum = fe249aba3bf568d71a5174506cf4ae80
configure-command = /bin/true
make-binary = ${ant:location}/bin/ant
make-targets =
environment-dependency = ${environment:recipe}
junit-path = ${junit:destination}/${junit:filename}
pre-make-hook = ${:_profile_base_location_}/junixsocket-hooks.py:fix_build_xml
post-make-hook = ${:_profile_base_location_}/junixsocket-hooks.py:install_library
[junixsocket-sources]
# copy the junixsocket library inside the build tree
recipe = plone.recipe.command
zimbra-target = ${zimbra-sources:location}/ThirdPartyBuilds/x86_64/java
update-command = ${:command}
command =
mkdir -p ${:zimbra-target}/junixsocket
cd ${:zimbra-target}/junixsocket
tar --extract --bzip2 --file ${junixsocket:location}/junixsocket-1.3-bin.tar.bz2 --wildcards '*.so' --strip-components=2
[ant]
recipe = hexagonit.recipe.download
url = http://mirrors.linsrv.net/apache//ant/binaries/${:filename}
......@@ -127,7 +155,6 @@ md5sum = f5975145d90efbbafdcabece600f716b
strip-top-level-dir = True
[zimbra-sources]
recipe = slapos.recipe.build:gitclone
#repository = https://marco.mariani@bitbucket.org/marco.mariani/zimbra.git
......
# -*- coding: utf-8 -*-
import shutil
import os
import lxml
def fix_build_xml(options, sections):
compile_directory = options['compile-directory']
build_xml = os.path.join(compile_directory, 'junixsocket-1.3', 'build.xml')
root = lxml.etree.parse(build_xml)
junit = root.xpath('//property[@name="junit4.jar"]')[0]
junit.set('value', options['junit-path'])
with open(build_xml, 'wb') as fout:
fout.write(lxml.etree.tostring(root))
def install_library(options, sections):
compile_directory = options['compile-directory']
filename = 'junixsocket-1.3-bin.tar.bz2'
built_package = os.path.join(compile_directory, 'junixsocket-1.3', 'dist', filename)
dst = os.path.join(options['location'], filename)
shutil.copyfile(built_package, dst)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment