Name: python-xpcom Version: 1.9.2 Release: 1mamba Summary: Python interface for mozilla XPCOM library Group: Applications/Networking Vendor: openmamba Distribution: openmamba Packager: gil URL: https://developer.mozilla.org/en/PyXPCOM # hg clone http://hg.mozilla.org/pyxpcom pyxpcom Source: pyxpcom-%{version}-src-hg-20100404.tar.gz Patch0: python-xpcom-1.9.2-dynstr.patch License: GPL, LGPL, MPL 1.1 BuildRequires: autoconf2.13 ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libgcc BuildRequires: libnspr-devel BuildRequires: libpython-devel BuildRequires: libstdc++6-devel BuildRequires: xulrunner-devel ## AUTOBUILDREQ-END Provides: python-xulrunner Obsoletes: python-xulrunner BuildRoot: %{_tmppath}/%{name}-%{version}-root %description PyXPCOM allows for communication between Python and XPCOM, such that a Python application can access XPCOM objects, and XPCOM can access any Python class that implements an XPCOM interface. %package devel Summary: Development files for building Gecko applications written in python Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: xulrunner-devel Provides: python-xulrunner-devel Obsoletes: python-xulrunner-devel %description devel Python interface for mozilla XPCOM library. Development files for building Gecko applications written in python. %prep %setup -q -n pyxpcom %patch0 mkdir objdir autoconf-2.13 %build export CFLAGS=$RPM_OPT_FLAGS export CXXFLAGS=$RPM_OPT_FLAGS export PYTHON=%{__python} PYTHON_PATH=-I%{_includedir}/python%{python_version} LD_LIBRARY_PATH=-L%{_libdir}/python%{python_version} cd objdir ../configure \ --host=%{_host} \ --build=%{_build} \ --with-libxul-sdk=$(pkg-config \ --variable=sdkdir libxul) \ --with-system-nspr \ --prefix=%{_prefix} \ --libdir=%{_libdir} %make %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %define distdir objdir/dist/bin %define includedir objdir/dist/include %define libdir objdir/dist/lib %define idldir objdir/dist/idl function add_files() { DIRECTORY=$1 TARGET=$2 INSTALL_DIR=$3 %{__mkdir} -p $RPM_BUILD_ROOT/$INSTALL_DIR if [ -n "$DIRECTORY" ]; then %{__cp} -r $DIRECTORY/* $RPM_BUILD_ROOT/$INSTALL_DIR fi echo "%dir $INSTALL_DIR" >> %{_builddir}/pyxpcom/$TARGET echo "$INSTALL_DIR/*" >> %{_builddir}/pyxpcom/$TARGET } pushd . %{__chmod} 755 %{distdir}/python/xpcom/_xpcom.so echo %defattr\(-,root,root\) > %{_builddir}/pyxpcom/files.txt add_files %{distdir} "files.txt" $(pkg-config --variable=libdir libxul) echo %defattr\(-,root,root\) > %{_builddir}/pyxpcom/files-devel.txt add_files %{includedir} "files-devel.txt" `pkg-config --variable=includedir libxul`/pyxpcom add_files %{idldir} "files-devel.txt" $(pkg-config --variable=includedir libxul) INSTALL_DIR=$(pkg-config --variable=sdkdir libxul)/sdk/lib LIB_DIR=$(pkg-config --variable=libdir libxul) %{__mkdir} -p %{buildroot}/$INSTALL_DIR ln -s $LIB_DIR/libpyxpcom.so %{buildroot}/$INSTALL_DIR add_files "" "files-devel.txt" $INSTALL_DIR popd %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files -f files.txt %files devel -f files-devel.txt %changelog * Sun Apr 04 2010 gil 1.9.2-1mamba - package created by autospec