Ticket #27033: Portfile

File Portfile, 2.9 KB (added by mklein-de (Michael Klein), 13 years ago)

Portfile

Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
2# $Id$
3
4PortSystem          1.0
5PortGroup           python26 1.0
6
7name                py26-lightblue
8version             0.4
9revision                        2
10maintainers         puffin.lb.shuttle.de:michael.klein openmaintainer
11description         A cross-platform Python Bluetooth API
12long_description    A cross-platform Python Bluetooth API for Mac OS X, \
13                    GNU/Linux and Python For Series 60. Provides simple device \
14                    and service discovery, RFCOMM sockets, L2CAP client \
15                    sockets, OBEX file transfer, service advertising, and \
16                    access to local device information.
17platforms           darwin
18homepage            http://lightblue.sourceforge.net/
19master_sites        sourceforge:lightblue
20distname            lightblue-${version}
21distfiles                       lightblue-${version}.tar.gz
22checksums           lightblue-${version}.tar.gz \
23                                                md5     2f2bf66faa4bf1a79eb28a47584077b7 \
24                        sha1    78331a3c1640f0e351f71774b576fef1d9d3951d \
25                        rmd160  9eb520d354b3b95b8e324cf846a6cb5556a29056 \
26                    LightAquaBlue-framework-MacOS10.6.zip \
27                        md5             1a46f98ec2ff688bb6d23df02e91c052 \
28                        sha1    f43accbcf4edf82553c12d3a809b03905a8777bf \
29                        rmd160  0efeb78018bccc1d458bcdddd08d9ee20e439e83 \
30                    LightAquaBlue-python-MacOS10.6.zip \
31                        md5             a5eb3152039033ab100f4b855bd79478 \
32                        sha1    220cafd2ee4f4cae46dd56454d02994c27c7eb4f \
33                        rmd160  08aa939afe0be496af521e3e249732ad978e1f8c
34
35depends_lib         port:py26-pyobjc-cocoa
36
37patchfiles          patch-deviceInquiryComplete_error_aborted-signature.diff
38
39extract.only            lightblue-${version}.tar.gz
40
41platform darwin 10 {
42
43    distfiles-append LightAquaBlue-framework-MacOS10.6.zip LightAquaBlue-python-MacOS10.6.zip
44    patchfiles-append patch-setup.py.diff
45
46# Extract LightAquaBlue-framework to replace existing version in tar archive
47    post-extract {
48        system "cd ${workpath}/${distname}/src/mac && rm -rf LightAquaBlue"
49            system "cd ${workpath}/${distname}/src/mac && unzip ${distpath}/LightAquaBlue-framework-MacOS10.6.zip"
50            system "cd ${workpath}/${distname}/src/mac && mv LightAquaBlue LightAquaBlue-xcode"
51            system "cd ${workpath}/${distname}/src/mac && unzip ${distpath}/LightAquaBlue-python-MacOS10.6.zip"
52    }
53
54    post-patch {
55        reinplace "s|/Library/Frameworks|${frameworks_dir}|g" \
56            ${worksrcpath}/src/mac/LightAquaBlue/__init__.py
57    }
58}
59
60post-patch {
61    reinplace "s|/Library/Frameworks|${frameworks_dir}|g" \
62        ${worksrcpath}/setup.py \
63        ${worksrcpath}/src/mac/_LightAquaBlue.py
64    reinplace "s|DSTROOT=/|DSTROOT=${destroot}|g" \
65        ${worksrcpath}/setup.py
66}