[seamonkey] implement separate switches for system/native nspr, nss and libvpx

Dmitry Butskoy buc at fedoraproject.org
Mon Jul 15 17:22:20 UTC 2013


commit 8acd8aabd50a845ac65adf4381f2586acb68bab0
Author: Dmitry Butskoy <Dmitry at Butskoy.name>
Date:   Mon Jul 15 21:21:40 2013 +0400

    implement separate switches for system/native nspr, nss and libvpx

 seamonkey.spec |   51 ++++++++++++++++++++++++++++-----------------------
 1 files changed, 28 insertions(+), 23 deletions(-)
---
diff --git a/seamonkey.spec b/seamonkey.spec
index 1e6a183..09134c7 100644
--- a/seamonkey.spec
+++ b/seamonkey.spec
@@ -1,16 +1,14 @@
-# Use system nspr/nss?
-%define system_nss        1
+%bcond_without	system_nspr
+%bcond_without	system_nss
+%bcond_without	system_libvpx
 
 %define homepage http://start.fedoraproject.org/
 %define default_bookmarks_file %{_datadir}/bookmarks/default-bookmarks.html
 %define cairo_version 0.5
 
-%if %{?system_nss}
 %global minimum_build_nspr_version 4.9.6
-%global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536)
 %global minimum_build_nss_version 3.14.3
-%global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536)
-%endif
+%global minimum_build_vpx_version 1.0.0
 
 %define build_langpacks 1
 
@@ -25,7 +23,7 @@
 Name:           seamonkey
 Summary:        Web browser, e-mail, news, IRC client, HTML editor
 Version:        2.19
-Release:        1%{?dist}
+Release:        2%{?dist}
 URL:            http://www.mozilla.org/projects/seamonkey/
 License:        MPLv2.0
 Group:          Applications/Internet
@@ -59,8 +57,10 @@ Patch22:        seamonkey-2.14-installdir.patch
 Patch23:        seamonkey-2.19-elfhack.patch
 
 Buildroot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-%if %{?system_nss}
+%if %{with system_nspr}
 BuildRequires:  nspr-devel >= %{minimum_build_nspr_version}
+%endif
+%if %{with system_nss}
 BuildRequires:  nss-devel >= %{minimum_build_nss_version}
 BuildRequires:  nss-static >= %{minimum_build_nss_version}
 %endif
@@ -88,17 +88,22 @@ BuildRequires:  alsa-lib-devel
 BuildRequires:  hunspell-devel
 BuildRequires:  system-bookmarks
 BuildRequires:  libnotify-devel
-BuildRequires:  libvpx-devel
+%if %{with system_libvpx}
+BuildRequires:  libvpx-devel >= %{minimum_build_vpx_version}
+%else
+BuildRequires:  yasm >= 1.1
+%endif
 BuildRequires:  mesa-libGL-devel
 BuildRequires:  python >= 2.7
 
 Requires:       system-bookmarks
 Requires:       mozilla-filesystem
 Requires:       hicolor-icon-theme
-Requires:       libvpx
-%if %{?system_nss}
-Requires:       nspr >= %{nspr_build_version}
-Requires:       nss >= %{nss_build_version}
+%if %{with system_nspr}
+Requires:       nspr >= %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo %{minimum_build_nspr_version})
+%endif
+%if %{with system_nss}
+Requires:       nss >= %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo %{minimum_build_nss_version})
 %endif
 
 Obsoletes: seamonkey-chat
@@ -150,13 +155,10 @@ sed -i -e 's/ *xpcnativewrappers=no//' mozilla/extensions/inspector/jar.mn
 echo "ac_add_options --disable-elf-hack" >> .mozconfig
 %endif
 
-%if %{?system_nss}
-echo "ac_add_options --with-system-nspr" >> .mozconfig
-echo "ac_add_options --with-system-nss" >> .mozconfig
-%else
-echo "ac_add_options --without-system-nspr" >> .mozconfig
-echo "ac_add_options --without-system-nss" >> .mozconfig
-%endif
+echo "ac_add_options --with%{!?with_system_nspr:out}-system-nspr" >> .mozconfig
+echo "ac_add_options --with%{!?with_system_nss:out}-system-nss" >> .mozconfig
+echo "ac_add_options --with%{!?with_system_libvpx:out}-system-libvpx" >> .mozconfig
+
 %ifnarch %{ix86} x86_64
 echo "ac_add_options --disable-webrtc" >> .mozconfig
 %endif
@@ -216,7 +218,7 @@ echo %defattr\(-,root,root\) > %{builddir}/seamonkey.list
     --package-file objdir/suite/installer/package-manifest \
     --install-dir $RPM_BUILD_ROOT/%{mozdir} \
     --install-root %{mozdir} \
-    --exclude-file=%{SOURCE18}
+    %{?with_system_nspr:--exclude-file=%{SOURCE18}}
 
 %{SOURCE7} --package browser --output-file %{builddir}/seamonkey.list \
     --package-file objdir/suite/installer/package-manifest \
@@ -232,7 +234,7 @@ echo %defattr\(-,root,root\) > %{builddir}/seamonkey.list
     --package-file objdir/suite/installer/package-manifest \
     --install-dir $RPM_BUILD_ROOT/%{mozdir} \
     --install-root %{mozdir} \
-    --exclude-file=%{SOURCE17}
+    %{?with_system_nss:--exclude-file=%{SOURCE17}}
 
 %{SOURCE7} --package mail --output-file %{builddir}/seamonkey.list \
     --package-file objdir/suite/installer/package-manifest \
@@ -454,7 +456,7 @@ fi
 %dir %{_datadir}/mozilla/extensions/%{seamonkey_app_id}
 %dir %{_libdir}/mozilla/extensions/%{seamonkey_app_id}
 
-%if !%{?system_nss}
+%if %{without system_nss}
 %{mozdir}/*.chk
 %endif
 
@@ -462,6 +464,9 @@ fi
 
 
 %changelog
+* Mon Jul 15 2013 Dmitry Butskoy <Dmitry at Butskoy.name> 2.19-2
+- implement separate switches for system/native nspr, nss and libvpx
+
 * Mon Jul  8 2013 Dmitry Butskoy <Dmitry at Butskoy.name> 2.19-1
 - update to 2.19
 


More information about the scm-commits mailing list