1 | # $Id: Portfile 79396 2011-06-12 22:00:31Z deric@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup python 1.0 |
---|
5 | |
---|
6 | name py-django |
---|
7 | version 1.3.1 |
---|
8 | python.versions 24 25 26 27 |
---|
9 | categories-append www |
---|
10 | platforms darwin |
---|
11 | maintainers deric |
---|
12 | homepage http://www.djangoproject.com |
---|
13 | description Django is a high-level Python Web framework |
---|
14 | long_description Django is a high-level Python Web framework that \ |
---|
15 | encourages rapid development and clean, pragmatic \ |
---|
16 | design. |
---|
17 | |
---|
18 | set branch [join [lrange [split ${version} .] 0 1] .] |
---|
19 | master_sites http://media.djangoproject.com/releases/${branch}/ |
---|
20 | distname Django-${version} |
---|
21 | checksums rmd160 baf14da8d25eb9852a7989e1a1be7d9fd0e21d3a \ |
---|
22 | sha256 af9118c4e8a063deb0b8cda901fcff2b805e7cf496c93fd43507163f3cde156b |
---|
23 | |
---|
24 | depends_lib-append port:py${python.version}-distribute |
---|
25 | |
---|
26 | variant bash_completion { |
---|
27 | depends_run-append port:bash-completion |
---|
28 | |
---|
29 | post-patch { |
---|
30 | reinplace "s|django-admin.py|django-admin-${python.branch}.py|g" \ |
---|
31 | ${worksrcpath}/extras/django_bash_completion |
---|
32 | } |
---|
33 | |
---|
34 | post-destroot { |
---|
35 | xinstall -d ${destroot}${prefix}/etc/bash_completion.d |
---|
36 | xinstall -m 644 ${worksrcpath}/extras/django_bash_completion \ |
---|
37 | ${destroot}${prefix}/etc/bash_completion.d/django-admin-${python.branch}.py |
---|
38 | } |
---|
39 | } |
---|
40 | |
---|
41 | # we want *-2.7.py not *.py-2.7 |
---|
42 | python.link_binaries no |
---|
43 | post-destroot { |
---|
44 | set docdir ${prefix}/share/doc/${subport} |
---|
45 | xinstall -d ${docdir} |
---|
46 | xinstall -m 644 -W ${worksrcpath} AUTHORS INSTALL LICENSE README \ |
---|
47 | ${destroot}${docdir} |
---|
48 | |
---|
49 | file copy ${worksrcpath}/docs ${destroot}${docdir}/docs |
---|
50 | |
---|
51 | # To avoid conflict between py*-django |
---|
52 | ln -s ${python.prefix}/bin/django-admin.py \ |
---|
53 | ${destroot}${prefix}/bin/django-admin-${python.branch}.py |
---|
54 | } |
---|
55 | |
---|
56 | livecheck.type regex |
---|
57 | livecheck.url http://www.djangoproject.com/download/ |
---|
58 | livecheck.regex "The latest official version is (1\.\[0-9\]+\.\[0-9\]+)" |
---|
59 | |
---|