pkg:setup
inreplace "auxprogs/Makefile", "cd bam2wig; make;", "#cd bam2wig; make;"
inreplace "auxprogs/bam2hints/Makefile", "INCLUDES = /usr/include/bamtools", "INCLUDES = #{Formula["bamtools"].include/"bamtools"}"
inreplace "auxprogs/filterBam/src/Makefile", "BAMTOOLS = /usr/include/bamtools", "BAMTOOLS= #{Formula["bamtools"].include/"bamtools"}"
inreplace "Makefile", %r{ln -sf.*/usr/local/bin/}, "#ln -sf"
make clean
make
make DESTDIR=${PKG_DEST} install INSTALLDIR=${PKG_TAPF}
bin.env_script_all_files libexec/"bin", :AUGUSTUS_CONFIG_PATH => prefix/"config"