]> git.pld-linux.org Git - packages/icedove.git/blobdiff - icedove.spec
- put URL in proper place
[packages/icedove.git] / icedove.spec
index f119ab50f5df6f0d5d6b189a6b4039465b20088a..7d3cc010431003f6b249a668afc045917aba9891 100644 (file)
@@ -10,7 +10,7 @@
 %bcond_without gnome           # disable all GNOME components (gnome+gnomeui+gnomevfs)
 %bcond_without ldap            # disable e-mail address lookups in LDAP directories
 %bcond_without  lightning      # disable sunbird calendar
-%bcond_with            xulrunner       # build with xulrunner
+%bcond_without xulrunner       # build with xulrunner
 %bcond_with    crashreporter   # report crashes to crash-stats.mozilla.com
 
 %if %{without gnome}
 %undefine      with_gnomevfs
 %endif
 
-%if %{?_enable_debug_packages} != 1
+%if 0%{?_enable_debug_packages} != 1
 %undefine      crashreporter
 %endif
 
-%define                enigmail_ver            1.1.2
+%define                enigmail_ver    1.1.2
+%define                nspr_ver                4.8.8
+%define                nss_ver                 3.12.10
 
 %if %{without xulrunner}
 # The actual sqlite version (see RHBZ#480989):
 Summary:       Icedove - email client
 Summary(pl.UTF-8):     Icedove - klient poczty
 Name:          icedove
-Version:       3.1.3
-Release:       1
+Version:       6.0.2
+Release:       0.1
 License:       MPL 1.1 or GPL v2+ or LGPL v2.1+
 Group:         X11/Applications/Networking
 Source0:       http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/thunderbird-%{version}.source.tar.bz2
-# Source0-md5: 46332e1d9a658f6e31797035107b1a8d
+# Source0-md5: 917a667fe21cfd103092dbc23a112192
 Source1:       http://www.mozilla-enigmail.org/download/source/enigmail-%{enigmail_ver}.tar.gz
 # Source1-md5: 7d329d5e8afbbb28214ca1995beb09c9
 Source2:       %{name}-branding.tar.bz2
-# Source2-md5: 85fdf877e2f1bc41329d8086ef5cf0f1
+# Source2-md5: 2da351522bdd7f4a3bd8aaff4c776976
 Source3:       %{name}-rm_nonfree.sh
 Source4:       %{name}.desktop
 Source5:       %{name}.sh
@@ -54,9 +56,9 @@ Patch5:               %{name}-hunspell.patch
 Patch6:                %{name}-prefs.patch
 Patch7:                system-mozldap.patch
 Patch8:                %{name}-makefile.patch
-Patch9:                %{name}-libpng.patch
 Patch10:       %{name}-extensiondir.patch
 Patch11:       crashreporter.patch
+Patch12:       no-subshell.patch
 URL:           http://www.pld-linux.org/Packages/Icedove
 %{?with_gnomevfs:BuildRequires:        GConf2-devel >= 1.2.1}
 BuildRequires: alsa-lib-devel
@@ -75,22 +77,25 @@ BuildRequires:      libjpeg-devel >= 6b
 BuildRequires: libnotify-devel >= 0.4
 BuildRequires: libpng-devel >= 1.2.0
 BuildRequires: libstdc++-devel
-BuildRequires: nspr-devel >= 1:4.8
-BuildRequires: nss-devel >= 1:3.12.0
+BuildRequires: nspr-devel >= 1:%{nspr_ver}
+BuildRequires: nss-devel >= 1:%{nss_ver}
 BuildRequires: pango-devel >= 1:1.1.0
 BuildRequires: pkgconfig
 BuildRequires: sed >= 4.0
-BuildRequires: sqlite3-devel >= 3.6.22
+BuildRequires: sqlite3-devel >= 3.7.4
 BuildRequires: startup-notification-devel >= 0.8
 BuildRequires: xorg-lib-libXext-devel
 BuildRequires: xorg-lib-libXinerama-devel
 BuildRequires: xorg-lib-libXt-devel
