<commit_before>#! /bin/bash

###############################################################################
#
#                           The Cling Interpreter
#
# Cling Packaging Tool (CPT)
#
# tools/packaging/debian/debianize.sh: Helper script to produce Debian packages
# for Ubuntu/Debian platforms.
#
# Author: <NAME> <<EMAIL>>
#
# This file is dual-licensed: you can choose to license it under the University
# of Illinois Open Source License or the GNU Lesser General Public License. See
# LICENSE.TXT for details.
#
###############################################################################

# Uncomment the following line to trace the execution of the shell commands
# set -o xtrace

function tarball_deb {
  echo "Compressing ${prefix} to produce a bzip2 tarball..."
  cd ${workdir}
  tar -cjvf cling_${VERSION}.orig.tar.bz2 -C . $(basename ${prefix})
}

function debianize {
  cd ${prefix}
  echo "Create directory: debian"
  mkdir -p debian

  echo "Create file: debian/source/format"
  mkdir -p debian/source
  echo "3.0 (quilt)" > debian/source/format

  echo "Create file: debian/cling.install"
  cat >> debian/cling.install << EOF
bin/* /usr/bin
docs/* /usr/share/doc
include/* /usr/include
lib/* /usr/lib
share/* /usr/share
EOF

  echo "Create file: debian/compact"
  # Optimize binary compression
  echo "7" > debian/compact

  echo "Create file: debian/compat"
  echo "9" > debian/compat

  echo "Create file: debian/control"
  cat >> debian/control << EOF
Source: cling<commit_msg>Override Lintian tag: source-is-missing<commit_after>#! /bin/bash

###############################################################################
#
#                           The Cling Interpreter
#
# Cling Packaging Tool (CPT)
#
# tools/packaging/debian/debianize.sh: Helper script to produce Debian packages
# for Ubuntu/Debian platforms.
#
# Author: <NAME> <<EMAIL>>
#
# This file is dual-licensed: you can choose to license it under the University
# of Illinois Open Source License or the GNU Lesser General Public License. See
# LICENSE.TXT for details.
#
###############################################################################

# Uncomment the following line to trace the execution of the shell commands
# set -o xtrace

function tarball_deb {
  echo "Compressing ${prefix} to produce a bzip2 tarball..."
  cd ${workdir}
  tar -cjvf cling_${VERSION}.orig.tar.bz2 -C . $(basename ${prefix})
}

function debianize {
  cd ${prefix}
  echo "Create directory: debian"
  mkdir -p debian

  mkdir -p debian/source
  echo "Create file: debian/source/format"
  echo "3.0 (quilt)" > debian/source/format

  echo "Create file: debian/source/lintian-overrides"
  cat >> debian/source/lintian-overrides << EOF
cling source: source-is-missing
EOF
  echo "Create file: debian/cling.install"
  cat >> debian/cling.install << EOF
bin/* /usr/bin
docs/* /usr/share/doc
include/* /usr/include
lib/* /usr/lib
share/* /usr/share
EOF

  echo "Create file: debian/compact"
  # Optimize binary compression
  echo "7" > debian/compact

  echo "Create file: debian/compat"
  echo "9" > debian/compat

  echo "Create file: debian/control"
  cat >> debian/control << EOF
Source: cling
{'fraction_non_alphanumeric': 0.20295783511642543, 'fraction_numerical': 0.003775959723096287, 'mean_word_length': 3.944012441679627, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3381004', 'n_tokens_mistral': 1006, 'n_tokens_neox': 922, 'n_words': 313}