Browse Source

update to 3.1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@1261 ec354946-7b23-47d6-9f5a-488ba84defc7
kazutaka 14 years ago
parent
commit
4b4c10bb71
1 changed files with 189 additions and 118 deletions
  1. 189 118
      t/thunderbird/thunderbird-vl.spec

+ 189 - 118
t/thunderbird/thunderbird-vl.spec

@@ -1,31 +1,39 @@
 # do not include minor version number in MOZILLA_FIVE_HOME
-%define tbmajor 2.0
-%define tbversion %{tbmajor}.0.23
-%define tbdir %{_libdir}/thunderbird-%{tbmajor}
+%define tbmajor 3.1
+%define tbversion %{tbmajor}
+%define tbrelease 1%{?_dist_release}
+
+# The tarball is pretty inconsistent with directory structure.
+# Sometimes there is a top level directory.  That goes here.
+#
+# IMPORTANT: If there is no top level directory, this should be 
+# set to the cwd, ie: '.'
+#%define tarballdir .
+%define tarballdir comm-1.9.2
+
+%define mozappdir %{_libdir}/%{name}-%{version_internal}
+%define moz_objdir objdir-tb
+%define version_internal 3.1
+%define thunderbird_app_id \{3550f703-e582-4d05-9a08-453d09bdfdc6\} 
+
+%define desktop_file_utils_version 0.6
+%define nspr_version 4.8
+%define nss_version 3.12.3.99
+%define cairo_version 1.6.0
+%define freetype_version 2.1.9
+%define sqlite_version 3.6.14
+%define libnotify_version 0.4
 
 %define build_vineseed 0
-%define build_vine4 0
-%define build_vine3 0
+%define build_vine5 0
 
-%if "%{?_dist_release}" == "vl5"
+%if "%{?_dist_release}" == "vl6"
 %define build_vineseed 1
 %endif
-%if "%{?_dist_release}" == "vl4"
-%define build_vine4 1
-%endif
-%if "%{?_dist_release}" == "vl3"
-%define build_vine3 1
+%if "%{?_dist_release}" == "vl5"
+%define build_vine5 1
 %endif
 
-%define tbrelease 1%{?_dist_release}
-
-# Temporary until this works again
-ExcludeArch:    ppc64
-
-%define desktop_file_utils_version 0.6
-%define cairo_version 1.0
-%define nspr_version 4.6.7
-%define nss_version 3.11.5
 
 Summary:	Thunderbird Community Edition, Mail/newsgroup client
 Summary(ja):	Thunderbirdコミュニティエディション, メール・ニュースクライアント
@@ -36,31 +44,40 @@ URL:		http://www.mozilla.org/projects/thunderbird/
 License:	MPL
 Group:		Applications/Internet
 
-Source0:	ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/%{tbversion}/source/thunderbird-%{version}-source.tar.bz2
-Source1010:     mozconfig-thunderbird-vine3
-Source1020:     mozconfig-thunderbird-vine4
-Source1030:     mozconfig-thunderbird-vine5
-Source12:       thunderbird-vine-default-prefs.js
-Source20:       thunderbird.desktop
-Source21:       thunderbird.vine.sh.in
-Source22:       thunderbird.png
-Source30:       thunderbird-open-browser.sh
-Source100:      find-external-requires
+Source0:	ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/%{tbversion}/source/thunderbird-%{version}.source.tar.bz2
+#Source1010:	mozconfig-thunderbird-vine3
+#Source1020:	mozconfig-thunderbird-vine4
+Source1030:	mozconfig-thunderbird-vine5
+Source1040:	mozconfig-thunderbird-vine6
+Source12:	thunderbird-vine-default-prefs.js
+Source20:	thunderbird.desktop
+Source21:	thunderbird.vine.sh.in
+#Source22:	thunderbird.png
+Source30:	thunderbird-open-browser.sh
+Source40:	thunderbird-unofficial-brandig-tb-brand.properties
+Source41:	thunderbird-unofficial-brandig-tb-brand.dtd
+Source100:	find-external-requires
 
 # locale sources
 %define MOZ_BUILD_LOCALES "ja"
