Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > e2a891db83b39c3d4817ae3cf8ba93f9 > files > 5

libproxy-0.4.6-8.1.mga1.src.rpm

%define gecko_version 1.9

%define bootstrap 0
%{?_without_bootstrap: %global bootstrap 0}
%{?_with_bootstrap: %global bootstrap 1}

%define major 1
%define libname %mklibname proxy %{major}
%define modmanmajor 1
%define libnamemodman %mklibname modman %{modmanmajor}
%define develname %mklibname -d proxy
Name:           libproxy
Version:        0.4.6
%define subrel	1
Release:        %mkrel 8
Summary:        A library handling all the details of proxy configuration

Group:          System/Libraries
License:        LGPLv2+
URL:            http://code.google.com/p/libproxy/
# http://code.google.com/p/libproxy/issues/detail?id=130&can=1&q=perl
Source0:        http://%{name}.googlecode.com/files/%{name}-%{version}.tar.gz
Patch0:		libproxy-0.4.6-firefox4.patch
# from upstream r832 (fix build error)
Patch1:		libproxy-0.4.7-mozjs-dnsResolve.patch
Patch2:		libproxy-0.4.7-pac-buffer-overflow.patch

BuildRequires:  cmake
BuildRequires:  python-devel
#perl
BuildRequires:  perl-devel
# gnome
BuildRequires:  libGConf2-devel
%if !%{bootstrap}
# mozjs
BuildRequires:  xulrunner-devel >= %{gecko_version}
# NetworkManager
#gw disabled, it is in contrib
#BuildRequires:  NetworkManager-devel
BuildRequires:  dbus-glib-devel
# webkit (gtk)
BuildRequires:  webkitgtk-devel
# kde
BuildRequires:	kdelibs4-devel
BuildRequires:  libxmu-devel
%endif
Obsoletes:	libproxy0


%description
libproxy offers the following features:

    * extremely small core footprint (< 35K)
    * no external dependencies within libproxy core
      (libproxy plugins may have dependencies)
    * only 3 functions in the stable external API
    * dynamic adjustment to changing network topology
    * a standard way of dealing with proxy settings across all scenarios
    * a sublime sense of joy and accomplishment 

%package -n %{libname}
Group:System/Libraries
Summary:        A library handling all the details of proxy configuration
#Virtual Provides - We need either mozjs or WebKit
%if !%{bootstrap}
Requires: %{name}-pac >= %{version}
%endif
#

%description -n %{libname}
libproxy offers the following features:

    * extremely small core footprint (< 35K)
    * no external dependencies within libproxy core
      (libproxy plugins may have dependencies)
    * only 3 functions in the stable external API
    * dynamic adjustment to changing network topology
    * a standard way of dealing with proxy settings across all scenarios
    * a sublime sense of joy and accomplishment 

%package -n %{libnamemodman}
Group:System/Libraries
Summary:        A library handling all the details of proxy configuration

%description -n %{libnamemodman}
libproxy offers the following features:

    * extremely small core footprint (< 35K)
    * no external dependencies within libproxy core
      (libproxy plugins may have dependencies)
    * only 3 functions in the stable external API
    * dynamic adjustment to changing network topology
    * a standard way of dealing with proxy settings across all scenarios
    * a sublime sense of joy and accomplishment 

%package        utils
Summary:        Binary to test %{name}
Group:          System/Configuration/Networking
Requires:       %{libname} = %{version}-%{release}

%description    utils
The %{name}-utils package contains the proxy binary for %{name}

%package -n python-%{name}
Summary:        Binding for %{name} and python
Group:          Development/Python
Requires:       %{libname} = %{version}-%{release}

%description -n python-%{name}
The python-%{name} package contains the python binding for %{name}

%package        perl
Summary:        Perl bindings for %{name}
Group:          Development/Perl
Requires:       %{libname} = %{version}-%{release}

%description    perl
This contains the perl bindings for the libproxy library.

%package        gnome
Summary:        Plugin for %{name} and gnome
Group:          System/Libraries
Requires:       %{libname} = %{version}-%{release}

%description    gnome
The %{name}-gnome package contains the %{name} plugin for gnome.

%if !%bootstrap
%package        kde
Summary:        Plugin for %{name} and kde
Group:          System/Libraries
Requires:       %{libname} = %{version}-%{release}

