diff --git a/slf4j-1.6.1-crosslink.patch b/slf4j-1.6.1-crosslink.patch
deleted file mode 100644
index d276b20..0000000
--- a/slf4j-1.6.1-crosslink.patch
+++ /dev/null
@@ -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 @@
-
- true
- org.slf4j.migrator:org.slf4j.migrator.*
-+ false
-+ false
-
-
-- http://java.sun.com/j2se/1.5.0/docs/api
-+ /usr/share/javadoc/java
-
-
-
diff --git a/slf4j-1.6.1-srcencoding.patch b/slf4j-1.6.1-srcencoding.patch
deleted file mode 100644
index 0129084..0000000
--- a/slf4j-1.6.1-srcencoding.patch
+++ /dev/null
@@ -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 @@
- 1.6.0
- 0.7.4
- 1.2.16
-+
-+ ISO-8859-1
-
-
-
diff --git a/slf4j-pom_xml.patch b/slf4j-pom_xml.patch
deleted file mode 100644
index 45c5556..0000000
--- a/slf4j-pom_xml.patch
+++ /dev/null
@@ -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 @@
- jcl-over-slf4j
- log4j-over-slf4j
- jul-to-slf4j
-- integration
-+
- slf4j-site
- slf4j-migrator
-
-@@ -121,9 +121,9 @@
-
-
-
--
--
-- org.apache.maven.plugins
-+
-
-
- org.apache.maven.plugins
-@@ -349,4 +350,4 @@
-
-
-
--
-\ No newline at end of file
-+
diff --git a/slf4j.spec b/slf4j.spec
index e5b68bb..cc0aa31 100644
--- a/slf4j.spec
+++ b/slf4j.spec
@@ -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" "
+ ISO-8859-1"
+
+# Fix javadoc links
+%pom_xpath_remove "pom:links"
+%pom_xpath_inject "pom:plugin[pom:artifactId[text()='maven-javadoc-plugin']]/pom:configuration" "
+ false
+ false
+ /usr/share/javadoc/java"
+
+# dos2unix
%{_bindir}/find -name "*.css" -o -name "*.js" -o -name "*.txt" | \
%{_bindir}/xargs -t %{__perl} -pi -e 's/\r$//g'