diff --git a/libpsl.spec b/libpsl.spec index d43cdad8f1a9a7a96e62399a3331aadde8ca68e1..360070c6a8feab342adaa5f03a0a05ad6589114b 100644 --- a/libpsl.spec +++ b/libpsl.spec @@ -1,66 +1,37 @@ -%define anolis_release 4 +%define anolis_release 5 Name: libpsl Version: 0.21.1 Release: %{anolis_release}%{?dist} -Summary: C library for the Publix Suffix List +Summary: C library to handle the Publix Suffix List License: MIT -URL: https://rockdaboot.github.io/libpsl -Source0: https://github.com/rockdaboot/libpsl/releases/download/%{version}/libpsl-%{version}.tar.gz -BuildRequires: gcc -BuildRequires: gettext-devel -BuildRequires: glib2-devel -BuildRequires: gtk-doc -BuildRequires: libicu-devel -BuildRequires: libidn2-devel -BuildRequires: libunistring-devel -BuildRequires: libxslt -BuildRequires: make +URL: https://rockdaboot.github.io/%{name} +Source0: https://github.com/rockdaboot/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz +BuildRequires: gcc make gtk-doc python3-devel gettext-devel glib2-devel +BuildRequires: libicu-devel libidn2-devel libunistring-devel libxslt BuildRequires: publicsuffix-list -BuildRequires: python3-devel Requires: publicsuffix-list-dafsa %description -libpsl is a C library to handle the Public Suffix List. A "public suffix" is a -domain name under which Internet users can directly register own names. +Libpsl is a C library to handle the Public Suffix List. A Public Suffix +List is a collection of Top Level Domains (TLDs) suffixes. TLDs include +Global Top Level Domains (gTLDs) like .com and .net; Country Top Level +Domains (ccTLDs) like .de and .cn; and Brand Top Level Domains like +.apple and .google. Brand TLDs allows users to register their own top +level domain that exist at the same level as ICANN's gTLDs. Brand TLDs +are sometimes referred to as Vanity Domains. -Browsers and other web clients can use it to -- Avoid privacy-leaking "supercookies"; -- Avoid privacy-leaking "super domain" certificates; -- Domain highlighting parts of the domain in a user interface; -- Sorting domain lists by site; - -Libpsl... - -- has built-in PSL data for fast access; -- allows to load PSL data from files; -- checks if a given domain is a "public suffix"; -- provides immediate cookie domain verification; -- finds the longest public part of a given domain; -- finds the shortest private part of a given domain; -- works with international domains (UTF-8 and IDNA2008 Punycode); -- is thread-safe; -- handles IDNA2008 UTS#46; - -%package devel +%package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} Requires: publicsuffix-list -%description devel -This package contains libraries and header files for -developing applications that use %{name}. - -%package doc -Summary: Documentation files for %{name} -Requires: %{name}-devel = %{version}-%{release} -BuildArch: noarch +%description devel +This package contains libraries and header files for developing +applications that use %{name}. -%description doc -The %{name}-doc package contains documentation files for %{name}. - -%package -n psl +%package -n psl Summary: Commandline utility to explore the Public Suffix List %description -n psl @@ -68,7 +39,7 @@ This package contains a commandline utility to explore the Public Suffix List, for example it checks if domains are public suffixes, checks if cookie-domain is acceptable for domains and so on. -%package -n psl-make-dafsa +%package -n psl-make-dafsa Summary: Compiles the Public Suffix List into DAFSA form %description -n psl-make-dafsa @@ -76,30 +47,21 @@ This script produces C/C++ code or an architecture-independent binary object which represents a Deterministic Acyclic Finite State Automaton (DAFSA) from a plain text Public Suffix List. +%package doc +Summary: Documentation files for %{name} +Requires: %{name}-devel = %{version}-%{release} +BuildArch: noarch + +%description doc +The %{name}-doc package contains documentation files for %{name}. %prep -%autosetup -p1 +%autosetup -n %{name}-%{version} -p1 rm -frv list ln -sv %{_datadir}/publicsuffix list sed -i -e "1s|#!.*|#!%{__python3}|" src/psl-make-dafsa %build -# Tarballs from github have 2 versions, one is raw files from repo, and -# the other one from CDN contains pre-generated autotools files. -# But makefile hack is not upstreamed yet so we continue reconfiguring these. -# [ -f configure ] || autoreconf -fiv -# autoreconf -fiv - -# libicu does allow support for a newer IDN specification (IDN 2008) than -# libidn 1.x (IDN 2003). However, libpsl mostly relies on an internally -# compiled list, which is generated at buildtime and the testsuite thereof -# requires either libidn or libicu only at buildtime; the runtime -# requirement is only for loading external lists, which IIUC neither curl -# nor wget support. libidn2 supports IDN 2008 as well, and is *much* smaller -# than libicu. -# -# curl (as of 7.51.0-1.fc25) and wget (as of 1.19-1.fc26) now depend on libidn2. -# Therefore, we use libidn2 at runtime to help minimize core dependencies. %configure --disable-silent-rules \ --disable-static \ --enable-man \ @@ -125,35 +87,30 @@ install -m0755 src/psl-make-dafsa %{buildroot}%{_bindir}/ find %{buildroot} -name '*.la' -delete -print -%generate_compatibility_deps - %check make check || cat tests/test-suite.log %ldconfig_scriptlets +%generate_compatibility_deps + %files %dir %{abidir} %license COPYING -%{_libdir}/libpsl.so.5 -%{_libdir}/libpsl.so.5.* -%{abidir}/libpsl*.dump +%{abidir}/%{name}*.dump +%{_libdir}/%{name}.so.5* %files devel -%{_datadir}/gtk-doc/html/libpsl/ -%{_includedir}/libpsl.h -%{_libdir}/libpsl.so -%{_libdir}/pkgconfig/libpsl.pc -%{_mandir}/man3/libpsl.3* - -%files doc -%doc AUTHORS NEWS +%{_datadir}/gtk-doc/html/%{name}/ +%{_includedir}/%{name}.h +%{_libdir}/pkgconfig/%{name}.pc +%{_libdir}/%{name}.so +%{_mandir}/man3/%{name}.3* %files -n psl -%doc AUTHORS NEWS %license COPYING -%{_bindir}/psl %{abidir}/psl-option.list +%{_bindir}/psl %{_mandir}/man1/psl.1* %files -n psl-make-dafsa @@ -161,7 +118,13 @@ make check || cat tests/test-suite.log %{_bindir}/psl-make-dafsa %{_mandir}/man1/psl-make-dafsa.1* +%files doc +%doc AUTHORS NEWS + %changelog +* Thu Apr 13 2023 Jing Zhang - 0.21.1-5 +- Refact spec + * Thu Nov 24 2022 Chunmei Xu - 0.21.1-4 - rebuild with libunistring update