source: trunk/dports/sysutils/zeroinstall-injector/Portfile

Last change on this file was 100337, checked in by g5pw@…, 5 years ago

multiple:

fix py-pygtk dependencies and revbump.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
1# $Id: Portfile 100337 2012-12-08 18:02:05Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name            zeroinstall-injector
6version         1.7
7revision        5
8platforms       darwin freebsd linux
9categories      sysutils
10license         LGPL
11maintainers     afb
12description     The Zero Install Injector (0launch)
13long_description \
14The Zero Install Injector makes it easy for users to install software without \
15needing root privileges. It takes the URL of a program and runs it (downloading \
16it first if necessary). Any dependencies of the program are fetched in the same \
17way. The user controls which version of the program and its dependencies to \
18use.
19
20homepage        http://0install.net
21master_sites    sourceforge
22master_sites.mirror_subdir      zero-install
23use_bzip2       yes
24checksums       md5 23e2adf699c52f8cdfbb7ad07d6c5568 \
25                sha1 eabe6d1284522be4a5c2675807646f247a33ffac \
26                rmd160 46ac65794f57146afed45582d4ff43f05ffe5bb9
27
28depends_lib     bin:gpg:gnupg
29depends_run     bin:sudo:sudo
30
31set python.branch       2.x
32set python.bin          ${prefix}/bin/python
33
34variant python26 conflicts python27 description "use python 2.6" {
35depends_lib-append      port:python26
36depends_run-append      port:py26-pygtk
37
38set python.branch       2.6
39set python.bin          ${prefix}/bin/python${python.branch}
40}
41
42variant python27 conflicts python26 description "use python 2.7" {
43depends_lib-append      port:python27
44depends_run-append      port:py27-pygtk
45
46set python.branch       2.7
47set python.bin          ${prefix}/bin/python${python.branch}
48}
49
50if {![variant_isset python26]} {
51        default_variants +python27
52}
53
54post-patch   {
55        reinplace "s|'man/man1'|'share/man/man1'|" ${worksrcpath}/setup.py
56        reinplace "s|local_0launch,|'${python.bin}', local_0launch,|" ${worksrcpath}/tests/testrun.py
57}
58
59use_configure   no
60supported_archs noarch
61
62pre-build {
63build.cmd       ${python.bin} setup.py
64build.target            build
65}
66
67pre-destroot {
68destroot.cmd    ${python.bin} setup.py
69destroot.destdir        --prefix=${prefix} --skip-build --root=${destroot}
70}
71
72post-destroot   {
73        reinplace "s|/usr/bin/env python|${python.bin}|" \
74                  ${destroot}${prefix}/lib/python${python.branch}/site-packages/zeroinstall/0launch-gui/0launch-gui
75
76        # move site-packages to wherever python is looking for it
77        file mkdir ${destroot}[exec ${python.bin} -c "from distutils.sysconfig import get_python_lib; import os; print os.path.dirname(get_python_lib())"]
78        file rename ${destroot}${prefix}/lib/python${python.branch}/site-packages \
79                    ${destroot}[exec ${python.bin} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"]
80}
81
82pre-test {
83test.run        yes
84test.cmd        ${python.bin}
85test.dir        ${worksrcpath}/tests
86test.target     testall.py
87}
88
89livecheck.name  zero-install
90livecheck.distname      injector
Note: See TracBrowser for help on using the repository browser.