From 4a8fcbb7b802fbe1a148d3ec5f0980ace18a5d1b Mon Sep 17 00:00:00 2001
From: Jie Kang <jkang@redhat.com>
Date: Oct 17 2018 16:44:11 +0000
Subject: Add dd-plist and fix-info-plist-maven-plugin packages


---

diff --git a/dd-plist/dd-plist.spec b/dd-plist/dd-plist.spec
new file mode 100644
index 0000000..428d39b
--- /dev/null
+++ b/dd-plist/dd-plist.spec
@@ -0,0 +1,50 @@
+Name:       dd-plist
+Version:    1.21
+Release:    1%{?dist}
+Summary:    A java library providing support for ASCII, XML and binary property lists.
+
+License:    MIT
+URL:        https://github.com/jdcasey/directory-maven-plugin
+
+# original source: https://github.com/3breadt/dd-plist/archive/dd-plist-1.21.tar.gz
+#   wget https://github.com/3breadt/dd-plist/archive/dd-plist-1.21.tar.gz
+Source0:    dd-plist-1.21.tar.gz
+
+BuildRequires:  javapackages-tools maven-local
+BuildRequires:  sonatype-oss-parent
+BuildRequires:  maven-assembly-plugin maven-plugin-bundle
+#BuildRequires:  maven-parent maven-plugin-plugin maven-javadoc-plugin
+
+Requires:   java-openjdk
+
+Provides:   dd-plist = %{version}
+
+%description
+This library enables your Java application to handle property lists of various
+formats. Property lists are files used to store user settings and serialized
+objects. They originate from the NeXSTEP programming environment and are now a
+basic part of the Cocoa framework (OS X and iOS) as well as the GNUstep framework.
+
+%global debug_package %{nil}
+
+%prep
+%setup -q
+
+%pom_remove_plugin org.apache.maven.plugins:maven-gpg-plugin
+%pom_remove_plugin org.sonatype.plugins:nexus-staging-maven-plugin
+
+%build
+%mvn_build
+
+%install
+%mvn_install
+
+%files
+/usr/share/java/%{name}
+/usr/share/javadoc/%{name}
+/usr/share/maven-poms/%{name}
+/usr/share/maven-metadata/%{name}.xml
+
+%changelog
+* Wed Oct 17 2018 Jie Kang <jkang@redhat.com> - 1.21-1
+- Initial packaging
diff --git a/dd-plist/generate-ddp_tarbell.sh b/dd-plist/generate-ddp_tarbell.sh
new file mode 100755
index 0000000..1e024e2
--- /dev/null
+++ b/dd-plist/generate-ddp_tarbell.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+wget https://github.com/3breadt/dd-plist/archive/dd-plist-1.21.tar.gz
+tar xvf dd-plist-1.21.tar.gz
+rm dd-plist-1.21.tar.gz
+mv dd-plist-dd-plist-1.21 dd-plist-1.21/
+tar czf dd-plist-1.21.tar.gz dd-plist-1.21/
+rm -r dd-plist-1.21
\ No newline at end of file
diff --git a/fix-info-plist-maven-plugin/0_update_ddp_version.patch b/fix-info-plist-maven-plugin/0_update_ddp_version.patch
new file mode 100644
index 0000000..0860dd1
--- /dev/null
+++ b/fix-info-plist-maven-plugin/0_update_ddp_version.patch
@@ -0,0 +1,13 @@
+diff --git a/pom.xml b/pom.xml
+index 866c23e..d1a1173 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -50,7 +50,7 @@
+ 		<dependency>
+ 			<groupId>com.googlecode.plist</groupId>
+ 			<artifactId>dd-plist</artifactId>
+-			<version>1.16</version>
++			<version>1.21</version>
+ 		</dependency>
+ 		<dependency>
+ 			<groupId>org.tukaani</groupId>
diff --git a/fix-info-plist-maven-plugin/fix-info-plist-maven-plugin.spec b/fix-info-plist-maven-plugin/fix-info-plist-maven-plugin.spec
new file mode 100644
index 0000000..a02b97d
--- /dev/null
+++ b/fix-info-plist-maven-plugin/fix-info-plist-maven-plugin.spec
@@ -0,0 +1,45 @@
+Name:       fix-info-plist-maven-plugin
+Version:    1.2.0
+Release:    1%{?dist}
+Summary:    Small Maven plugin to "fix" the Info.plist file generated by p2 during a Tycho product build
+
+License:    EPL-1.0
+URL:        https://github.com/buchen/fix-info-plist-maven-plugin
+
+Source0:    fix-info-plist-maven-plugin-1.2.0.tar.gz
+
+Patch0: 0_update_ddp_version.patch
+
+BuildRequires:  javapackages-tools maven-local
+BuildRequires:  xz-devel dd-plist
+BuildRequires:  maven-plugin-plugin
+
+Requires:   java-openjdk
+
+Provides:   fix-info-plist-maven-plugin = %{version}
+
+%description
+Small Maven plugin to "fix" the Info.plist file generated by p2 during a Tycho product build. This Maven plugin manipulates the Info.plist between the materialize-products and archive-products goals of the P2 Directory Tycho plugin to provide a custom Info.plist file for Eclipse RCP product 
+
+%global debug_package %{nil}
+
+%prep
+%setup -q
+
+%patch0 -p1
+
+%build
+%mvn_build
+
+%install
+%mvn_install
+
+%files
+/usr/share/java/%{name}
+/usr/share/javadoc/%{name}
+/usr/share/maven-poms/%{name}
+/usr/share/maven-metadata/%{name}.xml
+
+%changelog
+* Tue Oct 16 2018 Jie Kang <jkang@redhat.com> - 1.2.0-1
+- Initial packaging
diff --git a/fix-info-plist-maven-plugin/generate_fipmp_tarball.sh b/fix-info-plist-maven-plugin/generate_fipmp_tarball.sh
new file mode 100755
index 0000000..52cf98f
--- /dev/null
+++ b/fix-info-plist-maven-plugin/generate_fipmp_tarball.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+wget https://github.com/buchen/fix-info-plist-maven-plugin/archive/1.2.tar.gz
+tar xvf 1.2.tar.gz
+rm 1.2.tar.gz
+mv fix-info-plist-maven-plugin-1.2 fix-info-plist-maven-plugin-1.2.0
+tar czf fix-info-plist-maven-plugin-1.2.0.tar.gz fix-info-plist-maven-plugin-1.2.0/
+rm -r fix-info-plist-maven-plugin-1.2.0 
\ No newline at end of file

