source: trunk/dports/java/android/Portfile @ 86205

Last change on this file since 86205 was 86205, checked in by krischik@…, 9 years ago

Update to android sdk 14.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-shellscript
File size: 3.7 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 8; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4
2# $Id: Portfile 86205 2011-10-21 15:58:56Z krischik@macports.org $
3# vim: set fileencoding=utf-8 tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab filetype=tcl :
4
5PortSystem 1.0
6
7name                android
8version             14
9categories          java devel emulators
10maintainers         openmaintainer krischik
11platforms           darwin
12description         Android SDK
13long_description                                                        \
14    The Android SDK allows development for the Android mobile platform.
15
16set patchversion    86202
17set appbundles      ${name}-appbundles-r${patchversion}.tar.gz
18set prog            ${name}-sdk_r${version}-macosx.zip
19
20homepage            http://developer.${name}.com/
21master_sites        http://dl.google.com/${name}:prog                   \
22                    macports:${name}:appbundles
23distfiles           ${prog}:prog                                        \
24                    ${appbundles}:appbundles
25distname            ${name}-sdk-mac_x86
26worksrcdir          ${name}-sdk-macosx
27extract.only        ${appbundles}
28
29checksums           ${prog}                                             \
30                    md5     812887018435382de8486f3bb26a5db4            \
31                    sha1    51a21a1045a69def46561bbf6759d67369362d90    \
32                    rmd160  d71f04888fb3f82b2bb86ed8e0f0983ccf41cc95    \
33                    ${appbundles}                                       \
34                    md5     297ca0750c6cea42dd238063d15ae374            \
35                    sha1    4fb441d14c0a019ac1fe8428c1ddbafa8392c1d6    \
36                    rmd160  6d6b3086a2499bd675489aa816dcbb1e6216a177
37
38use_configure       no
39build.cmd           true
40
41destroot.keepdirs                                               \
42    ${destroot}${prefix}/share/java/${worksrcdir}/add-ons       \
43    ${destroot}${prefix}/share/java/${worksrcdir}/docs          \
44    ${destroot}${prefix}/share/java/${worksrcdir}/platforms     \
45    ${destroot}${prefix}/share/java/${worksrcdir}/samples       \
46    ${destroot}${prefix}/share/java/${worksrcdir}/temp
47
48post-extract {
49        system "unzip -q ${distpath}/${prog} -d ${workpath}"
50}
51
52destroot {
53    xinstall -m 755 -d ${destroot}${prefix}/share/java/${distname}
54
55    # file copy can not copy with rename and directory tree.
56    #
57    system "cp -r ${worksrcpath}/. ${destroot}${prefix}/share/java/${distname}/."
58
59    xinstall -m 770 -d ${destroot}${prefix}/share/java/${distname}/docs
60    xinstall -m 770 -d ${destroot}${prefix}/share/java/${distname}/samples
61    xinstall -m 770 -d ${destroot}${prefix}/share/java/${distname}/temp
62
63    system "
64        chgrp -R _developer ${destroot}${prefix}/share/java/${distname};
65        chmod -R g+w ${destroot}${prefix}/share/java/${distname}/add-ons;
66        chmod -R g+w ${destroot}${prefix}/share/java/${distname}/platforms;
67        chmod -R g-w ${destroot}${prefix}/share/java/${distname}/tools;
68    "
69
70    ui_info "####################################################################"
71    ui_info "# add-ons, docs, platforms, samples and temp have been made        #"
72    ui_info "# group _developer writable. You need to be member of the          #"
73    ui_info "# _developer group to use the android tools. If you are not use:   #"
74    ui_info "#                                                                  #"
75    ui_info "# sudo dscl . append /Groups/_developer GroupMembership <username> #"
76    ui_info "#                                                                  #"
77    ui_info "####################################################################"
78}
79
80platform macosx {
81    post-destroot {
82        xinstall -m 755 -d ${destroot}${applications_dir}/Developer
83
84        system "touch ${destroot}${applications_dir}/Developer/.localized"
85
86        foreach comp { Android-DDMS Android-Draw9Patch Android-Emulator Android-Hierarchyviewer Android-Manager } {
87        copy                                                                                    \
88            ${workpath}/appbundles-r${patchversion}/${comp}.app                                 \
89            ${destroot}${applications_dir}/Developer
90            reinplace s|@PREFIX@|${prefix}|g                                                    \
91                ${destroot}${applications_dir}/Developer/${comp}.app/Contents/MacOS/Start.command
92        }
93    }
94}
95
Note: See TracBrowser for help on using the repository browser.