--- firefox.spec.orig	2012-04-24 11:09:53.000000000 -0400
+++ firefox.spec	2012-06-07 12:49:23.696055840 -0400
@@ -1,3 +1,7 @@
+# DNSSEC-Tools
+%define dist .1.dnssec
+%define _default_patch_fuzz 2
+
 # Separated plugins are supported on x86(64) only
 %ifarch %{ix86} x86_64
 %define separated_plugins 1
@@ -9,15 +13,16 @@
 %define debug_build       0
 
 %if 0%{?fedora}
-%define homepage http://start.fedoraproject.org/
+%define homepage http://www.dnssec-tools.org/
 %else
 %define homepage file:///usr/share/doc/HTML/index.html
 %endif
 %define default_bookmarks_file %{_datadir}/bookmarks/default-bookmarks.html
 %define firefox_app_id \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
 
+# 12.0-1.1.dnssec
 %global xulrunner_version      12.0
-%global xulrunner_release      1
+%global xulrunner_release      1.1.dnssec
 %global alpha_version          0
 %global beta_version           0
 %global rc_version             0
@@ -87,11 +92,24 @@
 
 %endif
 
+# DNSSEC-Tools
+# - mozilla-base patches
+Patch1001:	moz-base-0001-take-advantage-of-new-DNSSEC-functionality-in-NSPR.patch
+Patch1002:	moz-base-0002-support-functions-in-preparation-for-async-support.patch
+Patch1003:	moz-base-0003-take-advantage-of-new-async-functionality-in-NSPR.patch
+Patch1004:	moz-base-0004-make-netwerk-DNSSEC-validation-aware.patch
+# - mozilla-browser patches
+Patch1101:	moz-firefox-0001-update-browser-local-overrides-for-DNSSEC.patch
+Patch1102:	moz-firefox-0002-add-DNSSEC-preferences-to-browser.patch
+
 # ---------------------------------------------------
 
 BuildRequires:  desktop-file-utils
 BuildRequires:  system-bookmarks
 BuildRequires:  xulrunner-devel%{?_isa} >= %{xulrunner_verrel}
+BuildRequires:  dnssec-tools-libs-devel
+BuildRequires:  openssl-devel
+BuildRequires:  autoconf213
 
 Requires:       xulrunner%{?_isa} >= %{xulrunner_verrel}
 Requires:       system-bookmarks
@@ -128,6 +146,24 @@
 # Not yet approved by Mozilla Corporation
 %endif
 
+###############################
+# DNSSEC-Tools
+# - mozilla-base patches
+%patch1001 -p1 -b .dnssec-moz-base
+%patch1002 -p1 -b .dnssec-moz-base
+%patch1003 -p1 -b .dnssec-moz-base
+%patch1004 -p1 -b .dnssec-moz-base
+# - mozilla-firefox patches
+%patch1101 -p1 -b .dnssec-moz-firefox
+%patch1102 -p1 -b .dnssec-moz-firefox
+
+# rebuild configure(s) due to dnssec patches
+/bin/rm -f ./configure
+/usr/bin/autoconf-2.13 
+# end dnssec related patches
+###############################
+
+
 
 %{__rm} -f .mozconfig
 %{__cp} %{SOURCE10} .mozconfig
@@ -158,6 +194,8 @@
 echo "ac_add_options --enable-optimize" >> .mozconfig
 %endif
 
+echo "ac_add_options --with-system-val" >> .mozconfig
+
 #---------------------------------------------------------------------
 
 %build
@@ -169,7 +207,8 @@
 # Disable C++ exceptions since Mozilla code is not exception-safe
 #
 MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | \
-                     %{__sed} -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g')
+                     %{__sed} -e 's/-Wall//' -e 's/-O2/-O0/' -e 's/-fexceptions/-fno-exceptions/')
+
 %if %{?debug_build}
 MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//')
 %endif
