b95be9c
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
b95be9c
b95be9c
%define gecko_version 1.9
b95be9c
b95be9c
Name:           libproxy
b95be9c
Version:        0.2.3
b95be9c
Release:        8%{?dist}
b95be9c
Summary:        A library handling all the details of proxy configuration
b95be9c
b95be9c
Group:          System Environment/Libraries
b95be9c
License:        LGPLv2+
b95be9c
URL:            http://code.google.com/p/libproxy/
b95be9c
Source0:        http://libproxy.googlecode.com/files/libproxy-%{version}.tar.gz
b95be9c
Patch0:         libproxy-0.2.3-dbus.patch
b95be9c
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
b95be9c
b95be9c
BuildRequires:  python-devel
b95be9c
#Virtual Provides - We need either mozjs or WebKit
b95be9c
Requires: %{name}-pac >= %{version}
b95be9c
#
b95be9c
Requires: libproxy-python = %{version}-%{release}
b95be9c
Requires: libproxy-bin = %{version}-%{release}
b95be9c
b95be9c
# gnome
b95be9c
BuildRequires:  GConf2-devel
b95be9c
# mozjs
b95be9c
BuildRequires:  gecko-devel >= %{gecko_version}
b95be9c
# NetworkManager
b95be9c
BuildRequires:  NetworkManager-devel
b95be9c
BuildRequires:  dbus-devel
b95be9c
# webkit (gtk)
b95be9c
BuildRequires:  WebKit-gtk-devel
b95be9c
# kde
b95be9c
BuildRequires:  libXmu-devel
b95be9c
BuildRequires:  libX11-devel
b95be9c
b95be9c
b95be9c
%description
b95be9c
libproxy offers the following features:
b95be9c
b95be9c
    * extremely small core footprint (< 35K)
b95be9c
    * no external dependencies within libproxy core
b95be9c
      (libproxy plugins may have dependencies)
b95be9c
    * only 3 functions in the stable external API
b95be9c
    * dynamic adjustment to changing network topology
b95be9c
    * a standard way of dealing with proxy settings across all scenarios
b95be9c
    * a sublime sense of joy and accomplishment 