-Source1000:     thunderbird-2.0.0.0-ja.tar.bz2
+# get from mercurial repository with command, 
+# hg clone http://hg.mozilla.org/releases/l10n-mozilla-1.9.2/ja l10n
+Source1000:     thunderbird-%{tbversion}-ja.tar.bz2
 
-# upstream patch
 
+# upstream patch
 
-# build patches
-Patch1:         firefox-2.0-link-layout.patch
+# Fix for jemalloc
+Patch1:         mozilla-jemalloc.patch
+# Fix for installation fail when building with dynamic linked libraries
+Patch2:         thunderbird-shared-error.patch
+# Fixes gcc complain that nsFrame::delete is protected
+Patch4:         xulrunner-1.9.2.1-build.patch
 
 # customization patches
-Patch22:        firefox-1.0-psfonts.patch
-Patch24:        thunderbird-2.0-default-applications.patch
-Patch25:        thunderbird-1.1-software-update.patch
+#Patch22:        firefox-1.0-psfonts.patch
+#Patch24:        thunderbird-2.0-default-applications.patch
+#Patch25:        thunderbird-1.1-software-update.patch
 Patch26:        firefox-1.5-default-a4-paper.patch
 
 # font system fixes
@@ -68,35 +85,43 @@ Patch26:        firefox-1.5-default-a4-paper.patch
 
 ## Vine patch
 # http://bugzilla.mozilla.org/show_bug.cgi?id=179248
-Patch1000:    firefox-1.5-sjisalias.patch
+Patch1000:	thunderbird-3.1-sjisalias.patch
 
 # use /proc/net/netstat for random seed instead of netstat command.
 #Patch1010:      firefox-nss-no_netstat.patch
 
 # workaround gcc visibility hidden bugs (see gcc#26905)
-Patch1020:      firefox-2.0.0.3-visibility.patch
+Patch1020:	firefox-2.0.0.3-visibility.patch
 
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-%if !%{build_vine3}
-BuildRequires:  pango-devel
-BuildRequires:  cairo-devel >= %{cairo_version}
-%if !%{build_vine4}
-BuildRequires:  nspr-devel >= %{nspr_version}
-BuildRequires:  nss-devel >= %{nss_version}
-BuildRequires:  pixman-devel
-%endif
-%endif
-BuildRequires:	libpng-devel, libjpeg-devel, gtk2-devel
+BuildRequires:	pango-devel
+BuildRequires:	cairo-devel >= %{cairo_version}
+BuildRequires:	nspr-devel >= %{nspr_version}
+BuildRequires:	nss-devel >= %{nss_version}
+BuildRequires:	pixman-devel
+BuildRequires:	libpng-devel
+BuildRequires:	libjpeg-devel
+BuildRequires:	gtk2-devel
 BuildRequires:	zlib-devel, gzip, zip, unzip
 BuildRequires:	libIDL-devel
-BuildRequires:	tcsh
-BuildRequires:	freetype2-devel
+BuildRequires:	freetype2-devel >= %{freetype_version}
+BuildRequires:  libnotify-devel >= %{libnotify_version}
+BuildRequires:	bzip2-devel
+BuildRequires:	gnome-vfs2-devel
+BuildRequires:  libgnome-devel
+BuildRequires:  libgnomeui-devel
+BuildRequires:	krb5-devel
+BuildRequires:	pango-devel
+BuildRequires:	libXt-devel
+BuildRequires:	libXrender-devel
+BuildRequires:	hunspell-devel
+BuildRequires:	sqlite3-devel >= %{sqlite_version}
+BuildRequires:	startup-notification-devel
+BuildRequires:	desktop-file-utils
+Requires:	sqlite3 >= %{sqlite_version}
+Requires(post):		desktop-file-utils >= %{desktop_file_utils_version}
+Requires(postun):	desktop-file-utils >= %{desktop_file_utils_version}
 
