Convert patches to POM macros

This commit is contained in:
Mikolaj Izdebski 2012-07-11 22:49:36 +02:00
parent 93e72093fe
commit ada4b6f015
4 changed files with 14 additions and 75 deletions

View File

@ -1,16 +0,0 @@
diff -up slf4j-1.6.1/pom.xml~ slf4j-1.6.1/pom.xml
--- slf4j-1.6.1/pom.xml~ 2012-01-13 20:54:56.336392307 +0200
+++ slf4j-1.6.1/pom.xml 2012-01-13 21:05:50.590098336 +0200
@@ -145,9 +145,11 @@
<configuration>
<aggregate>true</aggregate>
<excludePackageNames>org.slf4j.migrator:org.slf4j.migrator.*</excludePackageNames>
+ <detectJavaApiLink>false</detectJavaApiLink>
+ <isOffline>false</isOffline>
<links>
<link>
- http://java.sun.com/j2se/1.5.0/docs/api
+ /usr/share/javadoc/java
</link>
</links>
<groups>

View File

@ -1,13 +0,0 @@
diff -up slf4j-1.6.1/pom.xml~ slf4j-1.6.1/pom.xml
--- slf4j-1.6.1/pom.xml~ 2012-01-13 20:30:23.188554249 +0200
+++ slf4j-1.6.1/pom.xml 2012-01-13 20:45:05.790659657 +0200
@@ -30,6 +30,9 @@
<slf4j.api.minimum.compatible.version>1.6.0</slf4j.api.minimum.compatible.version>
<cal10n.version>0.7.4</cal10n.version>
<log4j.version>1.2.16</log4j.version>
+ <!-- Because of a non-ASCII comment in
+ slf4j-api/src/main/java/org/slf4j/helpers/MessageFormatter.java -->
+ <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
</properties>

View File

@ -1,39 +0,0 @@
--- pom.xml.sav 2010-07-05 23:24:16.000000000 +0300
+++ pom.xml 2011-01-25 22:34:34.761335409 +0200
@@ -44,7 +44,7 @@
<module>jcl-over-slf4j</module>
<module>log4j-over-slf4j</module>
<module>jul-to-slf4j</module>
- <module>integration</module>
+ <!--module>integration</module-->
<module>slf4j-site</module>
<module>slf4j-migrator</module>
</modules>
@@ -121,9 +121,9 @@
</excludes>
</configuration>
</plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
+<!--
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
@@ -134,6 +134,7 @@
</execution>
</executions>
</plugin>
+-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -349,4 +350,4 @@
</distributionManagement>
-</project>
\ No newline at end of file
+</project>

View File

@ -37,9 +37,6 @@ Group: Development/Libraries
License: MIT
URL: http://www.slf4j.org/
Source0: http://www.slf4j.org/dist/%{name}-%{version}.tar.gz
Patch0: %{name}-pom_xml.patch
Patch1: %{name}-1.6.1-srcencoding.patch
Patch2: %{name}-1.6.1-crosslink.patch
Requires(post): jpackage-utils >= 0:1.7.5
Requires(postun): jpackage-utils >= 0:1.7.5
BuildRequires: jpackage-utils >= 0:1.7.5
@ -100,13 +97,23 @@ Manual for %{name}.
%prep
%setup -q
%patch0 -p0 -b .sav
%patch1 -p1
%patch2 -p1
find . -name "*.jar" | xargs rm
sed -i -e "s|ant<|org.apache.ant<|g" integration/pom.xml
%pom_disable_module integration
%pom_remove_plugin :maven-source-plugin
# Because of a non-ASCII comment in slf4j-api/src/main/java/org/slf4j/helpers/MessageFormatter.java
%pom_xpath_inject "pom:project/pom:properties" "
<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>"
# Fix javadoc links
%pom_xpath_remove "pom:links"
%pom_xpath_inject "pom:plugin[pom:artifactId[text()='maven-javadoc-plugin']]/pom:configuration" "
<detectJavaApiLink>false</detectJavaApiLink>
<isOffline>false</isOffline>
<links><link>/usr/share/javadoc/java</link></links>"
# dos2unix
%{_bindir}/find -name "*.css" -o -name "*.js" -o -name "*.txt" | \
%{_bindir}/xargs -t %{__perl} -pi -e 's/\r$//g'