libproxy/libproxy.spec
2019-11-06 19:39:36 +08:00

114 lines
3.5 KiB
RPMSpec

Name: libproxy
Version: 0.4.15
Release: 11
Summary: Libproxy is a library that provides automatic proxy configuration management
License: LGPLv2+
URL: https://libproxy.github.io/libproxy/
Source0: https://github.com/libproxy/%{name}/archive/%{version}.tar.gz
# Source1 comes from the Debian package.
Source1: proxy.1
# Patch0 and patch 1 come from fedora commuity
Patch0: 0001-Add-config-module-for-querying-PacRunner-d-mon.patch
Patch1: libproxy-0.4.11-crash.patch
# Patch 2 and 3 are backported from upstream commuity
Patch2: libproxy-0.4.15-python3738.patch
Patch3: libproxy-0.4.15-mozjs52.patch
BuildRequires: cmake >= 2.6.0 gcc-c++ libmodman-devel >= 2.0.1
BuildRequires: pkgconfig(gio-2.0) >= 2.26 pkgconfig(mozjs-52) pkgconfig(libnm) python2-devel python3-devel
BuildRequires: pkgconfig(dbus-1) pkgconfig(javascriptcoregtk-4.0)
Provides: %{name}-bin %{name}-gnome %{name}-kde %{name}-mozjs %{name}-networkmanager %{name}-pacrunner %{name}-webkitgtk4
Obsoletes: %{name}-bin %{name}-gnome %{name}-kde %{name}-mozjs %{name}-networkmanager %{name}-pacrunner %{name}-webkitgtk4
%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.
%package -n python2-%{name}
Summary: Binding for %{name} and python2
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%{?python_provide:%python_provide python2-%{name}}
%description -n python2-%{name}
The python2 binding for libproxy.
%package -n python3-%{name}
Summary: Binding for %{name} and python3
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%{?python_provide:%python_provide python3-%{name}}
%description -n python3-%{name}
The python3 binding for libproxy.
%package devel
Summary: Libproxy provides consistent proxy configuration to applications - Development Files
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
This package contains libraries and header files for developing applications.
%package_help
%prep
%autosetup -p1
%build
%{cmake} \
-DMODULE_INSTALL_DIR=%{_libdir}/%{name}/%{version}/modules \
-DWITH_PERL=OFF -DWITH_GNOME3=ON -DWITH_PYTHON2=ON -DPYTHON2_EXECUTABLE=%{__python2} \
-DWITH_PYTHON3=ON -DWITH_WEBKIT3=ON -DWITH_MOZJS=ON .
%make_build
%install
%make_install
mkdir -p %{buildroot}%{_libdir}/%{name}/%{version}/modules
install -Dpm 0644 %{SOURCE1} %{buildroot}/%{_mandir}/man1/proxy.1
%check
make test
%ldconfig_scriptlets
%files
%doc AUTHORS README COPYING
%{_libdir}/*.so.*
%{_bindir}/proxy
%{_libdir}/%{name}/%{version}/modules/*
%{_libexecdir}/pxgsettings
%files -n python2-%{name}
%{python2_sitelib}/%{name}.*
%files -n python3-%{name}
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/%{name}.*
%files devel
%{_includedir}/proxy.h
%{_libdir}/*.so
%{_libdir}/pkgconfig/libproxy-1.0.pc
%{_datadir}/cmake/Modules/Findlibproxy.cmake
%files help
%{_mandir}/man1/proxy.1*
%changelog
* Thu Oct 17 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.30-19
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:remove the /usr/bin/kreadconfig5 in buildRequires.
* Tue Sep 10 2019 liyongqiang<liyongqiang10@huawei.com> - 0.4.15-10
- Package init