leamas pushed to harctoolbox (f22). "Initial commit (#1212399)."

notifications at fedoraproject.org notifications at fedoraproject.org
Fri Apr 17 11:38:16 UTC 2015


>From 2120690b845bfe30533870b9747f994ad330f91e Mon Sep 17 00:00:00 2001
From: Alec Leamas <leamas.alec at gmail.com>
Date: Fri, 17 Apr 2015 13:33:04 +0200
Subject: Initial commit (#1212399).


diff --git a/.gitignore b/.gitignore
index e69de29..14bf37b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/harctoolboxbundle-8489337.tar.gz
diff --git a/0001-Irpmaster-Don-t-use-unpackaged-3.5.2-antlr-plugin.patch b/0001-Irpmaster-Don-t-use-unpackaged-3.5.2-antlr-plugin.patch
new file mode 100644
index 0000000..d462e00
--- /dev/null
+++ b/0001-Irpmaster-Don-t-use-unpackaged-3.5.2-antlr-plugin.patch
@@ -0,0 +1,168 @@
+From 5b9f1a16acf284b86bd45feefc1ad3f73db36737 Mon Sep 17 00:00:00 2001
+From: Alec Leamas <leamas.alec at gmail.com>
+Date: Tue, 7 Apr 2015 22:24:36 +0200
+Subject: [PATCH 1/2] Irpmaster: Don't use unpackaged 3.5.2 antlr plugin.
+
+---
+ IrpMaster/.gitignore        |  6 ++--
+ IrpMaster/build-sources.xml | 84 +++++++++++++++++++++++++++++++++++++++++++++
+ IrpMaster/build.properties  | 14 ++++++++
+ IrpMaster/pom.xml           | 14 +++++---
+ 4 files changed, 111 insertions(+), 7 deletions(-)
+ create mode 100644 IrpMaster/build-sources.xml
+ create mode 100644 IrpMaster/build.properties
+
+diff --git a/IrpMaster/.gitignore b/IrpMaster/.gitignore
+index 8e1200f..94cd62a 100644
+--- a/IrpMaster/.gitignore
++++ b/IrpMaster/.gitignore
+@@ -1,5 +1,5 @@
+ target
+-ConfigFileParser.java
+-ConfigFileLexer.java
+-ConfigFile.tokens
++IrpParser.java
++IrpLexer.java
++Irp.tokens
+ Version.java
+diff --git a/IrpMaster/build-sources.xml b/IrpMaster/build-sources.xml
+new file mode 100644
+index 0000000..a03e7b4
+--- /dev/null
++++ b/IrpMaster/build-sources.xml
+@@ -0,0 +1,84 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<!--
++    ===============================================================
++    (Patched) Extension of the NetBeans Java SE Ant build to ANTLR
++    ===============================================================
++-->
++<project name="build-antlr" default="antlr">
++
++    <import file="build.properties"/>
++
++    <target name="antlr" depends="-do-antlr"
++        description="Process the grammar files with ANTLR." />
++
++    <!--Execute the ANTLR processing of the grammar directories. This results
++        in generated code in "${build.generated.sources.dir}/antlr-output".
++        Token files are written to that exact directory. Java files are
++        written to package folders below that root, according to the
++        location of the .g file below "${src.grammar.dir}". This location
++        comes from a properties set by the IDE. The arrangement of .g files
++        must correspond to the Java package statements they contain.
++    -->
++    <target name="-do-antlr">
++
++        <!--Where the grammar files actually reside. (This can be the root of
++            a tree structured according to *destination* Java packages.)
++            src.grammar.dir is set in the IDE's project properties file as a result
++            of naming the grammar sub-directory as a source.
++        -->
++        <property name="antlr.src.dir" location="${src.grammar.dir}"/>
++
++        <!--Destination for generated Java files.-->
++        <property name="antlr.generated.dir"
++                  location="${build.generated.sources.dir}"/>
++        <mkdir dir="${antlr.generated.dir}"/>
++
++        <!--Compose file list to pass to ANTLR.-->
++        <!--Method here to deal with paths that contain spaces. Credit to
++            stackoverflow.com question 2148390-->
++        <pathconvert property="antlr.src.list.0" pathsep="' '" >
++            <!-- Make a list of all the .g grammar files in the tree.-->
++            <fileset dir="${antlr.src.dir}"  >
++                <include name="**/*.g" />
++            </fileset>
++            <!--Trim the names to specifications relative to the grammar base
++            directory.-->
++            <mapper type="glob"
++                from="${antlr.src.dir}${file.separator}*.g"
++                to=  "*.g" />
++        </pathconvert>
++        <!--Last bit of dealing with paths that contain spaces-->
++        <property name="antlr.src.list" value="'${antlr.src.list.0}'"/>
++
++        <!-- -->
++        <echo>ANTLR will translate ${antlr.src.list}</echo>
++        <echo>working relative to ${antlr.src.dir}</echo>
++        <echo>and generate files in ${antlr.generated.dir}</echo>
++        <!--
++        <echoproperties prefix="build" />
++        <echoproperties prefix="javac" />
++        -->
++
++        <!--Implementation using the ANTLR3 task does not accept multiple
++            source files. So use the java task. When grammar files are
++            identified by relative paths, the ANTLR Tool produces corresponding
++            package-structured output. In this call, ANTLR runs with the
++            grammar base directory as the current directory.
++            -->
++        <java classname="org.antlr.Tool" fork="true" dir="${antlr.src.dir}"
++                failonerror="true">
++            <arg value="-verbose"/>
++            <arg value="-report"/>
++            <arg value="-make"/>
++            <arg value="-o"/>
++            <arg path="${antlr.generated.dir}"/>
++            <arg value="-lib"/>
++            <arg path="${antlr.generated.dir}"/>
++            <arg line="${antlr.src.list}"/>
++            <classpath refid="antlr.path"/>
++            <jvmarg value="-Xmx512M"/>
++        </java>
++
++    </target>
++
++</project>
+diff --git a/IrpMaster/build.properties b/IrpMaster/build.properties
+new file mode 100644
+index 0000000..5f15b6c
+--- /dev/null
++++ b/IrpMaster/build.properties
+@@ -0,0 +1,14 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<project name="build-locations">
++    <property name="src.dir" value="${basedir}/src/main/java"/>
++    <property name="src.grammar.dir" value="${basedir}/src/main/antlr3"/>
++    <property name="build.generated.sources.dir"
++              value="${basedir}/src/main/java/org/harctoolbox/IrpMaster"/>
++    <path id="antlr.path">
++        <path path="/usr/share/java/antlr32/antlr-3.1.3.jar"/>
++        <path path="/usr/share/java/antlr32/antlr-runtime-3.1.3.jar"/>
++        <path path="/usr/share/java/antlr.jar"/>
++        <path path="/usr/share/java/stringtemplate.jar"/>
++        <path path="${javac.classpath}"/>
++    </path>
++</project>
+diff --git a/IrpMaster/pom.xml b/IrpMaster/pom.xml
+index aefa16e..4569815 100644
+--- a/IrpMaster/pom.xml
++++ b/IrpMaster/pom.xml
+@@ -38,13 +38,19 @@
+             <!-- Generate ConfigFileParser and ConfigFileLexer from
+             src/main/antrlr3/Config.g -->
+             <plugin>
+-                <groupId>org.antlr</groupId>
+-                <artifactId>antlr3-maven-plugin</artifactId>
+-                <version>3.5.2</version>
++                <!-- Run antlr to creating Irp.tokens, IrpLexer and IrpParser. -->
++                <groupId>org.apache.maven.plugins</groupId>
++                <artifactId>maven-antrun-plugin</artifactId>
+                 <executions>
+                     <execution>
++                        <phase>generate-sources</phase>
++                        <configuration>
++                            <tasks>
++                                <ant antfile="build-sources.xml"/>
++                            </tasks>
++                        </configuration>
+                         <goals>
+-                            <goal>antlr</goal>
++                            <goal>run</goal>
+                         </goals>
+                     </execution>
+                 </executions>
+-- 
+2.1.0
+
diff --git a/0002-Jirc-Use-ant-to-avoid-need-of-unpackaged-3.5.2-antlr.patch b/0002-Jirc-Use-ant-to-avoid-need-of-unpackaged-3.5.2-antlr.patch
new file mode 100644
index 0000000..d8dd034
--- /dev/null
+++ b/0002-Jirc-Use-ant-to-avoid-need-of-unpackaged-3.5.2-antlr.patch
@@ -0,0 +1,174 @@
+From 9201ce60c67d2001451e5217cad5aae353bf03b7 Mon Sep 17 00:00:00 2001
+From: Alec Leamas <leamas.alec at gmail.com>
+Date: Sun, 15 Mar 2015 21:24:58 +0100
+Subject: [PATCH 2/2] Jirc: Use ant to avoid need of unpackaged 3.5.2 antlr
+ plugin
+
+---
+ Jirc/build-sources.xml            | 84 +++++++++++++++++++++++++++++++++++++++
+ Jirc/build.properties             | 14 +++++++
+ Jirc/pom.xml                      | 17 ++++----
+ Jirc/src/main/antlr3/ConfigFile.g |  3 --
+ 4 files changed, 108 insertions(+), 10 deletions(-)
+ create mode 100644 Jirc/build-sources.xml
+ create mode 100644 Jirc/build.properties
+
+diff --git a/Jirc/build-sources.xml b/Jirc/build-sources.xml
+new file mode 100644
+index 0000000..a03e7b4
+--- /dev/null
++++ b/Jirc/build-sources.xml
+@@ -0,0 +1,84 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<!--
++    ===============================================================
++    (Patched) Extension of the NetBeans Java SE Ant build to ANTLR
++    ===============================================================
++-->
++<project name="build-antlr" default="antlr">
++
++    <import file="build.properties"/>
++
++    <target name="antlr" depends="-do-antlr"
++        description="Process the grammar files with ANTLR." />
++
++    <!--Execute the ANTLR processing of the grammar directories. This results
++        in generated code in "${build.generated.sources.dir}/antlr-output".
++        Token files are written to that exact directory. Java files are
++        written to package folders below that root, according to the
++        location of the .g file below "${src.grammar.dir}". This location
++        comes from a properties set by the IDE. The arrangement of .g files
++        must correspond to the Java package statements they contain.
++    -->
++    <target name="-do-antlr">
++
++        <!--Where the grammar files actually reside. (This can be the root of
++            a tree structured according to *destination* Java packages.)
++            src.grammar.dir is set in the IDE's project properties file as a result
++            of naming the grammar sub-directory as a source.
++        -->
++        <property name="antlr.src.dir" location="${src.grammar.dir}"/>
++
++        <!--Destination for generated Java files.-->
++        <property name="antlr.generated.dir"
++                  location="${build.generated.sources.dir}"/>
++        <mkdir dir="${antlr.generated.dir}"/>
++
++        <!--Compose file list to pass to ANTLR.-->
++        <!--Method here to deal with paths that contain spaces. Credit to
++            stackoverflow.com question 2148390-->
++        <pathconvert property="antlr.src.list.0" pathsep="' '" >
++            <!-- Make a list of all the .g grammar files in the tree.-->
++            <fileset dir="${antlr.src.dir}"  >
++                <include name="**/*.g" />
++            </fileset>
++            <!--Trim the names to specifications relative to the grammar base
++            directory.-->
++            <mapper type="glob"
++                from="${antlr.src.dir}${file.separator}*.g"
++                to=  "*.g" />
++        </pathconvert>
++        <!--Last bit of dealing with paths that contain spaces-->
++        <property name="antlr.src.list" value="'${antlr.src.list.0}'"/>
++
++        <!-- -->
++        <echo>ANTLR will translate ${antlr.src.list}</echo>
++        <echo>working relative to ${antlr.src.dir}</echo>
++        <echo>and generate files in ${antlr.generated.dir}</echo>
++        <!--
++        <echoproperties prefix="build" />
++        <echoproperties prefix="javac" />
++        -->
++
++        <!--Implementation using the ANTLR3 task does not accept multiple
++            source files. So use the java task. When grammar files are
++            identified by relative paths, the ANTLR Tool produces corresponding
++            package-structured output. In this call, ANTLR runs with the
++            grammar base directory as the current directory.
++            -->
++        <java classname="org.antlr.Tool" fork="true" dir="${antlr.src.dir}"
++                failonerror="true">
++            <arg value="-verbose"/>
++            <arg value="-report"/>
++            <arg value="-make"/>
++            <arg value="-o"/>
++            <arg path="${antlr.generated.dir}"/>
++            <arg value="-lib"/>
++            <arg path="${antlr.generated.dir}"/>
++            <arg line="${antlr.src.list}"/>
++            <classpath refid="antlr.path"/>
++            <jvmarg value="-Xmx512M"/>
++        </java>
++
++    </target>
++
++</project>
+diff --git a/Jirc/build.properties b/Jirc/build.properties
+new file mode 100644
+index 0000000..1f85557
+--- /dev/null
++++ b/Jirc/build.properties
+@@ -0,0 +1,14 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<project name="build-locations">
++    <property name="src.dir" value="${basedir}/src/main/java"/>
++    <property name="src.grammar.dir" value="${basedir}/src/main/antlr3"/>
++    <property name="build.generated.sources.dir"
++              value="${basedir}/src/main/java/org/harctoolbox/jirc"/>
++    <path id="antlr.path">
++        <path path="/usr/share/java/antlr32/antlr-3.1.3.jar"/>
++        <path path="/usr/share/java/antlr32/antlr-runtime-3.1.3.jar"/>
++        <path path="/usr/share/java/antlr.jar"/>
++        <path path="/usr/share/java/stringtemplate.jar"/>
++        <path path="${javac.classpath}"/>
++    </path>
++</project>
+diff --git a/Jirc/pom.xml b/Jirc/pom.xml
+index 5ff5703..520d113 100644
+--- a/Jirc/pom.xml
++++ b/Jirc/pom.xml
+@@ -38,17 +38,20 @@
+     <build>
+         <plugins>
+ 
+-            <!-- Use ant to run antlr3.
+-                 Generates ConfigFileParser and ConfigFileLexer from
+-                 src/main/antrlr3/Config.g -->
+             <plugin>
+-                <groupId>org.antlr</groupId>
+-                <artifactId>antlr3-maven-plugin</artifactId>
+-                <version>3.5.2</version>
++                <!-- Run antlr to creating Irp.tokens, IrpLexer and IrpParser. -->
++                <groupId>org.apache.maven.plugins</groupId>
++                <artifactId>maven-antrun-plugin</artifactId>
+                 <executions>
+                     <execution>
++                        <phase>generate-sources</phase>
++                        <configuration>
++                            <tasks>
++                                <ant antfile="build-sources.xml"/>
++                            </tasks>
++                        </configuration>
+                         <goals>
+-                            <goal>antlr</goal>
++                            <goal>run</goal>
+                         </goals>
+                     </execution>
+                 </executions>
+diff --git a/Jirc/src/main/antlr3/ConfigFile.g b/Jirc/src/main/antlr3/ConfigFile.g
+index 6ce8e35..eec377a 100644
+--- a/Jirc/src/main/antlr3/ConfigFile.g
++++ b/Jirc/src/main/antlr3/ConfigFile.g
+@@ -29,9 +29,6 @@ options {
+     output=template;
+ }
+ 
+-tokens {
+-}
+-
+ @header {
+ package org.harctoolbox.jirc;
+ import java.util.LinkedHashMap;
+-- 
+2.1.0
+
diff --git a/0003-Dont-validate-Props.xml.patch b/0003-Dont-validate-Props.xml.patch
new file mode 100644
index 0000000..5bf4527
--- /dev/null
+++ b/0003-Dont-validate-Props.xml.patch
@@ -0,0 +1,30 @@
+From a10edb0dd0df56e948f60ba633379f5232fcc4d0 Mon Sep 17 00:00:00 2001
+From: Alec Leamas <leamas.alec at gmail.com>
+Date: Mon, 16 Mar 2015 14:30:45 +0100
+Subject: [PATCH 3/6] Dont validate Props.xml
+
+---
+ IrScrutinizer/src/main/xml/Props.xml | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/IrScrutinizer/src/main/xml/Props.xml b/IrScrutinizer/src/main/xml/Props.xml
+index 3f7d1ae..15878cc 100644
+--- a/IrScrutinizer/src/main/xml/Props.xml
++++ b/IrScrutinizer/src/main/xml/Props.xml
+@@ -1,5 +1,5 @@
+ <?xml version="1.0" encoding="UTF-8"?>
+-<!DOCTYPE properties PUBLIC  "-//harctoolbox.org//properties//en" "http://www.harctoolbox.org/dtds/properties.dtd">
++<!--<!DOCTYPE properties PUBLIC  "-//harctoolbox.org//properties//en" "http://www.harctoolbox.org/dtds/properties.dtd"> -->
+ <!--
+ Copyright (C) 2011, 2012, 2013, 2014 Bengt Martensson.
+ 
+@@ -129,4 +129,4 @@ this program. If not, see http://www.gnu.org/licenses/.
+     <property name="prontoScreenSizeY" type="int" default='"220"' doc="Pronto screen height" />
+     <property name="prontoButtonSizeX" type="int" default='"80"' doc="Pronto screen width" />
+     <property name="prontoButtonSizeY" type="int" default='"30"' doc="Pronto screen height" />
+-</properties>
+\ No newline at end of file
++</properties>
+-- 
+2.1.0
+
diff --git a/0004-Don-t-validate-IrpMaster.xml.patch b/0004-Don-t-validate-IrpMaster.xml.patch
new file mode 100644
index 0000000..9e9f570
--- /dev/null
+++ b/0004-Don-t-validate-IrpMaster.xml.patch
@@ -0,0 +1,25 @@
+From ac0c934dc089da1e29722b872ada03fb71c82119 Mon Sep 17 00:00:00 2001
+From: Alec Leamas <leamas.alec at gmail.com>
+Date: Mon, 13 Apr 2015 09:10:05 +0200
+Subject: [PATCH] Don't validate IrpMaster.xml
+
+The validation accesses external resources not available during build.
+---
+ IrpMaster/src/main/xdocs/IrpMaster.xml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/IrpMaster/src/main/xdocs/IrpMaster.xml b/IrpMaster/src/main/xdocs/IrpMaster.xml
+index f7b2720..cdfe27a 100644
+--- a/IrpMaster/src/main/xdocs/IrpMaster.xml
++++ b/IrpMaster/src/main/xdocs/IrpMaster.xml
+@@ -1,6 +1,6 @@
+ <?xml version="1.0" encoding="utf-8"?>
+ <?xml-stylesheet type="text/xsl" href="xdoc2html.xsl"?>
+-<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
++<!--<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">-->
+ <document>
+   <header>
+     <title>IrpMaster: a program and API for the generation of IR signals from
+-- 
+2.1.0
+
diff --git a/0005-Don-t-access-bundled-crystal-icons.patch b/0005-Don-t-access-bundled-crystal-icons.patch
new file mode 100644
index 0000000..11db64b
--- /dev/null
+++ b/0005-Don-t-access-bundled-crystal-icons.patch
@@ -0,0 +1,73 @@
+From ccff9acf6ca1280ca2de27b74623ee50cd756648 Mon Sep 17 00:00:00 2001
+From: Alec Leamas <leamas.alec at gmail.com>
+Date: Thu, 16 Apr 2015 11:13:23 +0200
+Subject: [PATCH] Don't access bundled crystal icons.
+
+---
+ IrScrutinizer/pom.xml                 | 33 ---------------------------------
+ IrScrutinizer/src/assembly/target.xml |  5 -----
+ 2 files changed, 38 deletions(-)
+
+diff --git a/IrScrutinizer/pom.xml b/IrScrutinizer/pom.xml
+index 049c6bc..277f0e5 100644
+--- a/IrScrutinizer/pom.xml
++++ b/IrScrutinizer/pom.xml
+@@ -350,39 +350,6 @@
+                         </configuration>
+                     </execution>
+                     <execution>
+-                        <id>copy icon</id>
+-                        <phase>package</phase>
+-                        <goals>
+-                            <goal>exec</goal>
+-                        </goals>
+-                        <configuration>
+-                            <executable>cp</executable>
+-                            <workingDirectory>${project.build.directory}</workingDirectory>
+-                            <arguments>
+-                                <argument>--force</argument>
+-                                <argument>../../Crystal-Clear-Icons/src/main/resources/icons/Crystal-Clear/64x64/apps/babelfish.png</argument>
+-                                <argument>${project.artifactId}.png</argument>
+-                            </arguments>
+-                        </configuration>
+-                    </execution>
+-                    <execution>
+-                        <id>create-ico</id>
+-                        <phase>package</phase>
+-                        <goals>
+-                            <goal>exec</goal>
+-                        </goals>
+-                        <configuration>
+-                            <executable>icotool</executable> <!-- Fedora pkg: libicns-utils -->
+-                            <workingDirectory>${project.build.directory}</workingDirectory>
+-                            <arguments>
+-                                <argument>-o</argument>
+-                                <argument>${project.artifactId}.ico</argument>
+-                                <argument>-c</argument>
+-                                <argument>${project.artifactId}.png</argument>
+-                            </arguments>
+-                        </configuration>
+-                    </execution>
+-                    <execution>
+                         <id>make-wrapper-executable</id>
+                         <phase>prepare-package</phase>
+                         <goals>
+diff --git a/IrScrutinizer/src/assembly/target.xml b/IrScrutinizer/src/assembly/target.xml
+index d801898..2d3260a 100644
+--- a/IrScrutinizer/src/assembly/target.xml
++++ b/IrScrutinizer/src/assembly/target.xml
+@@ -62,11 +62,6 @@
+     </fileSets>
+     <files>
+         <file>
+-            <source>../Crystal-Clear-Icons/src/main/resources/icons/Crystal-Clear/64x64/apps/babelfish.png</source>
+-            <outputDirectory/>
+-            <destName>irscrutinizer.png</destName>
+-        </file>
+-        <file>
+             <source>../schemas/girr.xsd</source>
+             <outputDirectory>schemas</outputDirectory>
+         </file>
+-- 
+2.1.0
+
diff --git a/0006-Configure-javadoc-plugin.patch b/0006-Configure-javadoc-plugin.patch
new file mode 100644
index 0000000..0740b99
--- /dev/null
+++ b/0006-Configure-javadoc-plugin.patch
@@ -0,0 +1,32 @@
+From d797929477d56f5d4c84ddb15a29c0c8cfdd7bbf Mon Sep 17 00:00:00 2001
+From: Alec Leamas <leamas.alec at gmail.com>
+Date: Fri, 17 Apr 2015 10:50:31 +0200
+Subject: [PATCH] Configure javadoc plugin
+
+---
+ pom.xml | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/pom.xml b/pom.xml
+index 77c618c..8b49038 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -42,6 +42,15 @@
+ 
+     <build>
+         <plugins>
++            <plugin>
++                <groupId>org.apache.maven.plugins</groupId>
++                <artifactId>maven-javadoc-plugin</artifactId>
++                <version>2.10.3</version>
++                <configuration>
++                    <additionalJOption>-Xdoclint:none</additionalJOption>
++                    <aggregate>true</aggregate>
++                </configuration>
++            </plugin>
+             <!-- Create source tarball from src/assembly/source.xml. -->
+             <plugin>
+                 <groupId>org.apache.maven.plugins</groupId>
+-- 
+2.1.0
+
diff --git a/harctoolbox.spec b/harctoolbox.spec
new file mode 100644
index 0000000..d81b562
--- /dev/null
+++ b/harctoolbox.spec
@@ -0,0 +1,187 @@
+%global         commit      8489337d43cc2f86f8072ea4f750077771ab85d9
+%global         shortcommit %(c=%{commit}; echo ${c:0:7})
+
+Name:           harctoolbox
+Version:        1.1.2
+Release:        1%{?dist}
+Summary:        Programs for analyzing remote control signals
+
+Group:          Applications/Communications
+License:        GPLv3+
+URL:            https://github.com/bengtmartensson/harctoolboxbundle
+BuildArch:      noarch
+
+Source0:        %{url}/archive/%{commit}/harctoolboxbundle-%{shortcommit}.tar.gz
+Source1:        irscrutinizer
+Source2:        irpmaster
+                # Fixes (4) for Fedora shortcomings, can't be upstreamed
+Patch1:         0001-Irpmaster-Don-t-use-unpackaged-3.5.2-antlr-plugin.patch
+Patch2:         0002-Jirc-Use-ant-to-avoid-need-of-unpackaged-3.5.2-antlr.patch
+Patch3:         0003-Dont-validate-Props.xml.patch
+Patch4:         0004-Don-t-validate-IrpMaster.xml.patch
+Patch5:         0005-Don-t-access-bundled-crystal-icons.patch
+Patch6:         0006-Configure-javadoc-plugin.patch
+
+BuildRequires:  antlr-tool
+BuildRequires:  antlr32-tool
+BuildRequires:  crystal-project
+BuildRequires:  dos2unix
+BuildRequires:  DecodeIR
+BuildRequires:  desktop-file-utils
+BuildRequires:  ExchangeIR
+BuildRequires:  exec-maven-plugin
+BuildRequires:  icoutils
+BuildRequires:  java-wakeonlan
+BuildRequires:  libappstream-glib
+BuildRequires:  m4
+BuildRequires:  maven-antrun-plugin
+BuildRequires:  maven-dependency-plugin
+BuildRequires:  maven-filtering
+BuildRequires:  maven-local
+BuildRequires:  maven-plugin-build-helper
+BuildRequires:  maven-shade-plugin
+BuildRequires:  minimal-json
+BuildRequires:  rxtx > 2.2-0.10
+BuildRequires:  tonto
+BuildRequires:  xalan-j2
+BuildRequires:  xerces-j2
+BuildRequires:  xml-maven-plugin
+
+Requires:       crystal-project
+Requires:       zenity
+
+Provides:       irscrutinizer = %{version}-%{release}
+Provides:       irpmaster = %{version}-%{release}
+
+
+%description
+harctoolbox is a set of programs to catch, analyze and create data to/from
+infrared remote controls. The package contains two applications:
+
+- irscrutinizer, a GUI tool to make most operations om infrared data.
+- irpmaster, a CLI tool which also is the the underpinnings of IrScrutinizer.
+
+
+%package        javadoc
+Summary:        Javadoc for %{name}
+
+%description javadoc
+Javadoc API documentation for %{name}.
+
+
+%package        doc
+Summary:        Documentation for %{name}
+
+%description doc
+Various generated HTML documentation for %{name}.
+
+
+%prep
+rm -rf native IrScrutinizer/arduino/GirsLite.zip
+%setup -qn harctoolboxbundle-%{commit}
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+# tonto  and antlr3 are not bundled:
+rm IrScrutinizer/src/main/doc/Tonto-license.txt
+find . -name ANTLR3_license_bsd.txt -delete
+%pom_change_dep gnu.io:RXTX:* org.rxtx:rxtx:2.2 HarcHardware
+%pom_remove_dep org.harctoolbox:HarctoolboxBundle:1.0.0 package
+%pom_change_dep org.antlr:antlr-runtime:3.5.2 ::3.2 IrpMaster
+%pom_change_dep org.antlr:antlr-runtime:3.5.2 ::3.2 Jirc
+%pom_disable_module rxtx-2.2pre2h
+rm -rf rxtx-2.2*
+%pom_disable_module Crystal-Clear-Icons
+rm -rf Crystal-Clear-Icons
+%pom_remove_dep :Crystal-Clear-Icons IrScrutinizer
+sed -i 's/\r//' $(find . -name girr.xsd)
+find \( -name '*.jar' -o -name '*.class' \) -delete
+
+
+%build
+%mvn_build
+%mvn_package *:*:tar.gz:* __noinstall
+%mvn_package *:*:*:jar-with-dependencies __noinstall
+
+
+%install
+%mvn_install
+install -d %{buildroot}%{_datadir}/harctoolbox/icons
+ln -s %{_datadir}/icons/crystal_project \
+    %{buildroot}%{_datadir}/harctoolbox/icons/crystal
+
+mv package/dist/doc/LICENSE.txt LICENSE-doc.txt
+for f in package/dist/*.ini package/dist/exportformats*; do
+    install -Dm 644 $f %{buildroot}%{_datadir}/harctoolbox/etc/$(basename $f)
+done
+install -Dm 644  package/dist/girr.xsd \
+    %{buildroot}%{_datadir}/xml/harctoolbox/girr.xsd
+
+install -Dm 755 %{SOURCE1} %{buildroot}%{_bindir}/irscrutinizer
+install -Dm 755 %{SOURCE2} %{buildroot}%{_bindir}/irpmaster
+
+install -d %{buildroot}%{_datadir}/applications
+desktop-file-install --set-key=Exec --set-value=irscrutinizer \
+    --set-icon=babelfish --dir=%{buildroot}%{_datadir}/applications \
+    package/dist/irscrutinizer.desktop
+for size in 32 48 64 128; do
+    mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps
+    ln -s ../../../crystal_project/${size}x${size}/apps/babelfish.png \
+        %{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps/babelfish.png
+done
+
+install -Dm 644 appdata.xml \
+    %{buildroot}%{_datadir}/appdata/irscrutinizer.appdata.xml
+
+find package/dist/doc -name \*.html -empty -delete
+
+
+%check
+appstream-util validate-relax --nonet \
+    %{buildroot}%{_datadir}/appdata/irscrutinizer.appdata.xml
+
+
+%post
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun
+if [ $1 -eq 0 ] ; then
+    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+
+%posttrans
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
+
+%files -f .mfiles
+%license package/LICENSE.txt
+%{_datadir}/harctoolbox
+%{_datadir}/xml/harctoolbox
+%{_datadir}/applications/irscrutinizer.desktop
+%{_datadir}/appdata/irscrutinizer.appdata.xml
+# The ...hicolor/*/apps... glob does not work. Strange.
+%{_datadir}/icons/hicolor/32x32/apps/babelfish.png
+%{_datadir}/icons/hicolor/48x48/apps/babelfish.png
+%{_datadir}/icons/hicolor/64x64/apps/babelfish.png
+%{_datadir}/icons/hicolor/128x128/apps/babelfish.png
+%{_bindir}/irscrutinizer
+%{_bindir}/irpmaster
+
+%files doc
+%license LICENSE-doc.txt
+%doc package/dist/doc
+
+%files javadoc -f .mfiles-javadoc
+%license LICENSE-doc.txt
+
+
+%changelog
+* Fri Apr 17 2015 Alec Leamas <leamas.alec at gmail.com> - 1.1.2-1
+- Initial release
+- Purging old changelog in https://copr.fedoraproject.org/coprs/leamas/harctoolbox
+- Removing native/ and *.zip files in %%prep
+
diff --git a/irpmaster b/irpmaster
new file mode 100755
index 0000000..44c8c30
--- /dev/null
+++ b/irpmaster
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# harctoolbox script
+# JPackage Project <http://www.jpackage.org/>
+
+# Source functions library
+_prefer_jre=""
+. /usr/share/java-utils/java-functions
+
+# Source system prefs
+if [ -f /etc/java/harctoolbox.conf ] ; then
+  . /etc/java/harctoolbox.conf
+fi
+
+# Source user prefs
+if [ -f $HOME/.harctoolboxrc ] ; then
+  . $HOME/.harctoolboxrc
+fi
+
+# Configuration
+MAIN_CLASS=org.harctoolbox.IrpMaster.IrpMaster
+BASE_FLAGS=""
+BASE_OPTIONS=""
+BASE_JARS="harctoolbox antlr32-runtime DecodeIR ExchangeIR stringtemplate"
+BASE_JARS="${BASE_JARS} beust-jcommander"
+
+
+# Set parameters
+set_jvm
+set_classpath $BASE_JARS
+set_flags $BASE_FLAGS
+set_options $BASE_OPTIONS
+
+# Let's start
+run "$@"
diff --git a/irscrutinizer b/irscrutinizer
new file mode 100755
index 0000000..7af26ba
--- /dev/null
+++ b/irscrutinizer
@@ -0,0 +1,71 @@
+#!/bin/sh
+#
+# harctoolbox script
+# JPackage Project <http://www.jpackage.org/> //Patched
+
+group_msg="You should be part of the \"lock\" group to run irscrutinizer
+Run e. g.,    sudo usermod -aG lock  $USER
+After that you must logout and login again for the new group
+to be effective (on command line you can use newgrp(1) to avoid this)"
+
+root_msg="Thou shall not run this program as root!
+You have been warned."
+
+# Set up so we are in grouo "lock", exit on errors
+id -Gn | grep -q lock  || {
+    if [ "$EUID" != "0" ]; then
+        zenity --warning --text="$group_msg"
+        exit 1
+    fi
+}
+
+if [ "$( id -gn )" != lock ]; then
+    exec sg lock "$0 $*"
+fi
+
+if [ "$EUID" = "0" ]; then
+       zenity --warning --text="$root_msg"
+fi
+
+# Source jpackage functions library
+_prefer_jre="true"
+. /usr/share/java-utils/java-functions
+
+# Source system prefs
+if [ -f /etc/java/harctoolbox.conf ] ; then
+  . /etc/java/harctoolbox.conf
+fi
+
+# Source user prefs
+if [ -f $HOME/.harctoolboxrc ] ; then
+  . $HOME/.harctoolboxrc
+fi
+
+# Add link to crystal icons to CLASSPATH, glob library path
+CLASSPATH=/usr/share/harctoolbox
+lib="/usr/lib*/DecodeIR/libDecodeIR.so"
+
+# Configuration
+MAIN_CLASS=org.harctoolbox.irscrutinizer.IrScrutinizer
+BASE_FLAGS="$BASE_FLAGS -Dharc.decodeir.library.path=$lib"
+BASE_OPTIONS=""
+BASE_JARS="tonto harctoolbox antlr32-runtime DecodeIR ExchangeIR"
+BASE_JARS="$BASE_JARS stringtemplate beust-jcommander minimal-json RXTXcomm"
+
+# Set parameters
+set_jvm
+set_classpath $BASE_JARS
+set_flags $BASE_FLAGS
+set_options $BASE_OPTIONS
+
+# Fix config files
+IRSCRUTINIZERHOME=${IRSCRUTINIZERHOME:-"$HOME/.config/harctoolbox"}
+test -d $IRSCRUTINIZERHOME || mkdir -p $IRSCRUTINIZERHOME
+for f in protocols.ini IrpProtocols.ini girr.xsd exportformats.xml; do
+    test -f $IRSCRUTINIZERHOME/$f || \
+        cp /usr/share/harctoolbox/etc/$f $IRSCRUTINIZERHOME/$f
+done
+
+# Let's start
+export IRSCRUTINIZERHOME
+run "$@"
diff --git a/sources b/sources
index e69de29..2af0302 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+6ef850769de0f0225fb9c1ad60f5a842  harctoolboxbundle-8489337.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/harctoolbox.git/commit/?h=f22&id=2120690b845bfe30533870b9747f994ad330f91e


More information about the scm-commits mailing list