Search
j0ke.net Open Build Service
>
Projects
>
mozilla
>
MozillaSunbird
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 2
[-]
[+]
Added
MozillaSunbird.spec
@@ -0,0 +1,265 @@ +# +# spec file for package MozillaSunbird (Version 0.7) +# +# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + +Name: MozillaSunbird +BuildRequires: gcc-c++ libgnomeui-devel libidl-devel orbit-devel update-desktop-files zip +%if %suse_version > 1020 +BuildRequires: fdupes +%endif +# fix broken 9.3 requirements +%if %suse_version <= 930 +BuildRequires: freetype2-devel popt-devel +%endif +# fix broken SLES9 requirements +%if %suse_version == 910 +BuildRequires: pkgconfig gnome-vfs2 libgnome libgnomeui +%endif +License: MPL/GPL/LGPL +Version: 0.7 +Release: 2 +Summary: Mozilla's Calendar Application +URL: http://www.mozilla.org/projects/calendar/ +Group: Productivity/Office/Organizers +Source: sunbird-%{version}-source.tar.bz2 +Source1: sunbird.desktop +Source2: l10n-%{version}.tar.bz2 +Patch1: mozilla-gcc4.3-fixes.patch +Patch2: mozilla-path_len.patch +Patch4: nss-opt.patch +Patch8: abuild.patch +Patch9: locale.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-build +PreReq: libstdc++ fileutils textutils /bin/sh +%define _unpackaged_files_terminate_build 0 +%define releasedate 2007102500 +%define progname sunbird +%define progdir %{_prefix}/%_lib/%{progname} +%define my_provides /tmp/my-provides +%define my_requires /tmp/my-requires +%if %suse_version > 930 +BuildRequires: mozilla-nspr-devel +%endif +%if %suse_version > 1010 || %opensuse_bs +BuildRequires: mozilla-nss-devel +%endif + +%description +The Sunbird Project is a redesign of the Mozilla Calendar component. +The goal is to produce a cross-platform stand-alone calendar +application based on Mozilla's XUL user interface language. At the +moment, the Sunbird name is a project name. It is not official and may +change in the future. + +The intended user is someone who uses Mozilla Firefox and Mozilla +Thunderbird and wants a calendar application based on Mozilla. + + + +Authors: +-------- + Mozilla Foundation <drivers@mozilla.org> + +%package translations +Summary: Translations of Mozilla Sunbird +Provides: locale(MozillaSunbird:ca;cs;da;de;es_AR;es_ES;eu;fr;ga_IE;hu;it;ka;lt;mk;nb_NO;nl;pa_IN;pl;pt_BR;pt_PT;ru;sk;sl;sv_SE;tr;zh_CN) +Group: Productivity/Office/Organizers +PreReq: %{name} = %{version} + +%description translations +This package contains the additional languages for Sunbird. + +The Sunbird Project is a redesign of the Mozilla Calendar component. +The goal is to produce a cross-platform stand-alone calendar +application based on Mozilla's XUL user interface language. At the +moment, the Sunbird name is a project name. It is not official and may +change in the future. + +The intended user is someone who uses Mozilla Firefox and Mozilla +Thunderbird and wants a calendar application based on Mozilla. + +Authors: +-------- + Mozilla Foundation <drivers@mozilla.org> + +%debug_package + +%prep +%setup -n mozilla -b 2 -q +%patch1 +%patch2 -p1 +%patch4 +%patch8 -p1 +%patch9 + +%build +export MOZ_BUILD_DATE=%{releasedate} +export MOZILLA_OFFICIAL=1 +export BUILD_OFFICIAL=1 +export CFLAGS="$RPM_OPT_FLAGS -Os -fno-strict-aliasing" +%if %suse_version > 1000 +export CFLAGS="$CFLAGS -fstack-protector" +%endif +export CXXFLAGS="$CFLAGS" +export MOZCONFIG=$RPM_BUILD_DIR/mozconfig +cat << EOF > $MOZCONFIG +mk_add_options MOZILLA_OFFICIAL=1 +mk_add_options BUILD_OFFICIAL=1 +mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs} +. \$topsrcdir/calendar/sunbird/config/mozconfig +ac_add_options --prefix=%{_prefix} +ac_add_options --libdir=%{_libdir} +ac_add_options --sysconfdir=%{_sysconfdir} +ac_add_options --mandir=%{_mandir} +ac_add_options --includedir=%{_includedir} +#ac_add_options --enable-optimize="$CFLAGS" +ac_add_options --with-system-jpeg +ac_add_options --with-system-png +ac_add_options --with-system-zlib +ac_add_options --enable-default-toolkit=gtk2 +ac_add_options --enable-xft +ac_add_options --disable-tests +ac_add_options --disable-freetype2 +ac_add_options --disable-installer +ac_add_options --enable-static +ac_add_options --disable-shared +ac_add_options --enable-logging +ac_add_options --enable-official-branding +#ac_add_options --enable-debug +EOF +%if %suse_version > 930 +cat << EOF >> $MOZCONFIG +ac_add_options --with-system-nspr +ac_add_options --enable-system-cairo +EOF +%endif +%if %suse_version > 1010 || %opensuse_bs +cat << EOF >> $MOZCONFIG +ac_add_options --with-system-nss +EOF +%endif +make -f client.mk build + +%install +make -C xpinstall/packager STRIP=/bin/true +# copy tree into RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT%{progdir} +cp -rf $RPM_BUILD_DIR/mozilla/dist/%{progname}/* $RPM_BUILD_ROOT%{progdir} +mkdir $RPM_BUILD_ROOT%{_bindir} +ln -sf ../..%{progdir}/%{progname} $RPM_BUILD_ROOT%{_bindir}/%{progname} +# install additional locales +echo %defattr\(-,root,root\) > %{_tmppath}/translations.list +#for locale in ca cs da de es-ES eu fr hu it mn nl pl ru sk sl ; do +for locale in $(cat calendar/locales/shipped-locales); do + make -C calendar/locales libs-$locale + cp dist/xpi-stage/locale-$locale/chrome/$locale.jar \ + dist/xpi-stage/locale-$locale/chrome/calendar-$locale.jar \ + $RPM_BUILD_ROOT/%{progdir}/chrome + cp dist/xpi-stage/locale-$locale/chrome/$locale.manifest \ + dist/xpi-stage/locale-$locale/chrome/calendar-$locale.manifest \ + $RPM_BUILD_ROOT/%{progdir}/chrome + echo %{progdir}/chrome/$locale.jar >> %{_tmppath}/translations.list + echo %{progdir}/chrome/$locale.manifest >> %{_tmppath}/translations.list + echo %{progdir}/chrome/calendar-$locale.jar >> %{_tmppath}/translations.list + echo %{progdir}/chrome/calendar-$locale.manifest >> %{_tmppath}/translations.list +done +# freedesktop definition +mkdir -p $RPM_BUILD_ROOT/usr/share/applications/ +install -m 644 %{SOURCE1} \ + $RPM_BUILD_ROOT/usr/share/applications +mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps/ +cp -f $RPM_BUILD_ROOT%{progdir}/chrome/icons/default/default.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/%{progname}.xpm +%suse_update_desktop_file %{progname} Office Calendar GTK +# modify provides and requires lists +%if %suse_version == 1000 || %suse_version == 1010 +cat << EOF > %{my_provides} +grep -vE "libnss3.so|libnssckbi.so|libsmime3.so|libsoftokn3.so|libssl3.so|libfreebl3.so" | %{__find_provides} +EOF +chmod 755 %{my_provides} +%define __find_provides %{my_provides} +cat << EOF > %{my_requires} +grep -vE "libnss3.so|libnssckbi.so|libsmime3.so|libsoftokn3.so|libssl3.so|libfreebl3.so|sunbird-bin" | %{__find_requires} +EOF +chmod 755 %{my_requires} +%define __find_requires %{my_requires} +%endif +%if %suse_version > 1020 +%fdupes $RPM_BUILD_ROOT%{progdir} +%fdupes $RPM_BUILD_ROOT%{_datadir} +%endif + +%clean