source: trunk/dports/python/py-django/Portfile @ 92554

Last change on this file since 92554 was 92554, checked in by deric@…, 5 years ago

py-django: allow bash-completion-devel to satisfy bash-completion dependency.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 92554 2012-05-01 07:36:50Z deric@macports.org $
3
4PortSystem          1.0
5PortGroup           python 1.0
6
7name                py-django
8version             1.4
9categories-append   www
10platforms           darwin
11maintainers         deric
12homepage            http://www.djangoproject.com
13description         Django is a high-level Python Web framework
14long_description    Django is a high-level Python Web framework that \
15                    encourages rapid development and clean, pragmatic \
16                    design.
17
18set branch          [join [lrange [split ${version} .] 0 1] .]
19master_sites        https://www.djangoproject.com/m/releases/${branch}/
20distname            Django-${version}
21checksums           md5     ba8e86198a93c196015df0b363ab1109 \
22                    sha1    acc0b854bfbda29c74c1f818323139cf18b38eeb \
23                    rmd160  6c015864335264ad3d9497bda8e828a436fbc800
24
25python.versions     25 26 27
26python.default_version 27
27
28if {${subport} != ${name}} {
29
30    depends_lib-append  port:py${python.version}-distribute
31
32    variant bash_completion {
33        depends_run-append path:etc/bash_completion:bash-completion
34
35        post-patch {
36            reinplace "s|django-admin.py|django-admin-${python.branch}.py|g" \
37                ${worksrcpath}/extras/django_bash_completion
38        }
39
40        post-destroot {
41            xinstall -d ${destroot}${prefix}/etc/bash_completion.d
42            xinstall -m 644 ${worksrcpath}/extras/django_bash_completion \
43                ${destroot}${prefix}/etc/bash_completion.d/django-admin-${python.branch}.py
44        }
45    }
46
47    # we want *-${python.branch}.py not *.py-${python.branch}
48    python.link_binaries no
49    post-destroot   {
50        xinstall -m 644 -W ${worksrcpath} AUTHORS INSTALL LICENSE README \
51            ${destroot}${prefix}/share/doc/${subport}
52
53        file copy ${worksrcpath}/docs ${destroot}${prefix}/share/doc/${subport}/docs
54
55        # To avoid conflict between py*-django
56        ln -s ${python.prefix}/bin/django-admin.py \
57            ${destroot}${prefix}/bin/django-admin-${python.branch}.py
58    }
59}
60
61livecheck.type      regex
62livecheck.url       http://www.djangoproject.com/download/
63livecheck.regex     "The latest official version is (1\.\[0-9\]+\.\[0-9\]+)"
64
Note: See TracBrowser for help on using the repository browser.