Ticket #56080: Portfile

File Portfile, 2.8 KB (added by gaming-hacker (G Alexander), 7 years ago)

java 1

Line 
1# -*- coding: utf-8; mode: _tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2
2
3PortSystem 1.0
4
5name            android
6version 3859397
7
8categories        java devel emulators
9maintainers       nomaintainer
10license             Apache-2
11platforms           darwin
12description         Android SDK
13long_description  The Android SDK allows development \
14                  for the Android mobile platform.
15supported_archs     noarch
16
17set sdk     sdk-tools-darwin-${version}.zip
18
19homepage             https://developer.android.com/
20master_sites    https://dl.google.com/android/repository
21
22use_zip yes
23extract.mkdir     yes
24
25worksrcdir    android-sdk-${version}
26distname      sdk-tools-darwin-${version}
27
28checksums   sha256  4a81754a760fce88cba74d69c364b05b31c53d57b26f9f82355c61d5fe4b9df9 \
29size    86182133 \
30 rmd160  f2348a9afaf1ad2fd3f9f467f55ef7082de92e26
31
32use_configure       no
33build.cmd           true
34
35destroot.keepdirs                                               \
36    ${destroot}${prefix}/share/java/${worksrcdir}/add-ons       \
37    ${destroot}${prefix}/share/java/${worksrcdir}/docs          \
38    ${destroot}${prefix}/share/java/${worksrcdir}/platforms     \
39    ${destroot}${prefix}/share/java/${worksrcdir}/samples       \
40    ${destroot}${prefix}/share/java/${worksrcdir}/temp
41
42post-extract {
43        system "unzip -q ${distpath}/${distname} -d ${workpath}"
44}
45
46destroot {
47    xinstall -m 755 -d ${destroot}${prefix}/share/java/${distname}
48
49    # file copy can not copy with rename and directory tree.
50    #
51    system "cp -r ${worksrcpath}/. ${destroot}${prefix}/share/java/${distname}/."
52
53    xinstall -m 770 -d ${destroot}${prefix}/share/java/${distname}/docs
54    xinstall -m 770 -d ${destroot}${prefix}/share/java/${distname}/samples
55    xinstall -m 770 -d ${destroot}${prefix}/share/java/${distname}/temp
56
57    system "
58        chgrp -R _developer ${destroot}${prefix}/share/java/${distname};
59        chmod -R g+w ${destroot}${prefix}/share/java/${distname};
60    "
61
62    ui_info "####################################################################"
63    ui_info "# add-ons, docs, platforms, samples and temp have been made        #"
64    ui_info "# group _developer writable. You need to be member of the          #"
65    ui_info "# _developer group to use the android tools. If you are not use:   #"
66    ui_info "#                                                                  #"
67    ui_info "# sudo dscl . append /Groups/_developer GroupMembership <username> #"
68    ui_info "####################################################################"
69    ui_info "# you need to download the actual SDKs. Because of the licence     #"
70    ui_info "# querys this can not be done automaticaly. Use:                   #"
71    ui_info "#                                                                  #"
72    ui_info "# @PREFIX@/share/java/android-sdk-macosx/tools/android update sdk  #"
73    ui_info "####################################################################"
74}
75notes "
76${distname} has been made group _developer writable
77set ANDROID_SDK to ${prefix}/share/java/sdk-tools-darwin-${version}??
78"
79
80livecheck.type      none