From fa84a65d2b99eb0ef9a5757dfee782265acef30a Mon Sep 17 00:00:00 2001 From: "chenyuao.cya" Date: Mon, 10 Apr 2023 19:23:03 +0800 Subject: [PATCH] change spec file format --- libproxy.spec | 112 ++++++++++++++++++++++---------------------------- 1 file changed, 50 insertions(+), 62 deletions(-) diff --git a/libproxy.spec b/libproxy.spec index 999faff..91b9d41 100644 --- a/libproxy.spec +++ b/libproxy.spec @@ -1,98 +1,80 @@ -%define anolis_release 2 -# When we are bootstrapping, we drop some dependencies. +%define anolis_release 3 + %bcond_with bootstrap +%bcond_with pacrunner Name: libproxy Version: 0.4.18 Release: %{anolis_release}%{?dist} -Summary: A library handling all the details of proxy configuration - +Summary: A library that provides automatic proxy configuration management. License: LGPLv2+ URL: https://libproxy.github.io/libproxy/ Source0: https://github.com/libproxy/%{name}/releases/download/%{name}-%{version}.tar.xz -# Taken from the Debian package. Source1: proxy.1 -BuildRequires: cmake >= 2.6.0 -BuildRequires: gcc-c++ +BuildRequires: gcc gcc-c++ cmake >= 2.6.0 +BuildRequires: automake autoconf %if %{without bootstrap} -# gnome -BuildRequires: pkgconfig(gio-2.0) >= 2.26 -# NetworkManager -BuildRequires: pkgconfig(libnm) -# ConnMan's pacrunner (and NetworkManager) -BuildRequires: pkgconfig(dbus-1) -# for libproxy's duktape pacrunner -BuildRequires: pkgconfig(duktape) -# Python +BuildRequires: pkgconfig(gio-2.0) >= 2.26 pkgconfig(libnm) pkgconfig(dbus-1) pkgconfig(duktape) BuildRequires: python3-devel %endif %description -libproxy offers the following features: - - * extremely small core footprint (< 35K) - * no external dependencies within libproxy core - (libproxy plugins may have dependencies) - * only 4 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 +libproxy is a library that provides automatic proxy configuration management. - -%package doc -Summary: Documentation files for %{name} +%package bin +Summary: Binary to test %{name} Requires: %{name} = %{version}-%{release} -BuildArch: noarch -%description doc -The %{name}-doc package contains documentation files for %{name}. +%description bin +The libproxy-bin package contains the proxy binary for libproxy. -%package bin -Summary: Binary to test %{name} +%package devel +Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} -%description bin -The %{name}-bin package contains the proxy binary for %{name} +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. %if %{without bootstrap} -%package -n python3-%{name} -Summary: Binding for %{name} and python3 +%package -n python3-%{name} +Summary: Binding for libproxy and python3 Requires: %{name} = %{version}-%{release} BuildArch: noarch %{?python_provide:%python_provide python3-%{name}} %description -n python3-%{name} -The python3 binding for %{name} +The python3 binding for libproxy %package gnome Summary: Plugin for %{name} and gnome Requires: %{name} = %{version}-%{release} %description gnome -The %{name}-gnome package contains the %{name} plugin for gnome. - -%package networkmanager -Summary: Plugin for %{name} and networkmanager -Requires: %{name} = %{version}-%{release} - -%description networkmanager -The %{name}-networkmanager package contains the %{name} plugin -for networkmanager. +The libproxy-gnome package contains the libproxy plugin for gnome. %package duktape -Summary: Plugin for %{name} and duktape +Summary: Plugin for libproxy and duktape Requires: %{name} = %{version}-%{release} Provides: %{name}-pac = %{version}-%{release} Obsoletes: %{name}-mozjs <= %{EVR} Obsoletes: %{name}-webkitgtk4 <= %{EVR} %description duktape -The %{name}-duktape package contains the %{name} plugin for +The libproxy-duktape package contains the libproxy plugin for duktape. +%package networkmanager +Summary: Plugin for %{name} and networkmanager +Requires: %{name} = %{version}-%{release} + +%description networkmanager +The libproxy-networkmanager package contains the libproxy plugin for networkmanager. + +if %{with pacrunner} %package pacrunner Summary: Plugin for %{name} and PacRunner Requires: %{name} = %{version}-%{release} @@ -104,13 +86,13 @@ The %{name}-pacrunner package contains the %{name} plugin for ConnMan's PacRunner. %endif -%package devel -Summary: Development files for %{name} +%package doc +Summary: Documentation files for %{name} Requires: %{name} = %{version}-%{release} +BuildArch: noarch -%description devel -The %{name}-devel package contains libraries and header files for -developing applications that use %{name}. +%description doc +The %{name}-doc package contains documentation files for %{name}. %prep %autosetup -p1 @@ -141,12 +123,13 @@ export CXXFLAGS="-std=c++14 $RPM_OPT_FLAGS" %install %cmake_install - -#In case all modules are disabled mkdir -p %{buildroot}%{_libdir}/%{name}/%{version}/modules +mkdir -p %{buildroot}/%{_mandir}/man1 +install -m 0644 -p %{SOURCE1} %{buildroot}/%{_mandir}/man1/proxy.1 -# Man page. -install -Dpm 0644 %{SOURCE1} %{buildroot}/%{_mandir}/man1/proxy.1 +%if %{without pacrunner} +rm -rf %{buildroot}%{_libdir}/%{name}/%{version}/modules/config_pacrunner.so +%endif %check @@ -154,14 +137,11 @@ install -Dpm 0644 %{SOURCE1} %{buildroot}/%{_mandir}/man1/proxy.1 %files %license COPYING -%{_libdir}/*.so.* +%{_libdir}/libproxy.so.* %dir %{_libdir}/%{name} %dir %{_libdir}/%{name}/%{version} %dir %{_libdir}/%{name}/%{version}/modules -%files doc -%doc AUTHORS README - %files bin %{_bindir}/proxy %{_mandir}/man1/proxy.1* @@ -181,9 +161,11 @@ install -Dpm 0644 %{SOURCE1} %{buildroot}/%{_mandir}/man1/proxy.1 %files duktape %{_libdir}/%{name}/%{version}/modules/pacrunner_duktape.so +%if %{with pacrunner} %files pacrunner %{_libdir}/%{name}/%{version}/modules/config_pacrunner.so %endif +%endif %files devel %{_includedir}/proxy.h @@ -191,8 +173,14 @@ install -Dpm 0644 %{SOURCE1} %{buildroot}/%{_mandir}/man1/proxy.1 %{_libdir}/pkgconfig/libproxy-1.0.pc %{_datadir}/cmake/Modules/Findlibproxy.cmake +%files doc +%doc AUTHORS README + %changelog +* Mon Apr 10 2023 chen_yu_ao - 0.4.18-3 +- change spec file format + * Sun Feb 12 2023 Funda Wang - 0.4.18-2 - Use duktape instead of webkitgtk as js engine -- Gitee