-Prereq:		desktop-file-utils >= %{desktop_file_utils_version}
-%if %{build_vineseed}
-Requires:	nspr >= %{nspr_version}
-Requires:	nss >= %{nss_version}
-%endif
 Obsoletes:	MozillaThunderbird
 Provides:	MozillaThunderbird = %{version}
 
@@ -115,58 +140,64 @@ Thunderbird はスタンドアローンのメールおよびニュースクラ
 #===============================================================================
 
 %prep
-%setup -q -n %{name}-%{version} -c -b 1000
-cd mozilla
+%setup -q %{name}-%{version} -c -b 1000
+cd %{tarballdir}
 
-%patch1 -p1 -b .link-layout
+%patch1 -p0 -b .jemalloc
+%patch2 -p1 -b .shared-error
+%patch4 -p1 -b .protected
 
-%patch22 -p1
-%patch24 -p1
-#%patch25 -p0
-%patch26 -p1
-#%if !%{build_vine3}
-#%patch81 -p1
-#%endif
-
-%patch1000 -p0
-#%patch1010 -p1
-#patch1020 -p1
+cd mozilla
 
+#%patch22 -p1
+#%patch24 -p1
+#%patch25 -p0
+%patch26 -p1 -b .default-a4
+%patch1000 -p1 -b .sjis-alias
 
+cd -
 %{__rm} -f .mozconfig
-%if %{build_vine3}
-%{__cp} %{SOURCE1010} .mozconfig
-%endif
-%if %{build_vine4}
-%{__cp} %{SOURCE1020} .mozconfig
-%endif
 %if %{build_vineseed}
-%{__cp} %{SOURCE1030} .mozconfig
+%{__cp} %{SOURCE1040} .mozconfig
+# cat not build with xulrunner (yet)
+# see tracking bugs.
+#   https://bugzilla.mozilla.org/show_bug.cgi?id=306324
+#   https://bugzilla.mozilla.org/show_bug.cgi?id=377319 
+#echo "ac_add_options --with-libxul-sdk=`pkg-config --variable=sdkdir libxul`" >> .mozconfig
 %endif
 
+# setup unofficial branding name
+%{__cp} %{SOURCE40} mail/branding/unofficial/locales/en-US/brand.properties
+%{__cp} %{SOURCE41} mail/branding/unofficial/locales/en-US/brand.dtd
+
 #===============================================================================
 
 %build
-cd mozilla
-autoconf-2.13
+cd %{tarballdir}
+
+INTERNAL_GECKO=%{version_internal}
+MOZ_APP_DIR=%{mozappdir}
+
 
 #MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | %__sed -e 's/-O2/-Os/' -e 's/-Wall//')
 MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | %__sed -e 's/-Wall//')
 export RPM_OPT_FLAGS=$MOZ_OPT_FLAGS
 export CFLAGS="$RPM_OPT_FLAGS"
 export CXXFLAGS="$CFLAGS"
-export BUILD_OFFICIAL=1
-export MOZILLA_OFFICIAL=1
+export MOZ_APP_DISPLAYNAME="Tb for Vine Linux"
 
 %ifarch ppc ppc64 s390 s390x
-%define moz_mflags -j1
+%define moz_make_flags -j1
 %else
-%define moz_mflags %{?_smp_mflags}
+%define moz_make_flags %{?_smp_mflags}
 %endif
 
