2014-07-29 00:56:08 +00:00
|
|
|
Name: libpsl
|
2022-12-28 14:02:55 +00:00
|
|
|
Version: 0.21.2
|
2024-01-14 16:26:49 +00:00
|
|
|
Release: %autorelease
|
2014-07-29 00:56:08 +00:00
|
|
|
Summary: C library for the Publix Suffix List
|
|
|
|
License: MIT
|
|
|
|
URL: https://rockdaboot.github.io/libpsl
|
2020-07-20 09:11:13 +00:00
|
|
|
Source0: https://github.com/rockdaboot/libpsl/releases/download/%{version}/libpsl-%{version}.tar.gz
|
2018-03-19 17:03:38 +00:00
|
|
|
BuildRequires: gcc
|
2014-07-29 00:56:08 +00:00
|
|
|
BuildRequires: gettext-devel
|
|
|
|
BuildRequires: glib2-devel
|
|
|
|
BuildRequires: gtk-doc
|
|
|
|
BuildRequires: libicu-devel
|
2016-11-04 06:17:08 +00:00
|
|
|
BuildRequires: libidn2-devel
|
2016-03-31 05:32:41 +00:00
|
|
|
BuildRequires: libunistring-devel
|
2014-07-29 00:56:08 +00:00
|
|
|
BuildRequires: libxslt
|
2020-07-20 09:11:13 +00:00
|
|
|
BuildRequires: make
|
2015-02-13 10:18:12 +00:00
|
|
|
BuildRequires: publicsuffix-list
|
2018-05-02 05:41:16 +00:00
|
|
|
BuildRequires: python3-devel
|
2017-01-05 08:06:46 +00:00
|
|
|
Requires: publicsuffix-list-dafsa
|
2014-07-29 00:56:08 +00:00
|
|
|
|
|
|
|
%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.
|
|
|
|
|
|
|
|
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
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
2015-02-15 07:23:08 +00:00
|
|
|
Requires: publicsuffix-list
|
2014-07-29 00:56:08 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains libraries and header files for
|
|
|
|
developing applications that use %{name}.
|
|
|
|
|
|
|
|
%package -n psl
|
|
|
|
Summary: Commandline utility to explore the Public Suffix List
|
|
|
|
|
|
|
|
%description -n psl
|
|
|
|
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.
|
|
|
|
|
2017-01-05 08:06:46 +00:00
|
|
|
%package -n psl-make-dafsa
|
|
|
|
Summary: Compiles the Public Suffix List into DAFSA form
|
2023-06-16 14:59:42 +00:00
|
|
|
BuildArch: noarch
|
2017-01-05 08:06:46 +00:00
|
|
|
|
|
|
|
%description -n psl-make-dafsa
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
2014-07-29 00:56:08 +00:00
|
|
|
%prep
|
2020-01-30 13:14:19 +00:00
|
|
|
%autosetup -p1
|
2016-02-01 04:08:28 +00:00
|
|
|
rm -frv list
|
2019-04-17 12:43:29 +00:00
|
|
|
ln -sv %{_datadir}/publicsuffix list
|
2023-06-16 14:59:42 +00:00
|
|
|
%py3_shebang_fix src/psl-make-dafsa
|
2014-07-29 00:56:08 +00:00
|
|
|
|
|
|
|
%build
|
2015-02-13 10:18:12 +00:00
|
|
|
# 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.
|
2015-02-28 02:33:46 +00:00
|
|
|
# [ -f configure ] || autoreconf -fiv
|
2016-02-01 04:08:28 +00:00
|
|
|
# autoreconf -fiv
|
2016-03-31 05:32:41 +00:00
|
|
|
|
2016-11-04 06:17:08 +00:00
|
|
|
# libicu does allow support for a newer IDN specification (IDN 2008) than
|
|
|
|
# libidn 1.x (IDN 2003). However, libpsl mostly relies on an internally
|
2017-01-05 08:06:46 +00:00
|
|
|
# compiled list, which is generated at buildtime and the testsuite thereof
|
2016-11-04 06:17:08 +00:00
|
|
|
# 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.
|
|
|
|
#
|
2017-11-14 03:12:24 +00:00
|
|
|
# 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.
|
2014-07-29 00:56:08 +00:00
|
|
|
%configure --disable-silent-rules \
|
|
|
|
--disable-static \
|
|
|
|
--enable-man \
|
2015-02-13 10:18:12 +00:00
|
|
|
--enable-gtk-doc \
|
2016-03-31 05:32:41 +00:00
|
|
|
--enable-builtin=libicu \
|
2016-11-04 06:17:08 +00:00
|
|
|
--enable-runtime=libidn2 \
|
2017-01-05 08:06:46 +00:00
|
|
|
--with-psl-distfile=%{_datadir}/publicsuffix/public_suffix_list.dafsa \
|
|
|
|
--with-psl-file=%{_datadir}/publicsuffix/effective_tld_names.dat \
|
2016-02-01 04:08:28 +00:00
|
|
|
--with-psl-testfile=%{_datadir}/publicsuffix/test_psl.txt
|
2015-02-28 02:33:46 +00:00
|
|
|
|
2018-07-27 14:12:21 +00:00
|
|
|
# avoid using rpath
|
|
|
|
sed -i libtool \
|
|
|
|
-e 's|^\(runpath_var=\).*$|\1|' \
|
|
|
|
-e 's|^\(hardcode_libdir_flag_spec=\).*$|\1|'
|
|
|
|
|
2014-07-29 00:56:08 +00:00
|
|
|
%make_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%make_install
|
2014-08-04 07:49:55 +00:00
|
|
|
|
2017-01-05 08:06:46 +00:00
|
|
|
# the script is noinst but the manpage is installed
|
|
|
|
install -m0755 src/psl-make-dafsa %{buildroot}%{_bindir}/
|
2016-11-15 16:12:27 +00:00
|
|
|
|
2014-07-29 00:56:08 +00:00
|
|
|
find %{buildroot} -name '*.la' -delete -print
|
|
|
|
|
|
|
|
%check
|
2015-08-04 09:02:31 +00:00
|
|
|
make check || cat tests/test-suite.log
|
2014-07-29 00:56:08 +00:00
|
|
|
|
2018-02-03 17:16:49 +00:00
|
|
|
%ldconfig_scriptlets
|
2014-07-29 00:56:08 +00:00
|
|
|
|
|
|
|
%files
|
2015-02-13 10:18:12 +00:00
|
|
|
%license COPYING
|
2016-03-31 05:32:41 +00:00
|
|
|
%{_libdir}/libpsl.so.5
|
|
|
|
%{_libdir}/libpsl.so.5.*
|
2014-07-29 00:56:08 +00:00
|
|
|
|
|
|
|
%files devel
|
2015-02-13 10:18:12 +00:00
|
|
|
%doc AUTHORS NEWS
|
2014-07-29 00:56:08 +00:00
|
|
|
%{_datadir}/gtk-doc/html/libpsl/
|
|
|
|
%{_includedir}/libpsl.h
|
|
|
|
%{_libdir}/libpsl.so
|
|
|
|
%{_libdir}/pkgconfig/libpsl.pc
|
|
|
|
%{_mandir}/man3/libpsl.3*
|
|
|
|
|
|
|
|
%files -n psl
|
2015-02-13 10:18:12 +00:00
|
|
|
%doc AUTHORS NEWS
|
|
|
|
%license COPYING
|
2014-07-29 00:56:08 +00:00
|
|
|
%{_bindir}/psl
|
2016-11-15 16:12:27 +00:00
|
|
|
%{_mandir}/man1/psl.1*
|
2014-07-29 00:56:08 +00:00
|
|
|
|
2017-01-05 08:06:46 +00:00
|
|
|
%files -n psl-make-dafsa
|
|
|
|
%license COPYING
|
|
|
|
%{_bindir}/psl-make-dafsa
|
|
|
|
%{_mandir}/man1/psl-make-dafsa.1*
|
|
|
|
|
2014-07-29 00:56:08 +00:00
|
|
|
%changelog
|
2024-01-14 16:26:49 +00:00
|
|
|
%autochangelog
|