diff --git a/tools/tcg_rim_tool/package.sh b/tools/tcg_rim_tool/package.sh index a84faf85..b3ac6c3f 100755 --- a/tools/tcg_rim_tool/package.sh +++ b/tools/tcg_rim_tool/package.sh @@ -6,7 +6,7 @@ pushd $SCRIPT_DIR name="tcg_rim_tool" -tar -cf $name.tar build.gradle gradle* src/ docs/ rim_fields.json keystore.jks +tar -cf $name.tar build.gradle gradle* src/ docs/ rim_fields.json keystore.jks scripts/ gzip $name.tar if [ -d rpmbuild ]; then rm -rf rpmbuild diff --git a/tools/tcg_rim_tool/scripts/rimtool.sh b/tools/tcg_rim_tool/scripts/rimtool.sh new file mode 100644 index 00000000..30e731c1 --- /dev/null +++ b/tools/tcg_rim_tool/scripts/rimtool.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# Calls the the_tcg_rim_tool and passes in parameters +scriptDir=$(dirname -- "$(readlink -f -- "${BASH_SOURCE[0]}")") +baseDir=${scriptDir%/*} +jar="tcg_rim_tool-1.0.jar"; +java -jar $baseDir/$jar "$@" + diff --git a/tools/tcg_rim_tool/tcg_rim_tool.spec b/tools/tcg_rim_tool/tcg_rim_tool.spec index 8ffc676a..379d8e4d 100644 --- a/tools/tcg_rim_tool/tcg_rim_tool.spec +++ b/tools/tcg_rim_tool/tcg_rim_tool.spec @@ -10,8 +10,7 @@ Source0: %{name}.tar.gz BuildRequires: java-headless >= 1:1.8.0 %description -This tool will generate a root RIM file for PC clients in accordance with the schema located at http://standards.iso.org/iso/19770/-2/2015/schema.xsd. The generated RIM can either be empty if no arguments are given, or contain a payload if an input file is provided. The tool can also verify a given RIMfile against the schema. Use -h or --help to see a list of commands and uses. - +This tool will generate a base RIM file for PC clients in accordance with the schema located at http://standards.iso.org/iso/19770/-2/2015/schema.xsd. The generated RIM can either be empty if no arguments are given, or contain a payload if an input file is provided. The tool can also verify a given RIMfile against the schema. Use -h or --help to see a list of commands and uses. %prep %setup -q -c -n %{name} @@ -23,15 +22,19 @@ rm -f /opt/hirs/rimtool/%{name}*.jar ./gradlew build %install -mkdir -p %{buildroot}/opt/hirs/rimtool/ +mkdir -p %{buildroot}/opt/hirs/rimtool/ %{buildroot}/usr/local/bin/rim/ cp build/libs/%{name}-%{version}.jar %{buildroot}/opt/hirs/rimtool/ cp ./rim_fields.json %{buildroot}/opt/hirs/rimtool/ cp ./keystore.jks %{buildroot}/opt/hirs/rimtool/ +cp -r ./scripts/ %{buildroot}/opt/hirs/rimtool/ +ln -sf /opt/hirs/rimtool/scripts/rimtool.sh %{buildroot}/usr/local/bin/rim %files /opt/hirs/rimtool/%{name}-%{version}.jar /opt/hirs/rimtool/rim_fields.json /opt/hirs/rimtool/keystore.jks +/opt/hirs/rimtool/scripts/rimtool.sh +/usr/local/bin/rim/ %changelog * Mon Jun 15 2020 chubtub