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