Ticket #36949: port-todotxt.diff

File port-todotxt.diff, 992 bytes (added by anddam (Andrea D'Amore), 12 years ago)
  • Portfile

     
    2626
    2727destroot {
    2828    xinstall -m 755 ${worksrcpath}/todo.sh ${destroot}${prefix}/bin/$name
    29     xinstall -m 644 ${worksrcpath}/todo.cfg ${destroot}${prefix}/etc/todo.cfg-dist
     29    xinstall -d -m 755 ${destroot}${prefix}/share/${name}
     30    xinstall -m 644 ${worksrcpath}/todo.cfg ${destroot}${prefix}/share/${name}/todo.cfg-dist
    3031}
    3132
    32 notes "
    33 You will need to copy and then edit the default configuration\
    34 (${prefix}/etc/todo.cfg-dist) in your home directory.
    35 "
     33patch {
     34    # default cfg will try to write in $prefix/bin, since this isn't obvious from the config
     35    # file we help the user avoiding this
     36    reinplace "s|TODO_DIR=`dirname \"\$0\"`|TODO_DIR=\"\$HOME\"/.todo|" ${worksrcpath}/todo.cfg
     37}
     38
     39notes "Copy the default configuration file from  ${prefix}/etc/todo.cfg-dist \
     40to  ~/.todo/config  and customize it."