+BuildRequires: yasm
 BuildRequires: zip
+Requires(post):        mktemp >= 1.5-18
 %if %{with xulrunner}
+BuildRequires: xulrunner-devel
 %else
 Requires:      myspell-common
-Requires:      nspr >= 1:4.6.1
-Requires:      nss >= 1:3.11.3
+Requires:      nspr >= 1:%{nspr_ver}
+Requires:      nss >= 1:%{nss_ver}
 Requires:      sqlite3 >= %{sqlite_build_version}
 %endif
 Obsoletes:     mozilla-thunderbird
@@ -169,10 +174,10 @@ Główne możliwości:
 
 %prep
 %setup -qc
-mv -f comm-1.9.2 mozilla
+mv comm-release mozilla
 %setup -q -T -D -a2
 cd mozilla
-%{?with_enigmail:tar xvfz %{SOURCE1} -C mailnews/extensions}
+%{?with_enigmail:%{__gzip} -dc %{SOURCE1} | %{__tar} -xf - -C mailnews/extensions}
 /bin/sh %{SOURCE3}
 %patch0 -p1
 %{?with_enigmail:%patch1 -p1}
@@ -182,16 +187,16 @@ cd mozilla
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
-%patch8 -p0
-%patch9 -p0
+%patch8 -p2
 %patch10 -p2
 %patch11 -p2
+%patch12 -p1
 
 %build
 cd mozilla
 cp -f %{_datadir}/automake/config.* mozilla/build/autoconf
 cp -f %{_datadir}/automake/config.* mozilla/nsprpub/build/autoconf
-cp -f %{_datadir}/automake/config.* directory/c-sdk/config/autoconf
+cp -f %{_datadir}/automake/config.* ldap/sdks/c-sdk/config/autoconf
 
 install -d libxul-sdk
 ln -snf %{_libdir}/xulrunner-sdk libxul-sdk/sdk
@@ -199,8 +204,8 @@ ln -snf %{_libdir}/xulrunner-sdk libxul-sdk/sdk
 cat << EOF > .mozconfig
 mk_add_options MOZ_OBJDIR=%{objdir}
 
-export CFLAGS="%{rpmcflags}"
-export CXXFLAGS="%{rpmcflags}"
+export CFLAGS="%{rpmcflags} -fpermissive -I/usr/include/xulrunner"
+export CXXFLAGS="%{rpmcflags} -fpermissive -I/usr/include/xulrunner"
 
 %if %{with crashreporter}
 export MOZ_DEBUG_SYMBOLS=1
@@ -290,10 +295,12 @@ ac_add_options --enable-xinerama
 ac_add_options --with-distribution-id=org.pld-linux
 ac_add_options --with-branding=icedove/branding
 %if %{with xulrunner}
-ac_add_options --with-libxul-sdk=$(pwd)/libxul-sdk
+#ac_add_options --with-libxul-sdk=$(pwd)/libxul-sdk/sdk
+ac_add_options --with-system-libxul
 ac_add_options --enable-shared
+ac_add_options --enable-libxul
 %else
-ac_add_options --enable-static
+ac_add_options --disable-xul
 %endif
 ac_add_options --with-pthreads
 ac_add_options --with-system-bz2
@@ -365,19 +372,36 @@ ln -s ../../share/%{name}/isp $RPM_BUILD_ROOT%{_libdir}/%{name}/isp
 ln -s ../../share/%{name}/modules $RPM_BUILD_ROOT%{_libdir}/%{name}/modules
 ln -s ../../share/%{name}/res $RPM_BUILD_ROOT%{_libdir}/%{name}/res
 
-rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
+# dir for arch independant extensions besides arch dependant extensions
+# see mozilla/xpcom/build/nsXULAppAPI.h
+# XRE_SYS_LOCAL_EXTENSION_PARENT_DIR and XRE_SYS_SHARE_EXTENSION_PARENT_DIR
+install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions
+
+%{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
 ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
 
 %{__sed} -e 's,@LIBDIR@,%{_libdir},' %{SOURCE5} > $RPM_BUILD_ROOT%{_bindir}/icedove
 ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/thunderbird
 ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/mozilla-thunderbird
 
-cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
-cp -a %{topdir}/mozilla/icedove/branding/content/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
+cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
+cp -p %{topdir}/mozilla/icedove/branding/content/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
 
-# files created by regxpcom -register
+# files created by regxpcom -register in post
 touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat
 touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat
+cat << 'EOF' > $RPM_BUILD_ROOT%{_libdir}/%{name}/register
+#!/bin/sh
+umask 022
+# make temporary HOME, as it attempts to touch files in $HOME/.mozilla
+# dangerous if you run this with sudo with keep_env += HOME
+# also TMPDIR could be pointing to sudo user's homedir so we reset that too.
+t=$(mktemp -d)
+%{__rm} -f %{_libdir}/%{name}/components/{compreg,xpti}.dat
+TMPDIR= TMP= HOME=$t %{_libdir}/%{name}/icedove -register
+rm -rf $t
+EOF
+chmod a+rx $RPM_BUILD_ROOT%{_libdir}/%{name}/register
 
 %if %{with enigmail}
 ext_dir=$RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/\{847b3a00-7ab1-11d4-8f02-006008948af5\}
@@ -391,22 +415,22 @@ cp -rfLp components/libipc.so $ext_dir/components
 cp -rfLp components/ipc.xpt $ext_dir/components
 cp -rfLp defaults/preferences/enigmail.js $ext_dir/defaults/preferences
 cd -
-cp -a %{topdir}/mozilla/mailnews/extensions/enigmail/package/install.rdf $ext_dir
-cp -a %{topdir}/mozilla/mailnews/extensions/enigmail/package/chrome.manifest $ext_dir/chrome.manifest
+cp -p %{topdir}/mozilla/mailnews/extensions/enigmail/package/install.rdf $ext_dir
+cp -p %{topdir}/mozilla/mailnews/extensions/enigmail/package/chrome.manifest $ext_dir/chrome.manifest
 %endif
 
 # remove unecessary stuff
-rm $RPM_BUILD_ROOT%{_libdir}/%{name}/README.txt
-rm $RPM_BUILD_ROOT%{_libdir}/%{name}/components/components.list
-rm $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/components.list
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/README.txt
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/components/components.list
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/components.list
 
-# never package these
+# never package these. always remove
 # nss
-rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{freebl3,nss3,nssckbi,nssdbm3,nssutil3,smime3,softokn3,ssl3}.*
+%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{freebl3,nss3,nssckbi,nssdbm3,nssutil3,smime3,softokn3,ssl3}.*
 # nspr
-rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{nspr4,plc4,plds4}.so
+%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{nspr4,plc4,plds4}.so
 # mozldap
-rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{ldap,ldif,prldap,ssldap}60.so
+%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{ldap,ldif,prldap,ssldap}60.so
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -423,6 +447,9 @@ for d in chrome defaults greprefs icons isp modules res; do
 done
 exit 0
 
+%post
+%{_libdir}/%{name}/register || :
+
 %files
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/icedove
@@ -442,6 +469,7 @@ exit 0
 %attr(755,root,root) %{_libdir}/%{name}/*-bin
 %attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client
 %attr(755,root,root) %{_libdir}/%{name}/icedove
+%attr(755,root,root) %{_libdir}/%{name}/register
 
 # symlinks
 %{_libdir}/%{name}/chrome
@@ -462,6 +490,7 @@ exit 0
 %{_datadir}/%{name}/isp
 %{_datadir}/%{name}/modules
 %{_datadir}/%{name}/res
+%{_datadir}/%{name}/extensions
 
 %if %{with crashreporter}
 %attr(755,root,root) %{_libdir}/%{name}/crashreporter
This page took 0.072445 seconds and 4 git commands to generate.