%description    kde
The %{name}-kde package contains the %{name} plugin for kde.

%package        mozjs
Summary:        Plugin for %{name} and mozjs
Group:          System/Libraries
Requires:       %{libname} = %{version}
#Tweak this according to the current gecko-libs version
Requires:       libxulrunner >= %{gecko_version}
Provides:       %{name}-pac = %{version}-%{release}

%description    mozjs
The %{name}-mozjs package contains the %{name} plugin for mozjs.

%package        webkit
Summary:        Plugin for %{name} and webkit
Group:          System/Libraries
Requires:       %{libname} = %{version}
Provides:       %{name}-pac = %{version}-%{release}

%description    webkit
The %{name}-webkit package contains the %{name} plugin for
webkit.
%endif

%package -n %{develname}
Summary:        Development files for %{name}
Group:          Development/C
Requires:       %{libname} = %{version}-%{release}
Requires:       %{libnamemodman} = %{version}-%{release}
Provides:	%{name}-devel = %{version}-%{release}

%description -n %{develname}
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%prep
%setup -q
%patch0 -p0 -b .firefox4
%patch1 -p1 -b .dnsResolve
%patch2 -p0 -b .pac

%build
%if %{bootstrap}
export CC="gcc -L$(pkg-config --variable sdkdir libxul)/lib"
%endif
%cmake -Dlibexecdir=%{_libexecdir} -DLIBEXEC_INSTALL_DIR=%{_libexecdir} \
-DMODULE_INSTALL_DIR=%{_libdir}/%{name}/%{version}/modules \
-DPERL_VENDORINSTALL=1
%make

%install
rm -rf %{buildroot}
cd build
%makeinstall_std
rm -f %{buildroot}%{_libdir}/libproxy/%{version}/modules/network_networkmanager.so
#gw fix pkgconfig file
sed -i -e "s^Version:.*^Version: %version^" %{buildroot}%{_libdir}/pkgconfig/*.pc

%clean
rm -rf %{buildroot}

%files -n %{libname}
%doc AUTHORS README
%{_libdir}/libproxy.so.%{major}*
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/%{version}
%dir %{_libdir}/%{name}/%{version}/modules

%files -n %{libnamemodman}
%{_libdir}/libmodman.so.%{modmanmajor}*


%files utils
%{_bindir}/proxy

%files -n python-%{name}
%{py_platsitedir}/*

%files perl
%{perl_vendorarch}/Net/Libproxy.pm
%{perl_vendorarch}/auto/Net/Libproxy

%files gnome
%{_libdir}/%{name}/%{version}/modules/config_gnome.so
%{_libexecdir}/pxgconf

%if !%{bootstrap}
%files kde
%{_libdir}/%{name}/%{version}/modules/config_kde4.so

%files mozjs
%{_libdir}/%{name}/%{version}/modules/pacrunner_mozjs.so

%files webkit
%{_libdir}/%{name}/%{version}/modules/pacrunner_webkit.so
%endif

%files -n %{develname}
%{_includedir}/proxy.h
%{_libdir}/*.so
%{_libdir}/pkgconfig/libproxy-1.0.pc
%{_datadir}/cmake/Modules/Findlibproxy.cmake


%changelog

* Tue Oct 23 2012 luigiwalser <luigiwalser> 0.4.6-8.1.mga1
+ Revision: 309494
- backport upstream patch to fix build error
- add upstream changes to fix CVE-2012-4504 and associated issues (r85[349])

* Sun May 15 2011 pterjan <pterjan> 0.4.6-8.mga1
+ Revision: 98944
- Rebuild for fixed find-requires

* Wed Apr 20 2011 pterjan <pterjan> 0.4.6-7.mga1
+ Revision: 89143
- Use upstream fix for firefox 4

  + ennael <ennael>
    - obsoletes libproxy0 (upgrade from mdv)

* Sat Jan 22 2011 pterjan <pterjan> 0.4.6-5.mga1
+ Revision: 33136
- Fix build with firefox 4
- Disbale bootstrap

  + jquelin <jquelin>
    - rebuild

* Sat Jan 15 2011 blino <blino> 0.4.6-3.mga1
+ Revision: 18885
- bootstrap libproxy
- do not build xulrunner and kde plugins in bootstrap
- imported package libproxy