diff options
author | Shawn Pearce <sop@google.com> | 2016-01-03 13:22:57 -0500 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org <gerrit@eclipse.org> | 2016-01-03 13:22:59 -0500 |
commit | af36abd02f235e09d9c49cc5721e2cedba80c079 (patch) | |
tree | 0614826949c9ed5a03b2e9e4ddb92275477f8498 /org.eclipse.jgit.pgm | |
parent | 91a3f1747460e71ef310d9d989b3deea1226336a (diff) | |
parent | 776c3003aa0f6d66f222c2d74d86a59cf9f8fe98 (diff) | |
download | jgit-af36abd02f235e09d9c49cc5721e2cedba80c079.tar.gz jgit-af36abd02f235e09d9c49cc5721e2cedba80c079.zip |
Merge "buck: set Bundle-Version for :jgit_bin"
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r-- | org.eclipse.jgit.pgm/BUCK | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/org.eclipse.jgit.pgm/BUCK b/org.eclipse.jgit.pgm/BUCK index d99c39d031..edcf2fc28f 100644 --- a/org.eclipse.jgit.pgm/BUCK +++ b/org.eclipse.jgit.pgm/BUCK @@ -1,3 +1,5 @@ +include_defs('//tools/git.defs') + java_library( name = 'pgm', srcs = glob(['src/**']), @@ -27,8 +29,14 @@ genrule( genrule( name = 'jgit', - cmd = 'cat $SRCDIR/jgit.sh $(location :jgit_jar) >$OUT;' + - 'chmod a+x $OUT', + cmd = ''.join([ + 'mkdir $TMP/META-INF &&', + 'cp $(location :binary_manifest) $TMP/META-INF/MANIFEST.MF &&', + 'cp $(location :jgit_jar) $TMP/jgit.jar &&', + 'cd $TMP && zip $TMP/jgit.jar META-INF/MANIFEST.MF &&', + 'cat $SRCDIR/jgit.sh $TMP/jgit.jar >$OUT &&', + 'chmod a+x $OUT', + ]), srcs = ['jgit.sh'], out = 'jgit', visibility = ['PUBLIC'], @@ -36,10 +44,27 @@ genrule( java_binary( name = 'jgit_jar', - main_class = 'org.eclipse.jgit.pgm.Main', deps = [ ':pgm', '//lib:slf4j-simple', '//lib:tukaani-xz', ], + blacklist = [ + 'META-INF/DEPENDENCIES', + 'META-INF/maven/.*', + ], +) + +genrule( + name = 'binary_manifest', + cmd = ';'.join(['echo "%s: %s" >>$OUT' % e for e in [ + ('Manifest-Version', '1.0'), + ('Main-Class', 'org.eclipse.jgit.pgm.Main'), + ('Bundle-Version', git_version()), + ('Implementation-Title', 'JGit Command Line Interface'), + ('Implementation-Vendor', 'Eclipse.org - JGit'), + ('Implementation-Vendor-URL', 'http://www.eclipse.org/jgit/'), + ('Implementation-Vendor-Id', 'org.eclipse.jgit'), + ]] + ['echo >>$OUT']), + out = 'MANIFEST.MF', ) |