1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name plowshare |
---|
7 | version 20120930 |
---|
8 | categories net www |
---|
9 | maintainers technopragmatics.org:kchr |
---|
10 | platforms darwin |
---|
11 | license GPL-3 |
---|
12 | |
---|
13 | master_sites googlecode |
---|
14 | distname ${name}-snapshot-git${version} |
---|
15 | checksums sha1 d8272d2a325764f855d77158e0ed35e70d9d1968 |
---|
16 | extract.suffix .tar.gz |
---|
17 | |
---|
18 | homepage https://code.google.com/p/plowshare |
---|
19 | description Download and upload files from file sharing websites |
---|
20 | long_description ${name} is a command-line (CLI) download/upload tool for \ |
---|
21 | popular file sharing websites (aka file hosting provider \ |
---|
22 | or One-Click hoster). With plowshare, you will be able \ |
---|
23 | to download or upload files and manage remote folders \ |
---|
24 | and link deletion. The basic concept is that files can \ |
---|
25 | be downloaded and uploaded though command line as easily \ |
---|
26 | as wget (or curl).\ |
---|
27 | \n\nSupported sites include:\ |
---|
28 | Mediafire, Rapidshare, Sendspace, Zippyshare, Oron, Bayfiles \ |
---|
29 | and more than 30 others. New sites are added continually and \ |
---|
30 | the module framework allows you to easily write your own. |
---|
31 | |
---|
32 | |
---|
33 | depends_run port:bash \ |
---|
34 | port:coreutils \ |
---|
35 | port:grep \ |
---|
36 | port:gsed \ |
---|
37 | port:getopt \ |
---|
38 | port:recode \ |
---|
39 | port:tesseract \ |
---|
40 | port:ImageMagick \ |
---|
41 | port:spidermonkey |
---|
42 | |
---|
43 | |
---|
44 | |
---|
45 | fetch.type standard |
---|
46 | |
---|
47 | post-patch { |
---|
48 | # Make sure we are using a sane version of bash |
---|
49 | # (from ports, not Apple) |
---|
50 | set pat "s|#!/bin/bash|#!${prefix}/bin/bash|" |
---|
51 | reinplace $pat ${worksrcpath}/src/core.sh \ |
---|
52 | ${worksrcpath}/src/delete.sh \ |
---|
53 | ${worksrcpath}/src/download.sh \ |
---|
54 | ${worksrcpath}/src/list.sh \ |
---|
55 | ${worksrcpath}/src/upload.sh |
---|
56 | } |
---|
57 | |
---|
58 | |
---|
59 | # Set correct prefix for plowshare Makefile |
---|
60 | destroot.post_args PREFIX=${destroot}${prefix} |
---|
61 | |
---|
62 | # No need to configure or compile |
---|
63 | use_configure no |
---|
64 | build {} |
---|
65 | |
---|
66 | # Cleanup |
---|
67 | post-destroot { |
---|
68 | # List of files that has been symlinked |
---|
69 | # to BINDIR during destroot, by Makefile |
---|
70 | set files { |
---|
71 | {{download.sh} {plowdown}} |
---|
72 | {{upload.sh} {plowup}} |
---|
73 | {{delete.sh} {plowdel}} |
---|
74 | {{list.sh} {plowlist}} |
---|
75 | } |
---|
76 | # Loop through and re-link files from new destination |
---|
77 | set i -1 |
---|
78 | set datadir ${prefix}/share/${name} |
---|
79 | foreach trans $files { |
---|
80 | incr i |
---|
81 | foreach { src target } $trans { |
---|
82 | try { delete "${destroot}${prefix}/bin/${target}" } |
---|
83 | ln -sf "${datadir}/${src}" "${destroot}${prefix}/bin/${target}" |
---|
84 | } |
---|
85 | } |
---|
86 | } |
---|