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

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

Bump version to SDK 21

  • 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.6 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 99828 2012-11-18 18:30:15Z 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             21
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.
15supported_archs     noarch
16
17set patchversion    91270
18set appbundles      ${name}-appbundles-r${patchversion}.tar.gz
19set prog            ${name}-sdk_r${version}-macosx.zip
20
21homepage            http://developer.${name}.com/
22master_sites        http://dl.google.com/${name}:prog                   \
23                    macports:${name}:appbundles
24distfiles           ${prog}:prog                                        \
25                    ${appbundles}:appbundles
26distname            ${name}-sdk-macosx
27worksrcdir          ${name}-sdk-macosx
28extract.only        ${appbundles}
29
30checksums           ${prog}                                             \
31                    md5     67e46adca90dd18d7291443f6c15d6af \
32                    sha1    0c29f5f5ab556ce4555682264d9c6414fc905c20 \
33                    rmd160  ed76f904700c822b436d2443b6d44712ad0f3310 \
34                    ${appbundles}                                       \
35                    md5     408ea03d28968f0d55937920c7886aa0 \
36                    sha1    da35b8f67f1e5bef1bf1e272e20c4e303ee42a27 \
37                    rmd160  c51afc1d2d0ade1f018f6cac662f614fb1c0e23b
38
39use_configure       no
40build.cmd           true
41
42destroot.keepdirs                                               \
43    ${destroot}${prefix}/share/java/${worksrcdir}/add-ons       \
44    ${destroot}${prefix}/share/java/${worksrcdir}/docs          \
45    ${destroot}${prefix}/share/java/${worksrcdir}/platforms     \
46    ${destroot}${prefix}/share/java/${worksrcdir}/samples       \
47    ${destroot}${prefix}/share/java/${worksrcdir}/temp
48
49post-extract {
50        system "unzip -q ${distpath}/${prog} -d ${workpath}"
51}
52
53destroot {
54    xinstall -m 755 -d ${destroot}${prefix}/share/java/${distname}
55
56    # file copy can not copy with rename and directory tree.
57    #
58    system "cp -r ${worksrcpath}/. ${destroot}${prefix}/share/java/${distname}/."
59
60    xinstall -m 770 -d ${destroot}${prefix}/share/java/${distname}/docs
61    xinstall -m 770 -d ${destroot}${prefix}/share/java/${distname}/samples
62    xinstall -m 770 -d ${destroot}${prefix}/share/java/${distname}/temp
63
64    system "
65        chgrp -R _developer ${destroot}${prefix}/share/java/${distname};
66        chmod -R g+w ${destroot}${prefix}/share/java/${distname};
67    "
68
69    ui_info "####################################################################"
70    ui_info "# add-ons, docs, platforms, samples and temp have been made        #"
71    ui_info "# group _developer writable. You need to be member of the          #"
72    ui_info "# _developer group to use the android tools. If you are not use:   #"
73    ui_info "#                                                                  #"
74    ui_info "# sudo dscl . append /Groups/_developer GroupMembership <username> #"
75    ui_info "#                                                                  #"
76    ui_info "####################################################################"
77}
78
79platform macosx {
80    post-destroot {
81        xinstall -m 755 -d ${destroot}${applications_dir}/Developer
82
83        system "touch ${destroot}${applications_dir}/Developer/.localized"
84
85        foreach comp { Android-DDMS Android-Draw9Patch Android-Emulator Android-Hierarchyviewer Android-Manager } {
86        copy                                                                                    \
87            ${workpath}/appbundles-r${patchversion}/${comp}.app                                 \
88            ${destroot}${applications_dir}/Developer
89            reinplace s|@PREFIX@|${prefix}|g                                                    \
90                ${destroot}${applications_dir}/Developer/${comp}.app/Contents/MacOS/Start.command
91        }
92    }
93}
94
Note: See TracBrowser for help on using the repository browser.