Files
gerrit/lib/codemirror/BUCK
Shawn Pearce d251f3a0ed Move codemirror LICENSE onto the codemirror java_library()
This fixes the name shown in the generated licenses.txt and HTML
to be "codemirror" and not "codemirror_jar".

Change-Id: Ib90d97c022c69179943dfa827f68e62fcea87825
2013-05-29 16:39:57 -07:00

42 lines
955 B
Python

VERSION = '3.13'
SHA1 = '7a83ae686d75afd30bb152d7683f2dc27e59ea82'
URL = 'http://codemirror.net/codemirror-%s.zip' % VERSION
prebuilt_jar(
name = 'codemirror',
binary_jar = genfile('codemirror.jar'),
deps = [
':jar',
'//lib:LICENSE-codemirror',
],
visibility = ['PUBLIC'],
)
# TODO(sop) Repackage by license boundaries.
# TODO(sop) Minify with Closure JS compiler.
genrule(
name = 'jar',
cmd = ';'.join([
'cd $TMP',
'mkdir net META-INF',
'unzip -d net $SRCS',
'mv net/codemirror-%s net/codemirror' % VERSION,
'echo "Manifest-Version: 1.0" >META-INF/MANIFEST.MF',
'zip -r $OUT *'
]),
srcs = [genfile('codemirror-' + VERSION + '.zip')],
deps = [':download'],
out = 'codemirror.jar',
)
genrule(
name = 'download',
cmd = '${//tools:download_file}' +
' -o $OUT' +
' -u ' + URL +
' -v ' + SHA1,
srcs = [],
deps = ['//tools:download_file'],
out = 'codemirror-' + VERSION + '.zip',
)