source: trunk/dports/www/duckytool/Portfile

Last change on this file was 129695, checked in by larryv@…, 3 years ago

duckytool: Switch from Python 2.5 to 2.7

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.4 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 129695 2014-12-18 23:00:32Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           python 1.0
6
7name                duckytool
8version             0.9.6
9revision            1
10categories          www net python
11platforms           darwin
12supported_archs     noarch
13license             MIT PSF BSD
14maintainers         ecronin openmaintainer
15description         ducky is ... well, the web's command line.
16long_description    ducky marries a bunch of web service APIs into \
17                    one tool, conventiently callable from the command \
18                    line. search the web without using a browser.
19homepage            http://monkey.org/~jose/wiki/doku.php?id=wiki:duckytool
20
21distname            ducky-${version}
22master_sites        http://monkey.org/~jose/software/ducky/
23checksums           md5 e0d0675ef1bf822e96e38d8fa1eaf98c\
24                    sha1 269c828ae75b0ea532b2dfbf4fbbcd0198316660
25
26python.default_version 27
27
28livecheck.type      regex
29livecheck.url       ${homepage}
30livecheck.regex     ducky-(\[0-9\\\.\]+)\\\.tar\\\.gz
31
32post-patch {
33        reinplace "s|ln -s ducky.py |ln -s ducky.py ${destroot}${prefix}/bin/|" ${worksrcpath}/Makefile
34        reinplace "s|/usr/bin/env python|${python.bin}|" ${worksrcpath}/ducky.py
35        reinplace "s|packages=\\\[ 'DuckyLib'|packages=\\\[ 'DuckyLib', 'DuckyLib.yahoo', 'DuckyLib.yahoo.search'|" ${worksrcpath}/setup.py
36}
37
38post-destroot {
39        xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
40        xinstall -m 0644 ${worksrcpath}/README ${destroot}${prefix}/share/doc/${name}/README
41        xinstall -m 0755 ${worksrcpath}/ducky.py ${destroot}${prefix}/bin/
42        if [variant_isset links] {
43            system "cd '${worksrcpath}' && make links"
44        }
45}
46
47post-activate {
48        ui_msg "  ====================================================="
49        ui_msg "    For full functionality, make sure you install web"
50        ui_msg "    service API keys in your home directory.  See"
51        ui_msg "        ${prefix}/share/doc/${name}/README"
52        ui_msg "    for instructions."
53        ui_msg "  ====================================================="
54}
55
56# this variant creates symlinks like 'g', 'fl'...
57variant links \
58    description {Create symlinks for each command (e.g. 'g' instead of 'ducky.pl g'} {
59        # placeholder, see destroot
60}
Note: See TracBrowser for help on using the repository browser.