local git_ref = '1.0'
local modrev = git_ref
local specrev = '1'

local repo_url = 'https://www.ctan.org/pkg/jknappen'

rockspec_format = '3.0'
package = 'jknappen'
version = modrev .. '-' .. specrev

description = {
  summary = 'Miscellaneous packages by Joerg Knappen',
  detailed =
  [[Miscellaneous macros by Jörg Knappen, including:

    represent counters in greek;
    Maxwell's non-commutative division;
    latin1jk, latin2jk and latin3jk, which are their inputenc definition files that allow verbatim input in the respective ISO Latin codes;
    blackboard bold fonts in maths;
    use of RSFS fonts in maths;
    extra alignments for \parboxes;
    swap Roman and Sans fonts;
    transliterate semitic languages;
    patches to make (La)TeX formulae embeddable in SGML;
    use maths "minus" in text as appropriate;
    simple Young tableaux.]],
  labels = { 'Underline', 'Emphasis' },
  homepage = repo_url,
  license = 'LPPL-1.3c'
}

source = {
  url = "https://github.com/ustctug/texrocks/releases/download/0.0.1/jknappen.zip",
  dir = 'jknappen'
}

if modrev == 'scm' or modrev == 'dev' then
  source = {
    url = 'https://mirrors.ctan.org/macros/latex/contrib/jknappen.zip',
    dir = 'jknappen'
  }
end

build = {
  type = 'none',
  install = {
    conf = {
      ['../tex/latex/jknappen/greekctr.sty'] = 'greekctr.sty',
      ['../doc/latex/jknappen/holtpolt.sty'] = 'holtpolt.sty',
      ['../doc/latex/jknappen/latin1jk.def'] = 'latin1jk.def',
      ['../doc/latex/jknappen/latin2jk.def'] = 'latin2jk.def',
      ['../doc/latex/jknappen/latin3jk.def'] = 'latin3jk.def',
      ['../doc/latex/jknappen/mathbbol.rme'] = 'mathbbol.rme',
      ['../doc/latex/jknappen/mathbbol.sty'] = 'mathbbol.sty',
      ['../doc/latex/jknappen/mathrsfs.rme'] = 'mathrsfs.rme',
      ['../doc/latex/jknappen/mathrsfs.sty'] = 'mathrsfs.sty',
      ['../doc/latex/jknappen/parboxx.sty'] = 'parboxx.sty',
      ['../doc/latex/jknappen/sans.sty'] = 'sans.sty',
      ['../doc/latex/jknappen/semtrans.sty'] = 'semtrans.sty',
      ['../doc/latex/jknappen/sgmlcmpt.sty'] = 'sgmlcmpt.sty',
      ['../doc/latex/jknappen/smartmn.sty'] = 'smartmn.sty',
      ['../doc/latex/jknappen/tccompat.sty'] = 'tccompat.sty',
      ['../doc/latex/jknappen/ubbold.fd'] = 'ubbold.fd',
      ['../doc/latex/jknappen/ursfs.fd'] = 'ursfs.fd',
      ['../doc/latex/jknappen/ustmary.fd'] = 'ustmary.fd',
      ['../doc/latex/jknappen/young.sty'] = 'young.sty',
    }
  }
}
