[swing-layout] Added maven pom
gil
gil at fedoraproject.org
Sun Dec 9 09:50:02 UTC 2012
commit bd8c0d3db774cf4df1ae76fe0e79bac126d6f61f
Author: gil <puntogil at libero.it>
Date: Sun Dec 9 10:49:47 2012 +0100
Added maven pom
swing-layout-1.0.4-fix-incorrect-fsf-address.patch | 20 ++++
swing-layout-1.0.4-project_properties.patch | 13 +++
swing-layout-pom.xml | 93 ++++++++++++++++++++
swing-layout.spec | 53 +++++++----
4 files changed, 159 insertions(+), 20 deletions(-)
---
diff --git a/swing-layout-1.0.4-fix-incorrect-fsf-address.patch b/swing-layout-1.0.4-fix-incorrect-fsf-address.patch
new file mode 100644
index 0000000..2a2723a
--- /dev/null
+++ b/swing-layout-1.0.4-fix-incorrect-fsf-address.patch
@@ -0,0 +1,20 @@
+--- COPYING 2006-06-07 16:53:26.000000000 +0200
++++ COPYING-gil 2012-12-09 10:34:58.592675729 +0100
+@@ -13,7 +13,7 @@
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+@@ -496,7 +496,7 @@
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Also add information on how to contact you by electronic and paper mail.
+
diff --git a/swing-layout-1.0.4-project_properties.patch b/swing-layout-1.0.4-project_properties.patch
new file mode 100644
index 0000000..e0cefe6
--- /dev/null
+++ b/swing-layout-1.0.4-project_properties.patch
@@ -0,0 +1,13 @@
+--- nbproject/project.properties 2009-10-27 17:54:48.000000000 +0100
++++ nbproject/project.properties-gil 2012-12-09 10:41:50.618599320 +0100
+@@ -30,8 +30,8 @@
+ # Space-separated list of extra javac options
+ javac.compilerargs=-g:lines
+ javac.deprecation=false
+-javac.source=1.4
+-javac.target=1.4
++javac.source=1.5
++javac.target=1.5
+ javac.test.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}:\
diff --git a/swing-layout-pom.xml b/swing-layout-pom.xml
new file mode 100644
index 0000000..396a02c
--- /dev/null
+++ b/swing-layout-pom.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.jdesktop</groupId>
+ <artifactId>swing-layout</artifactId>
+ <version>1.0.3</version>
+ <packaging>jar</packaging>
+ <name>org.jdesktop - Swing Layout</name>
+ <description>
+ Mavenized build for Swing Layout from
+ "https://swing-layout.dev.java.net".
+ </description>
+
+ <build>
+
+ <plugins>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <!--version>2.5</version-->
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+
+ <resources>
+ <resource>
+ <directory>${basedir}/src</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>**/*.properties</include>
+ </includes>
+ </resource>
+ </resources>
+
+ <sourceDirectory>${basedir}/src/java</sourceDirectory>
+
+ <testSourceDirectory>${basedir}/src/test</testSourceDirectory>
+
+ </build>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.2</version>
+ </dependency>
+
+ </dependencies>
+
+</project>
diff --git a/swing-layout.spec b/swing-layout.spec
index b231022..8308b7c 100644
--- a/swing-layout.spec
+++ b/swing-layout.spec
@@ -1,14 +1,17 @@
Name: swing-layout
Version: 1.0.4
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: Natural layout for Swing panels
-
Group: Development/Libraries
License: LGPLv2
URL: https://swing-layout.dev.java.net/
-# Need to register to download, from url above
+# https://svn.java.net/svn/swing-layout~svn/trunk/
Source0: %{name}-%{version}-src.zip
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# from http://java.net/jira/secure/attachment/27303/pom.xml
+Source1: %{name}-pom.xml
+# use javac target/source 1.5
+Patch0: %{name}-%{version}-project_properties.patch
+Patch1: %{name}-%{version}-fix-incorrect-fsf-address.patch
BuildRequires: jpackage-utils >= 1.6
BuildRequires: java-devel >= 1.3
@@ -32,35 +35,45 @@ Documentation for Swing Layout code.
%prep
%setup -q
dos2unix releaseNotes.txt
+%patch0 -p0
+%patch1 -p0
+sed -i 's/\r//' COPYING
+cp -p %{SOURCE1} pom.xml
+sed -i "s|<version>1.0.3</version>|<version>%{version}</version>|" pom.xml
%build
-%{ant} jar javadoc dist
+%{ant} jar javadoc dist
%install
-rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_javadir} \
- $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
-install -m 644 dist/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}
-ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
-cp -pr dist/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
-%clean
-rm -rf $RPM_BUILD_ROOT
+mkdir -p %{buildroot}%{_javadir}
+install -m 644 dist/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
-%files
-%defattr(-,root,root)
-%{_javadir}/%{name}*.jar
-%doc releaseNotes.txt
+mkdir -p %{buildroot}%{_mavenpomdir}
+install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+%add_maven_depmap JPP-%{name}.pom %{name}.jar
+mkdir -p %{buildroot}%{_javadocdir}/%{name}
+cp -pr dist/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-%files javadoc
-%defattr(-,root,root)
-%{_javadocdir}/%{name}-%{version}
+%files
+%{_javadir}/%{name}.jar
+%{_mavenpomdir}/JPP-%{name}.pom
+%{_mavendepmapfragdir}/%{name}
+%doc releaseNotes.txt COPYING
+%files javadoc
+%{_javadocdir}/%{name}
+%doc COPYING
%changelog
+* Sun Dec 09 2012 gil cattaneo <puntogil at libero.it> 1.0.4-6
+- Adapted to current guideline
+- Added maven pom
+- Installed license file
+
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list