File firefox-ext-bonjourfoxy.spec of Package firefox-ext-bonjourfoxy

# icecream 0

%define _mozillaextpath %{firefox_mozillapath}/extensions

Name: firefox-ext-bonjourfoxy
Version: 0.8.0_git201010072141
Release: 1
Summary: BonjourFoxy extension for firefox
License: Apache License
Group:	Productivity/Networking/Web/Browsers
URL:	http://andrew.tj.id.au/projects/bonjourfoxy/
Source0: http://www.bonjourfoxy.net/releases/bonjourfoxy-nix-%{version}.tar.bz2
Patch0:         bonjourfoxy-0.8.0.diff
Requires:	firefox = %{firefox_mainver}
BuildRequires:	firefox-devel
BuildRequires:  mozilla-xulrunner192-devel
BuildRequires:	mozilla-nspr-devel
BuildRequires:	avahi-compat-mDNSResponder-devel
BuildRequires:  pkg-config
BuildRequires:  gcc-c++
BuildRoot: %{_tmppath}/%{name}-%{version}

%description
BonjourFoxy adds Bonjour (DNS Service Discovery) support to Firefox 3. It is
beta software however it is feature complete in that via the use of a sidebar
or menu you can browse for and navigate to services. Bonjourfoxy also provides
an interface for Extension developers to perform browse, resolve and register
services as well as to enumerate browse/registration domains.

%prep
%setup -q -n bonjourfoxy-nix-%{version}
%patch0 -p1

%build
export SUSE_ASNEEDED=0
make nixdir
pushd nix/bonjourfoxy-*
make \
    CFLAGS="$RPM_OPT_FLAGS -fPIC" \
    FF_FULL_VER=%{firefox_version} \
    EXTENSIONS_PATH=%{_mozillaextpath}

# verify we actually built something
havelib=
echo "searching for built libraries ..."
for lib in scratch/lib/*/*.so; do
	havelib=1
	echo "$lib"
done
test -n "$lib" || false

%install
rm -rf %{buildroot}
pushd nix/bonjourfoxy-*
make install \
    DESTDIR=%{buildroot} \
    FF_RELS=%{firefox_mainver} \
    CFLAGS="$RPM_OPT_FLAGS -fPIC" \
    FF_FULL_VER=%{firefox_version} \
    EXTENSIONS_PATH=%{_mozillaextpath}

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%dir %firefox_mozillapath
%{_mozillaextpath}

%changelog
openSUSE Build Service is sponsored by