-export LDFLAGS="-Wl,-rpath,%{ffdir}"
-export MAKE="gmake %{moz_mflags}"
-%__make -f client.mk build
+export PREFIX='%{_prefix}'
+export LIBDIR='%{_libdir}'
+
+export LDFLAGS="-Wl,-rpath,%{mozappdir}"
+export MAKE="gmake %{moz_make_flags}"
+%{__make} -f client.mk build
 
 # build locales
 LOCALEDIRS=`find . -print | grep 'locales/Makefile$' | \
@@ -181,21 +212,39 @@ done
 #===============================================================================
 
 %install
-cd mozilla
 %{__rm} -rf $RPM_BUILD_ROOT
+cd %{tarballdir}
 
-cd xpinstall/packager/
-%{__make} STRIP=/bin/true
-cd -
+INTERNAL_GECKO=%{version_internal}
 
-%{__mkdir_p} $RPM_BUILD_ROOT{%{_libdir},%{_bindir},%{_datadir}/applications}
+INTERNAL_APP_NAME=%{name}-${INTERNAL_GECKO}
+MOZ_APP_DIR=%{_libdir}/${INTERNAL_APP_NAME}
 
-%{__tar} -C $RPM_BUILD_ROOT%{_libdir}/ -xzf dist/%{name}-*linux*.tar.gz
-%{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name} $RPM_BUILD_ROOT%{tbdir}
+cd %{moz_objdir}
+DESTDIR=$RPM_BUILD_ROOT make install
 
-%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/%{name}-*linux*.tar
-
-%{__install} -p -D %{SOURCE22} $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png
+# install unofficial icons
+cd -
+%{__cp} mail/branding/unofficial/mailicon16.png \
+        $RPM_BUILD_ROOT/%{mozappdir}/icons/
+%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps
+%{__cp} mail/branding/unofficial/mailicon16.png \
+        $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/thunderbird.png
+%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/22x22/apps
+%{__cp} mail/branding/unofficial/mailicon22.png \
+        $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/22x22/apps/thunderbird.png
+%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/apps
+%{__cp} mail/branding/unofficial//mailicon24.png \
+        $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/apps/thunderbird.png
+%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
+%{__cp} mail/branding/unofficial/mailicon32.png \
+        $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/thunderbird.png
+%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
+%{__cp} mail/branding/unofficial/mailicon48.png \
+        $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/thunderbird.png
+%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/256x256/apps
+%{__cp} mail/branding/unofficial/mailicon256.png \
+        $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/256x256/apps/thunderbird.png
 
 desktop-file-install --vendor vine \
   --dir $RPM_BUILD_ROOT%{_datadir}/applications \
@@ -204,61 +253,83 @@ desktop-file-install --vendor vine \
   %{SOURCE20}
 
 # set up the thunderbird start script
-%{__cat} %{SOURCE21} | %{__sed} -e 's,TBDIR,%{tbdir},g' > \
+rm -f $RPM_BUILD_ROOT/%{_bindir}/thunderbird
+%{__cat} %{SOURCE21} | %{__sed} -e 's,TBDIR,%{mozappdir},g' > \
   $RPM_BUILD_ROOT%{_bindir}/thunderbird
 %{__chmod} 755 $RPM_BUILD_ROOT/%{_bindir}/thunderbird
 
-install -m755 %{SOURCE30} $RPM_BUILD_ROOT/%{tbdir}/open-browser.sh
-perl -pi -e 's|LIBDIR|%{_libdir}|g' $RPM_BUILD_ROOT/%{tbdir}/open-browser.sh
+install -Dm755 %{SOURCE30} $RPM_BUILD_ROOT/%{mozappdir}/open-browser.sh
+%{__sed} -i -e 's|LIBDIR|%{_libdir}|g' $RPM_BUILD_ROOT/%{mozappdir}/open-browser.sh
 
 %{__cat} %{SOURCE12} | %{__sed} -e 's,THUNDERBIRD_RPM_VR,%{version}-%{release},g' \
-                                -e 's,COMMAND,%{tbdir}/open-browser.sh,g' > \
+                                -e 's,COMMAND,%{mozappdir}/open-browser.sh,g' > \
         $RPM_BUILD_ROOT/vine-default-prefs
-%{__cp} $RPM_BUILD_ROOT/vine-default-prefs $RPM_BUILD_ROOT/%{tbdir}/greprefs/all-vine.js
-%{__cp} $RPM_BUILD_ROOT/vine-default-prefs $RPM_BUILD_ROOT/%{tbdir}/defaults/pref/all-vine.js
+%{__install} -D $RPM_BUILD_ROOT/vine-default-prefs $RPM_BUILD_ROOT/%{mozappdir}/greprefs/all-vine.js
+%{__install} -D $RPM_BUILD_ROOT/vine-default-prefs $RPM_BUILD_ROOT/%{mozappdir}/defaults/pref/all-vine.js
 %{__rm} $RPM_BUILD_ROOT/vine-default-prefs
 
+%{__rm} -f $RPM_BUILD_ROOT%{_bindir}/thunderbird-config
+
 # own mozilla plugin dir (#135050)
 %{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins
 
-%{__rm} -f $RPM_BUILD_ROOT%{tbdir}/thunderbird-config
-
-cd $RPM_BUILD_ROOT%{tbdir}/chrome
-find . -name "*" -type d -maxdepth 1 -exec %{__rm} -rf \{\} \;
-cd -
+# own extension directories
+%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/%{thunderbird_app_id}
+%{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/mozilla/extensions/%{thunderbird_app_id}
 
 # install locales
 for lang in %{MOZ_BUILD_LOCALES} ; do
-  %{__install} -p -D -m 664 dist/bin/chrome/$lang.{jar,manifest} $RPM_BUILD_ROOT%{tbdir}/chrome/
+  %{__install} -p -D -m 664 %{moz_objdir}/mozilla/dist/bin/chrome/$lang.{jar,manifest} $RPM_BUILD_ROOT%{mozappdir}/chrome/
 done
 
-# install default icons
-# refer https://bugzilla.redhat.com/show_bug.cgi?id=177823
-%{__mkdir_p} $RPM_BUILD_ROOT%{tbdir}/chrome/icons/default
-install -m644 dist/thunderbird/chrome/icons/default/* \
-         $RPM_BUILD_ROOT%{tbdir}/chrome/icons/default/
-
 
 %clean
 %{__rm} -rf $RPM_BUILD_ROOT
 
+#===============================================================================
+
 %post
-update-desktop-database %{_datadir}/applications >& /dev/null ||:
+update-desktop-database &> /dev/null || :
+touch --no-create %{_datadir}/icons/hicolor
+if [ -x %{_bindir}/gtk-update-icon-cache ]; then
+  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+fi
 
 %postun
-update-desktop-database %{_datadir}/applications >& /dev/null ||:
+update-desktop-database &> /dev/null || :
+touch --no-create %{_datadir}/icons/hicolor
+if [ -x %{_bindir}/gtk-update-icon-cache ]; then
+  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+fi
 
 
 %files
 %defattr(-,root,root,-)
 %attr(755,root,root) %{_bindir}/thunderbird
 %attr(644,root,root) %{_datadir}/applications/vine-thunderbird.desktop
-%attr(644,root,root) %{_datadir}/pixmaps/thunderbird.png
-%{tbdir}
+%{_datadir}/icons/hicolor/16x16/apps/thunderbird.png
+%{_datadir}/icons/hicolor/22x22/apps/thunderbird.png
+%{_datadir}/icons/hicolor/24x24/apps/thunderbird.png
+%{_datadir}/icons/hicolor/256x256/apps/thunderbird.png
+%{_datadir}/icons/hicolor/32x32/apps/thunderbird.png
+%{_datadir}/icons/hicolor/48x48/apps/thunderbird.png
+%{mozappdir}
 
 #===============================================================================
 
 %changelog
+* Tue Jun 29 2010 Kazutaka HARADA <kazutaka@vinelinux.org> 3.1-1
+- new upstream release
+- update spec entirely
+- import patches from fedora (Patch1, 2 & 4)
+- drop outdated patches (Patch22, 24)
+- update Sources:
+  - mozconfig (Source1030 & Source1040)
+  - default prefs.js (Source12)
+  - unofficial branding (Source40 & Source41)
+  - japanese translation (Source1000)
+- update Patch1000 (sjis-alias)
+
 * Sun Aug 24 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.0.23-1
 - new upstream release