version ${base_version}-20
description URL extractor/launcher
long_description Urlview is a screen-oriented program for extracting \
URLs from text files. It displays a menu from which \
you can launch a command to view a specific item.
distname ${name}_${base_version}.orig
worksrcdir ${name}-${base_version}.orig
homepage http://packages.debian.org/unstable/misc/urlview
master_sites http://ftp.debian.org/debian/pool/main/u/urlview/
set dist_file ${distname}${extract.suffix}
set diff_file ${name}_${version}.diff.gz
rmd160 374583c3eaf1d515c974b0985f1cbc2c0bc0a97f \
sha256 746ff540ccf601645f500ee7743f443caf987d6380e61e5249fc15f7a455ed42 \
rmd160 fce98a352bbaf7835afba04c794eee3c471113fa \
sha256 0707956fd7195aefe6d6ff2eaabe8946e3d18821a1ce97c0f48d0f8d6e37514e
patch_sites ${master_sites}
livecheck.url ${master_sites}/?C=M&O=D
livecheck.regex ${name}_(\[-0-9.\]+)\\.diff
# ${destroot} must be used as Makefile.am doesn't take DESTDIR
# into account for the man page installation (this is a bug).
configure.args --mandir=${destroot}${prefix}/share/man
# The url_handler.sh script is for Linux. As the Mac OS X "open" command
# (which doesn't exist under Linux) does exactly what url_handler.sh is
# supposed to do, let's use it instead.
reinplace "s|/etc/urlview/url_handler.sh|open|g" \
${worksrcpath}/urlview.c ${worksrcpath}/urlview.man
reinplace "s|/etc/urlview/system.urlview|${prefix}/etc/urlview.conf|g" \
${worksrcpath}/urlview.c ${worksrcpath}/urlview.man
reinplace "s|url_handler.sh|open|g" ${worksrcpath}/sample.urlview
file mkdir "${destroot}${prefix}/share/doc/${name}"
xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING ChangeLog README \
sample.urlview "${destroot}${prefix}/share/doc/${name}"