%define changeset 8b2df661ca58 %define revision 1366 %define moz_version 2.0b7 %define internal_version 0.3a1pre %define mozappdir %{_libdir}/%{name}-%{internal_version} %define __prelink_undo_cmd %{nil} %define pre .a1pre Name: instantbird Version: 0.3 Release: 0.1%{pre}.%{revision}hg%{?dist} Summary: Instant messaging client based on XULrunner and libpurple Group: Applications/Internet License: GPLv2+ URL: http://instantbird.com/ Source0: http://hg.instantbird.org/instantbird/archive/%{changeset}.tar.bz2 Source1: xulrunner-%{moz_version}.source.tar.bz2 Source2: mozconfig Source3: %{name}.desktop Source4: %{name}.1 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: xulrunner-devel autoconf213 desktop-file-utils %if %{fedora} <= 12 BuildRequires: xulrunner-devel-unstable %endif Patch0: %{name}-0.2-system-nss.patch %description Instantbird is an IM client based on Mozilla's XULrunner. It supports connecting to all of the popular IRC networks through the use of libpurple, Pidgin's messaging core. It supports all of the usual IM networks, like AIM, MSN, Jabber and so on. %prep %setup -q -n Instantbird-%{changeset} -a 1 mv mozilla-central mozilla #patch0 -p1 -b .system-nss rm -f mozconfig cat %{SOURCE2} >> .mozconfig echo "ac_add_options --with-libxul-sdk=\ `pkg-config --variable=sdkdir libxul`" >> .mozconfig %build # Mozilla builds with -Wall with exception of a few warnings which show up # everywhere in the code; so, don't override that. RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | %{__sed} -e 's/-fexceptions/-fno-exceptions/g') MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | %{__sed} -e 's/-Wall//') export CFLAGS="$MOZ_OPT_FLAGS" export CXXFLAGS="$MOZ_OPT_FLAGS" export PREFIX='%{_prefix}' export LIBDIR='%{_libdir}' MOZ_SMP_FLAGS=-j1 INTERNAL_GECKO=%{internal_version} MOZ_APP_DIR=%{_libdir}/%{name}-${INTERNAL_GECKO} export LDFLAGS="-Wl,-rpath,${MOZ_APP_DIR}" make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" %install rm -rf $RPM_BUILD_ROOT INTERNAL_GECKO=%{internal_version} INTERNAL_APP_NAME=%{name}-${INTERNAL_GECKO} MOZ_APP_DIR=%{_libdir}/${INTERNAL_APP_NAME} pushd obj-instantbird/mozilla ln -s ../instantbird instantbird popd pushd obj-instantbird make install DESTDIR=$RPM_BUILD_ROOT popd mkdir -p $RPM_BUILD_ROOT%{_datadir}/{applications,icons/hicolor/16x16/apps,icons/hicolor/32x32/apps,icons/hicolor/48x48/apps,icons/hicolor/128x128/apps} # Install desktop file desktop-file-install \ --dir $RPM_BUILD_ROOT%{_datadir}/applications \ %{SOURCE3} # Install icons pushd instantbird/branding/release/gtk install -Dpm 644 default16.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/%{name}.png install -Dpm 644 default.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/%{name}.png install -Dpm 644 default48.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/%{name}.png popd pushd instantbird/branding/release install -Dpm 644 mozicon128.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps/%{name}.png popd # Install man page install -Dpm 644 %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1 sed 's|moz_libdir=|moz_libdir=%{_libdir}/%{name}-%{internal_version}|g' $RPM_BUILD_ROOT%{mozappdir}/instantbird # Remove shebang chmod -x $RPM_BUILD_ROOT%{_libdir}/%{name}-%{internal_version}/defaults/profile/{prefs.js,mimeTypes.rdf,localstore.rdf} \ $RPM_BUILD_ROOT%{_libdir}/%{name}-%{internal_version}/icons/{mozicon16.xpm,mozicon50.xpm} %clean rm -rf $RPM_BUILD_ROOT %post touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %postun if [ $1 -eq 0 ] ; then touch --no-create %{_datadir}/icons/hicolor &>/dev/null gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi %posttrans gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files %defattr(-,root,root,-) %doc LICENSE README.txt %{_bindir}/%{name} %{_libdir}/%{name}-%{internal_version} %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/*/apps/%{name}.png %{_mandir}/man1/%{name}.* %changelog * Thu Nov 17 2010 Hicham HAOUARI - 0.3-0.1.a1pre.1366hg - Initial package for Fedora.