1 |
%define name mozilla-thunderbird-lightning |
2 |
%define oname lightning |
3 |
#fwang 1.0b5 only compatible with tb >= 5.0 |
4 |
%define version 1.0b7 |
5 |
%define release %mkrel 1 |
6 |
%define epoch 1 |
7 |
|
8 |
%define thunderbird_version 7.0 |
9 |
%define tb_appid \{3550f703-e582-4d05-9a08-453d09bdfdc6\} |
10 |
%define lightning_appid \{e2fda1a4-762b-4020-b5ad-a41df1933103\} |
11 |
%define tbextdir %{_libdir}/mozilla/extensions/%{tb_appid} |
12 |
|
13 |
%define _requires_exceptions libxul.so\\|libxpcom.so\\|libmozalloc.so |
14 |
|
15 |
Summary: Calendar extension for Thunderbird |
16 |
Name: %{name} |
17 |
Version: %{version} |
18 |
Release: %{release} |
19 |
Epoch: %{epoch} |
20 |
Source0: http://releases.mozilla.org/pub/mozilla.org/calendar/%oname/releases/%version/source/%{oname}-%version.source.tar.bz2 |
21 |
# lightning doesn't offer lang packs, so we extract them from the upstream .xpi |
22 |
# $ wget ftp://releases.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5/linux/lightning.xpi |
23 |
# $ unzip -d lightning lightning.xpi |
24 |
# $ cd lightning/ |
25 |
# $ tar cJf SOURCES/lightning-langpacks-1.0b5.tar.xz chrome/ |
26 |
# $ cp chrome.manifest SOURCES/ |
27 |
Source1: chrome.manifest |
28 |
Source2: lightning-langpacks-%{version}.tar.xz |
29 |
Source10: thunderbird-mozconfig |
30 |
Patch0: thunderbird-7.0-fix-str-fmt.patch |
31 |
License: GPL |
32 |
Group: Networking/WWW |
33 |
Url: http://www.mozilla.org/projects/calendar/lightning/ |
34 |
Requires: mozilla-thunderbird >= 0:%{thunderbird_version} |
35 |
BuildRequires: autoconf2.1 |
36 |
BuildRequires: cairo-devel >= 1.8.8 |
37 |
BuildRequires: sqlite3-devel >= 3.7.5 |
38 |
BuildRequires: yasm |
39 |
BuildRequires: mesagl-devel |
40 |
BuildRequires: gtk2-devel |
41 |
BuildRequires: gzip |
42 |
BuildRequires: python-devel |
43 |
BuildRequires: libjpeg-devel |
44 |
BuildRequires: libpng-devel >= 2:1.4 |
45 |
BuildRequires: nspr-devel >= 2:4.8.8 |
46 |
BuildRequires: nss-static-devel >= 2:3.12.10 |
47 |
BuildRequires: unzip |
48 |
BuildRequires: zip |
49 |
BuildRequires: zlib-devel |
50 |
BuildRequires: libIDL-devel |
51 |
BuildRequires: freetype2-devel |
52 |
BuildRequires: xft2-devel |
53 |
BuildRequires: libxt-devel |
54 |
BuildRequires: hunspell-devel |
55 |
BuildRequires: dbus-glib-devel |
56 |
BuildRequires: libalsa-devel |
57 |
BuildRequires: python |
58 |
BuildRequires: libnotify-devel |
59 |
BuildRequires: startup-notification-devel |
60 |
BuildRequires: libiw-devel |
61 |
Obsoletes: mozilla-lightning |
62 |
Obsoletes: %{name} < %{epoch}:%{version} |
63 |
|
64 |
%description |
65 |
Calendar extension for Thunderbird. |
66 |
|
67 |
%prep |
68 |
%setup -q -n comm-release |
69 |
%patch0 -p1 |
70 |
cp %{SOURCE10} .mozconfig |
71 |
cat >> .mozconfig << EOF |
72 |
ac_add_options --host=%{_host} |
73 |
ac_add_options --target=%{_target_platform} |
74 |
EOF |
75 |
|
76 |
%build |
77 |
CFLAGS=$(echo %optflags | %{__sed} -e 's/-O2/-Os/' -e 's/-fexceptions//') |
78 |
CFLAGS="$CFLAGS -fno-strict-aliasing" |
79 |
CXXFLAGS="$CFLAGS" |
80 |
LDFLAGS="%ldflags" |
81 |
RPM_OPT_FLAGS="$CFLAGS" |
82 |
export CFLAGS |
83 |
export CXXFLAGS |
84 |
export RPM_OPT_FLAGS |
85 |
|
86 |
%make -f client.mk build STRIP=/bin/true |
87 |
|
88 |
%install |
89 |
rm -rf %buildroot |
90 |
# Jar for the translation |
91 |
mkdir -p %buildroot%{tbextdir}/%{lightning_appid} |
92 |
cp objdir-tb/mozilla/dist/xpi-stage/calendar-timezones.xpi %buildroot%{tbextdir}/calendar-timezones@mozilla.org.xpi |
93 |
cp objdir-tb/mozilla/dist/xpi-stage/gdata-provider.xpi %buildroot%{tbextdir}/{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}.xpi |
94 |
|
95 |
mkdir -p objdir-tb/mozilla/dist/xpi-stage/build |
96 |
cp objdir-tb/mozilla/dist/xpi-stage/lightning.xpi objdir-tb/mozilla/dist/xpi-stage/build/ |
97 |
cd objdir-tb/mozilla/dist/xpi-stage/build |
98 |
unzip -n lightning.xpi |
99 |
tar xvf %SOURCE2 |
100 |
cp -fr %SOURCE1 . |
101 |
rm -f lightning.xpi |
102 |
cp -f -r * %buildroot%{tbextdir}/%{lightning_appid} |
103 |
cp -f -r %SOURCE1 %buildroot%{tbextdir}/%{lightning_appid} |
104 |
|
105 |
%clean |
106 |
rm -rf $RPM_BUILD_ROOT |
107 |
|
108 |
%files |
109 |
%defattr(644,root,root,755) |
110 |
%{tbextdir}/* |