# -*- 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
PortGroup haskell_stack 1.0
homepage https://github.com/essandess/adblock2privoxy
description Convert adblock config files to privoxy format
long_description ${description}. \
AdBlock Plus browser plugin has great block list files \
provided by big community, but it is client software and \
cannot work on a server as proxy. Privoxy proxy has good \
potential to block ads at server side, but it experiences \
acute shortage of updated block lists. This software \
converts adblock lists to privoxy config files format. \
Almost all adblock features are supported including \
block/unblock requests (on privoxy) all syntax features \
are supported except for regex templates matching host \
name hide/unhide page elements (via CSS) all syntax \
features are supported all block request options except \
for outdated ones: Supported: script, image, stylesheet, \
object, xmlhttprequest, object-subrequest, subdocument, \
document, elemhide, other, popup, third-party, domain=..., \
master_sites https://hackage.haskell.org/package/${name}-${version}
checksums rmd160 301ba12cb3c624eaca766400972818b79b52adce \
sha256 064f501995eef83146ed49ccf83856faee8ab7e6e1fd70013d8bb1e12a3a1411 \
description {Initialize all configuration files. Existing
configurations files are not overwritten by default.} {}
# relative paths to ${prefix}
set ab2p_datadir share/${name}
# Fix for cabal data-files hardcoded path in binary
# https://github.com/commercialhaskell/stack/issues/848
# https://github.com/commercialhaskell/stack/issues/4857
# https://github.com/haskell/cabal/issues/462
# https://github.com/haskell/cabal/issues/3586
xinstall -m 0644 -W ${worksrcpath} \
${filespath}/Paths_${name}.hs ./src
reinplace "s|@PREFIX@|${prefix}|g" \
${worksrcpath}/src/Paths_${name}.hs