39 lines
1.3 KiB
XML
Executable File
39 lines
1.3 KiB
XML
Executable File
<?xml version="1.0" ?>
|
|
<project name="ffmpeg-linux-x86_64-signing" basedir=".">
|
|
|
|
<!-- Sign jar with Certificate using pkcs12 file -->
|
|
<target name="check-certificate">
|
|
<input message="Enter cetificate filename:" addproperty="cert.name" />
|
|
<input message="Enter cetificate password:" addproperty="cert.password" />
|
|
<exec executable="/usr/bin/keytool" outputproperty="cert.info">
|
|
<arg line="-list" />
|
|
<arg line="-storetype pkcs12" />
|
|
<arg line="-keystore ${cert.name}" />
|
|
<arg line="-storepass ${cert.password}" />
|
|
<arg line="-v" />
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="get-alias-name" depends="check-certificate">
|
|
<script language="javascript">
|
|
<![CDATA[
|
|
// getting the value
|
|
info = project.getProperty("cert.info");
|
|
alias = (info.match(/Alias name:(.*)/)[0]).replace("Alias name: ","");
|
|
project.setProperty("cert.alias",alias);
|
|
]]>
|
|
</script>
|
|
</target>
|
|
|
|
|
|
<target name="sign-jar" depends="get-alias-name">
|
|
<signjar jar="build/libs/ffmpeg-linux-x86_64-0.0.1.jar"
|
|
storetype="pkcs12"
|
|
keystore="${cert.name}"
|
|
storepass="${cert.password}"
|
|
alias="${cert.alias}" />
|
|
</target>
|
|
|
|
|
|
</project>
|