b95be9c
b95be9c
Non-default rpmbuild options:
b95be9c
--with webkit:           Enable WebKit-gtk support
b95be9c
b95be9c
b95be9c
%package        bin
b95be9c
Summary:        Binary to test %{name}
b95be9c
Group:          Applications/System
b95be9c
Requires:       %{name} = %{version}-%{release}
b95be9c
b95be9c
%description    bin
b95be9c
The %{name}-bin package contains the proxy binary for %{name}
b95be9c
b95be9c
%package        python
b95be9c
Summary:        Binding for %{name} and python
b95be9c
Group:          System Environment/Libraries
b95be9c
Requires:       %{name} = %{version}-%{release}
b95be9c
b95be9c
%description    python
b95be9c
The %{name}-python package contains the python binding for %{name}
b95be9c
b95be9c
%package        gnome
b95be9c
Summary:        Plugin for %{name} and gnome
b95be9c
Group:          System Environment/Libraries
b95be9c
Requires:       %{name} = %{version}-%{release}
b95be9c
b95be9c
%description    gnome
b95be9c
The %{name}-gnome package contains the %{name} plugin for gnome.
b95be9c
b95be9c
%package        kde
b95be9c
Summary:        Plugin for %{name} and kde
b95be9c
Group:          System Environment/Libraries
b95be9c
Requires:       %{name} = %{version}-%{release}
b95be9c
b95be9c
%description    kde
b95be9c
The %{name}-kde package contains the %{name} plugin for kde.
b95be9c
b95be9c
%package        mozjs
b95be9c
Summary:        Plugin for %{name} and mozjs
b95be9c
Group:          System Environment/Libraries
b95be9c
Requires:       %{name} = %{version}
b95be9c
#Tweak this according to the current gecko-libs version
b95be9c
Requires:       gecko-libs >= %{gecko_version}
b95be9c
Provides:       %{name}-pac = %{version}-%{release}
b95be9c
b95be9c
%description    mozjs
b95be9c
The %{name}-mozjs package contains the %{name} plugin for mozjs.
b95be9c
b95be9c
%package        webkit
b95be9c
Summary:        Plugin for %{name} and webkit
b95be9c
Group:          System Environment/Libraries
b95be9c
Requires:       %{name} = %{version}
b95be9c
Provides:       %{name}-pac = %{version}-%{release}
b95be9c
b95be9c
%description    webkit
b95be9c
The %{name}-webkit package contains the %{name} plugin for
b95be9c
webkit.
b95be9c
b95be9c
%package        devel
b95be9c
Summary:        Development files for %{name}
b95be9c
Group:          Development/Libraries
b95be9c
Requires:       %{name} = %{version}-%{release}
b95be9c
Requires:       pkgconfig
b95be9c
b95be9c
%description    devel
b95be9c
The %{name}-devel package contains libraries and header files for
b95be9c
developing applications that use %{name}.
b95be9c
b95be9c
b95be9c
%prep
b95be9c
%setup -q
b95be9c
%patch0 -p1 -b .dbus
b95be9c
touch -r configure.dbus configure
b95be9c
touch -r configure.ac.dbus configure.ac
b95be9c
b95be9c
b95be9c
%build
b95be9c
%configure --includedir=%{_includedir}/libproxy --disable-static --with-python
b95be9c
make %{?_smp_mflags}
b95be9c
b95be9c
b95be9c
%install
b95be9c
rm -rf $RPM_BUILD_ROOT
b95be9c
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
b95be9c
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
b95be9c
b95be9c
b95be9c
%clean
b95be9c
rm -rf $RPM_BUILD_ROOT
b95be9c
b95be9c
b95be9c
%post -p /sbin/ldconfig
b95be9c
b95be9c
%postun -p /sbin/ldconfig
b95be9c
b95be9c
b95be9c
%files 
b95be9c
%defattr(-,root,root,-)
b95be9c
%doc AUTHORS COPYING README
b95be9c
%{_libdir}/*.so.*
b95be9c
%dir %{_libdir}/%{name}
b95be9c
%dir %{_libdir}/%{name}/%{version}
b95be9c
%dir %{_libdir}/%{name}/%{version}/plugins
b95be9c
%{_libdir}/%{name}/%{version}/plugins/envvar.so
b95be9c
%{_libdir}/%{name}/%{version}/plugins/file.so
b95be9c
%{_libdir}/%{name}/%{version}/plugins/networkmanager.so
b95be9c
b95be9c
%files bin
b95be9c
%defattr(-,root,root,-)
b95be9c
%{_bindir}/proxy
b95be9c
b95be9c
%files python
b95be9c
%defattr(-,root,root,-)
b95be9c
%{python_sitelib}/*
b95be9c
b95be9c
%files gnome
b95be9c
%defattr(-,root,root,-)
b95be9c
%{_libdir}/%{name}/%{version}/plugins/gnome.so
b95be9c
b95be9c
%files kde
b95be9c
%defattr(-,root,root,-)
b95be9c
%{_libdir}/%{name}/%{version}/plugins/kde.so
b95be9c
b95be9c
%files mozjs
b95be9c
%defattr(-,root,root,-)
b95be9c
%{_libdir}/%{name}/%{version}/plugins/mozjs.so
b95be9c
b95be9c
%files webkit
b95be9c
%defattr(-,root,root,-)
b95be9c
%{_libdir}/%{name}/%{version}/plugins/webkit.so
b95be9c
b95be9c
%files devel
b95be9c
%defattr(-,root,root,-)
b95be9c
%{_includedir}/libproxy/
b95be9c
%{_libdir}/*.so
b95be9c
%{_libdir}/pkgconfig/libproxy-1.0.pc
b95be9c
b95be9c
b95be9c
%changelog
b95be9c
* Thu Jan 22 2009 kwizart < kwizart at gmail.com > - 0.2.3-8
b95be9c
- Merge NetworkManager module into the main libproxy package
b95be9c
- Main Requires the -python and -bin subpackage 
b95be9c
 (splitted for multilibs compliance).
b95be9c
b95be9c
* Fri Oct 24 2008 kwizart < kwizart at gmail.com > - 0.2.3-7
b95be9c
- Disable Gnome/KDE default support via builtin modules.
b95be9c
 (it needs to be integrated via Gconf2/neon instead).
b95be9c
b95be9c
* Tue Oct 21 2008 kwizart < kwizart at gmail.com > - 0.2.3-6
b95be9c
- Disable Obsoletes.
b95be9c
- Requires ev instead of evr for optionnals sub-packages.
b95be9c
b95be9c
* Tue Oct 21 2008 kwizart < kwizart at gmail.com > - 0.2.3-5
b95be9c
- Use conditionals build.
b95be9c
b95be9c
* Mon Sep 15 2008 kwizart < kwizart at gmail.com > - 0.2.3-4
b95be9c
- Remove plugin- in the name of the packages
b95be9c
b95be9c
* Mon Aug  4 2008 kwizart < kwizart at gmail.com > - 0.2.3-3
b95be9c
- Move proxy.h to libproxy/proxy.h
b95be9c
  This will prevent it to be included in the default include path
b95be9c
- Split main to libs and util and use libproxy to install all
b95be9c
b95be9c
* Mon Aug  4 2008 kwizart < kwizart at gmail.com > - 0.2.3-2
b95be9c
- Rename binding-python to python
b95be9c
- Add Requires: gecko-libs >= %%{gecko_version}
b95be9c
- Fix some descriptions
b95be9c
- Add plugin-webkit package
b95be9c
 
b95be9c
* Fri Jul 11 2008 kwizart < kwizart at gmail.com > - 0.2.3-1
b95be9c
- Convert to Fedora spec
b95be9c
b95be9c
* Fri Jun 6 2008 - dominique-rpm@leuenberger.net
b95be9c
- Updated to version 0.2.3
b95be9c
* Wed Jun 4 2008 - dominique-rpm@leuenberger.net
b95be9c
- Extended spec file to build all available plugins
b95be9c
* Tue Jun 3 2008 - dominique-rpm@leuenberger.net
b95be9c
- Initial spec file for Version 0.2.2
b95be9c