File python-xpcom192.spec of Package python-xpcom192
#
# spec file for package python-xpcom192 (Version 0.0.20100305)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2009-2010 Wolfgang Rosenauer
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: python-xpcom192
BuildRequires: autoconf213 gcc-c++ mozilla-xulrunner192-devel pkg-config python-devel zip
License: GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
Summary: Python XPCOM bindings for Gecko 1.9.2
Version: 0.0.20100305
Release: 6
Group: Development/Languages/Python
Provides: python-xpcom
Conflicts: python-xpcom190 python-xpcom191
Requires: mozilla-xulrunner192
Source: pyxpcom-%{version}.tar.bz2
Source1: create-tar.sh
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%py_requires
%define xredir %(pkg-config --variable=libdir mozilla-gtkmozembed)
%define includedir %(pkg-config --variable=includedir libxul)
%define idldir %(pkg-config --variable=idldir libxul)
%description
This package contains the libraries and Python modules necessary to use
Mozilla XULRunner's XPCOM.
%package devel
License: GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
Summary: Development files for python XPCOM interface
Group: Development/Languages/Python
Requires: %{name} = %{version}
%description devel
Development files for building Gecko applications written in python.
%prep
%setup -q -n pyxpcom-%{version}
%build
autoconf-2.13 configure.in > configure
chmod 755 configure
mkdir objdir
cd objdir
../configure \
--with-libxul-sdk=$(pkg-config --variable=sdkdir libxul) \
--with-system-nspr
make %{?jobs:-j%jobs} USE_ELF_DYNSTR_GC=
%install
cd objdir/dist
%__mkdir_p $RPM_BUILD_ROOT%{xredir}/components/
%__mkdir_p $RPM_BUILD_ROOT%{py_sitedir}/
%__mkdir_p $RPM_BUILD_ROOT%{includedir}/pyxpcom
%__cp bin/libpyxpcom.so $RPM_BUILD_ROOT%{xredir}
%__cp bin/components/libpydom.so $RPM_BUILD_ROOT%{xredir}/components/
%__cp bin/components/libpyloader.so $RPM_BUILD_ROOT%{xredir}/components/
%__cp bin/components/pyabout.py $RPM_BUILD_ROOT%{xredir}/components/
%__cp -r bin/python/* $RPM_BUILD_ROOT%{py_sitedir}
%__cp -r include/* $RPM_BUILD_ROOT%{includedir}/pyxpcom
%__cp -r idl/* $RPM_BUILD_ROOT%{idldir}/
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%{xredir}/libpyxpcom.so
%{xredir}/components/libpydom.so
%{xredir}/components/libpyloader.so
%{xredir}/components/pyabout.py
%{py_sitedir}/nsdom/
%{py_sitedir}/xpcom/
%files devel
%defattr(-,root,root)
%{includedir}/pyxpcom
%{idldir}/*.idl
%changelog