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 | |
---|
5 | PortSystem 1.0 |
---|
6 | |
---|
7 | name android |
---|
8 | version 22.3 |
---|
9 | categories java devel emulators |
---|
10 | maintainers openmaintainer krischik |
---|
11 | platforms darwin |
---|
12 | description Android SDK |
---|
13 | long_description \ |
---|
14 | The Android SDK allows development for the Android mobile platform. |
---|
15 | supported_archs noarch |
---|
16 | |
---|
17 | set patchversion 91270 |
---|
18 | set appbundles ${name}-appbundles-r${patchversion}.tar.gz |
---|
19 | set prog ${name}-sdk_r${version}-macosx.zip |
---|
20 | |
---|
21 | homepage http://developer.${name}.com/ |
---|
22 | master_sites http://dl.google.com/${name}:prog \ |
---|
23 | macports:${name}:appbundles |
---|
24 | distfiles ${prog}:prog \ |
---|
25 | ${appbundles}:appbundles |
---|
26 | distname ${name}-sdk-macosx |
---|
27 | worksrcdir ${name}-sdk-macosx |
---|
28 | extract.only ${appbundles} |
---|
29 | |
---|
30 | checksums ${prog} \ |
---|
31 | md5 ecde88ca1f05955826697848fcb4a9e7 \ |
---|
32 | sha1 547ea51c4aa61d623a4823d0b635d3b66b6c9329 \ |
---|
33 | rmd160 2feefd61659c711d81cfd4459a3e9124d787c154 \ |
---|
34 | ${appbundles} \ |
---|
35 | md5 408ea03d28968f0d55937920c7886aa0 \ |
---|
36 | sha1 da35b8f67f1e5bef1bf1e272e20c4e303ee42a27 \ |
---|
37 | rmd160 c51afc1d2d0ade1f018f6cac662f614fb1c0e23b |
---|
38 | |
---|
39 | use_configure no |
---|
40 | build.cmd true |
---|
41 | |
---|
42 | destroot.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 | |
---|
49 | post-extract { |
---|
50 | system "unzip -q ${distpath}/${prog} -d ${workpath}" |
---|
51 | } |
---|
52 | |
---|
53 | destroot { |
---|
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 | |
---|
79 | platform 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 | |
---|