# # spec file for package libpsl # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2015 rpm@cicku.me # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define somajor 5 Name: libpsl Version: 0.21.1 Release: 1.5 Summary: C library for the Publix Suffix List License: MIT AND MPL-2.0 AND BSD-3-Clause Group: Development/Libraries/C and C++ Url: https://rockdaboot.github.io/libpsl Source: https://github.com/rockdaboot/libpsl/releases/download/%{version}/%{name}-%{version}.tar.gz Source1000: baselibs.conf BuildRequires: libidn2-devel >= 0.14 BuildRequires: libunistring-devel BuildRequires: pkgconfig >= 0.9.0 BuildRequires: publicsuffix BuildRequires: python3-base %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. HTTP user agents can use it to avoid privacy-leaking "supercookies" and "super domain" certificates. It is also use do highlight domain parts in a user interface and sorting domain lists by site. %package -n %{name}%{somajor} Summary: C library for the Publix Suffix List # The libary code is MIT, with built-in data from publicsuffix License: MIT AND MPL-2.0 Group: System/Libraries Recommends: publicsuffix %description -n %{name}%{somajor} 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. HTTP user agents can use it to avoid privacy-leaking "supercookies" and "super domain" certificates. It is also use do highlight domain parts in a user interface and sorting domain lists by site. %package devel Summary: Development files for %{name} License: MIT Group: Development/Libraries/C and C++ Requires: %{name}%{somajor} = %{version} %description devel 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. HTTP user agents can use it to avoid privacy-leaking "supercookies" and "super domain" certificates. It is also use do highlight domain parts in a user interface and sorting domain lists by site. This package contains libraries and header files. Developer documentation is in %{_docdir}/libpsl-devel/html . %package -n psl Summary: Commandline utility to explore the Public Suffix List License: MIT Group: Productivity/Networking/Other %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. HTTP user agents can use it to avoid privacy-leaking "supercookies" and "super domain" certificates. It is also use do highlight domain parts in a user interface and sorting domain lists by site. %prep %setup -q # fix env shebang to call py3 directly sed -i -e "1s|#!.*|#!%{_bindir}/python3|" src/psl-make-dafsa %build # default is libicu, but this just too heavy dependency. This library is part of the # minimal system as curl uses it - but libidn2 is already used by curl directly, while # icu is not %configure \ --disable-silent-rules \ --disable-static \ --with-psl-file=%{_datadir}/publicsuffix/public_suffix_list.dat \ --with-psl-distfile=%{_datadir}/publicsuffix/public_suffix_list.dafsa make %{?_smp_mflags} %install %make_install find %{buildroot} -type f -name "*.la" -delete -print # in psl-make-dafsa package to break build cycle make DESTDIR=%{buildroot} install-man rm %{buildroot}%{_mandir}/man1/psl-make-dafsa.1 %check make %{?_smp_mflags} check || (cat tests/test-suite.log; exit 42) %post -n %{name}%{somajor} -p /sbin/ldconfig %postun -n %{name}%{somajor} -p /sbin/ldconfig %files -n %{name}%{somajor} %license COPYING %{_libdir}/libpsl.so.%{somajor}* %files devel %license COPYING %doc AUTHORS NEWS %doc docs/libpsl/html %{_includedir}/libpsl.h %{_libdir}/libpsl.so %{_libdir}/pkgconfig/libpsl.pc %files -n psl %license COPYING %doc AUTHORS NEWS %{_bindir}/psl %{_mandir}/man1/psl.1%{?ext_man} %changelog * Fri Jul 17 2020 Andreas Stieger - update to 0.21.1: * fix build with recent platform.sh changes to publicsuffix * Sun May 19 2019 Andreas Stieger - update to 0.21.0: * Add -b/--batch to 'psl' to suppress printing the domain * Sat Apr 28 2018 astieger@suse.com - update to 0.20.2: * Fix non srcdir builds * Add API decoration * Detection fallback from libidn2 to libcu, libidn * Tue Feb 27 2018 astieger@suse.com - update to 0.20.1: * Fix issue introduced with PSL_TYPE_NO_STAR_RULE in V0.20.0 * Fix SO_VERSION to 8:0:3 * Improve unit tests * Thu Feb 22 2018 fvogt@suse.com - Use %%license (boo#1082318) * Thu Feb 22 2018 astieger@suse.com - update to 0.20.0: * Remove hard-coded gcc flag in Makefile.am * Prevent excessive CPU cycles on large inputs * New flag PSL_TYPE_NO_STAR_RULE to skip star rule * Wed Jan 3 2018 tchvatal@suse.com - Make sure to use python3 during build instead of calling env * Thu Nov 9 2017 astieger@suse.com - update to 0.19.1: * New function psl_free_string() * psl_make_dafsa now works with python2 and python3 * psl_*count() functions now return -1 if info is not available * Fixed unsigned integer overflow in _mem_is_ascii() * Add -fsanitize-address-use-after-scope to --enable-asan if available * Thu Jul 20 2017 astieger@suse.com - update to 0.18.0: * Fix order of files in psl_latest() * Add fuzzing architecture * Fix memleak in _psl_is_public_suffix() * Add configure option --enable-asan (Address sanitizer) * Add configure option --enable-usan (Undefined sanitizer) * Add configure option --enable-cfi (Control Flow Integrity) * Fix finding libidn2 for static builds * Fix use of uninitialized stack value * Fix buffer overflow in libicu build * Use libidn2 as default for builds (former libicu) * Add pkg-config support for libidn and libidn2 * Thu Apr 6 2017 coolo@suse.com - Use idn2 runtime instead of libicu - as libicu requires 30MB of unicode data - while idn2 is already part of minimal system * Thu Jan 19 2017 shshyukriev@suse.com - libpsl 0.17.0: * Use TR46 non-transitional for IDNA (libicu, libidn2 >= 0.14) * Fix coverage upload from TravisCI to Coveralls * New tests to cover psl_latest() and psl_dist_filename() * Thu Dec 15 2016 astieger@suse.com - libpsl 0.16.1: This version enables consumers of the library to dynamically load the latest public suffix data from a binary data file in the publicsuffix package which can then updated without re-building libpsl. * Add functions psl_latest() and psl_dist_filename() * Do not taint out variable on error in psl_str_to_utf8lower() * Replace psl2c by psl-make-dafsa - correct licenses for package and subpackages - package HTML docs in -devel package * Mon Nov 14 2016 astieger@suse.com - libpsl 0.15.0: * Python3 compatibility for psl-make-dafsa * Support for UTF-8 in DAFSA data * Skip punycode conversion if DAFSA has UTF-8 * Better code coverage by test suite * Code cleanup and enhancements * Install man pages for psl-make-dafsa and psl * Enhancements to the documentation * Mon Aug 1 2016 astieger@suse.com - libpsl 0.14.0: * Remove unneeded libraries from tools/psl link step * Use https instead of http where possible * Add man page for tools/psl * Add header magic to DAFSA files * Rename make_dafsa.py to psl-make-dafsa * Add man page for psl-make-dafsa * Wed Mar 9 2016 astieger@suse.com - libpsl 0.13.0: * Use tests.txt as PSL test file by default * Slightly shorter DAFSA array when sorting input * Check for python 2.7+ in configure.ac * Fix python3 incompatibilities in make_dafsa.py * Fri Feb 5 2016 idonmez@suse.com - Add baselibs.conf * Thu Jan 7 2016 astieger@suse.com - libpsl 0.12.0 (libpsl.so.5 5:0:0) * Remove psl_builtin_compile_time() * Add function psl_is_public_suffix2() * Avoid libicu dependency with --enable-runtime=no - drop upstreamed 0001-Remove-include-of-bits-stat.h.patch * Sat Nov 28 2015 astieger@suse.com - fix SLE 11 build: * adding 0001-Remove-include-of-bits-stat.h.patch * skip IDN feature - update descriptions and categories * Sun Nov 15 2015 astieger@suse.com - initial package for libpsl based on Fedora Spec