<commit_before>class Proxmark3 < Formula
  desc "Proxmark3 client, CDC flasher, HID flasher and firmware bundle"
  homepage "http://www.proxmark.org"
  url "https://github.com/proxmark/proxmark3/archive/v3.0.1.tar.gz"
  sha256 "bace0dd34e35923bfd926cf0943e615a00b2588bb958a13afde3fd46cd34a821"
  head "https://github.com/proxmark/proxmark3.git"

  depends_on "automake" => :build
  depends_on "readline"
  depends_on "p7zip" => :build
  depends_on "libusb"
  depends_on "libusb-compat"
  depends_on "pkg-config" => :build
  depends_on "wget"
  depends_on "qt5"
  depends_on "perl"
  depends_on "proxmark/proxmark3/arm-none-eabi-gcc" => :build

  def install
    ENV.deparallelize

#    system "make", "-C", "client/hid-flasher/"
    system "make", "clean"      
    system "make", "all"
    
    bin.mkpath
    bin.install "client/flasher" => "proxmark3-flasher"
#    bin.install "client/hid-flasher/flasher" => "proxmark3-hid-flasher"
    bin.install "client/proxmark3" => "proxmark3"
    bin.install "client/fpga_compress" => "fpga_compress"

    # default keys
    bin.install "client/default_keys.dic" => "default_keys.dic"
    bin.install "client/default_pwd.dic" => "default_pwd.dic"

    # hardnested files
    (bin/"hardnested/tables").mkpath
    (bin/"hardnested").install "client/hardnested/bf_bench_data.bin"
    (bin/"hardnested/tables").install Dir["client/hardnested/tables/*"]

    # lua libs for proxmark3 scripts
    (bin/"lualibs").mkpath
    (bin/"lualibs").install Dir["client/lualibs/*"]

    # lua scripts
    (bin/"scripts").mkpath
    (bin/"scripts").install Dir["client/scripts/*"]

    # trace files for experimentations
    (bin/"traces").mkpath
    (bin/"traces").install Dir["traces/*"]
    
    # emv public keys file
    (bin/"emv").mkpath
    (bin/"emv").install "client/emv/capk.txt"

    share.mkpath
    # compiled firmware for flashing
    (share/"firmware").mkpath<commit_msg>fix issue #17<commit_after>class Proxmark3 < Formula
  desc "Proxmark3 client, CDC flasher, HID flasher and firmware bundle"
  homepage "http://www.proxmark.org"
  url "https://github.com/proxmark/proxmark3/archive/v3.0.1.tar.gz"
  sha256 "bace0dd34e35923bfd926cf0943e615a00b2588bb958a13afde3fd46cd34a821"
  head "https://github.com/proxmark/proxmark3.git"

  depends_on "automake" => :build
  depends_on "readline"
  depends_on "p7zip" => :build
  depends_on "libusb"
  depends_on "libusb-compat"
  depends_on "pkg-config" => :build
  depends_on "wget"
  depends_on "qt5"
  depends_on "perl"
  depends_on "proxmark/proxmark3/arm-none-eabi-gcc" => :build

  def install
    ENV.deparallelize

#    system "make", "-C", "client/hid-flasher/"
    system "make", "clean"      
    system "make", "all"
    
    bin.mkpath
    bin.install "client/flasher" => "proxmark3-flasher"
#    bin.install "client/hid-flasher/flasher" => "proxmark3-hid-flasher"
    bin.install "client/proxmark3" => "proxmark3"
    bin.install "client/fpga_compress" => "fpga_compress"

    # default keys
    bin.install "client/default_keys.dic" => "default_keys.dic"
    bin.install "client/default_pwd.dic" => "default_pwd.dic"

    # hardnested files
    (bin/"hardnested/tables").mkpath
    (bin/"hardnested").install "client/hardnested/bf_bench_data.bin"
    (bin/"hardnested/tables").install Dir["client/hardnested/tables/*"]

    # lua libs for proxmark3 scripts
    (bin/"lualibs").mkpath
    (bin/"lualibs").install Dir["client/lualibs/*"]

    # lua scripts
    (bin/"scripts").mkpath
    (bin/"scripts").install Dir["client/scripts/*"]

    # trace files for experimentations
    (bin/"traces").mkpath
    (bin/"traces").install Dir["traces/*"]
    
    # emv public keys file
    if File.exist?("client/emv/capk.txt") then
      (bin/"emv").mkpath
      (bin/"emv").install "client/emv/capk.txt"
    end

    share.mkpath
    # compiled firmware for flashing
    (share/"firmware").mkpath
{'fraction_non_alphanumeric': 0.14774774774774774, 'fraction_numerical': 0.02882882882882883, 'mean_word_length': 3.5771495877502946, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2700746', 'n_tokens_mistral': 1521, 'n_tokens_neox': 1469, 'n_words': 243}