libpsl/libpsl.spec

128 lines
3.4 KiB
RPMSpec
Raw Normal View History

2019-09-30 10:57:41 -04:00
Name: libpsl
Version: 0.20.2
2020-06-22 19:17:21 +08:00
Release: 10
2019-09-30 10:57:41 -04:00
Summary: C library to handle the Public Suffix List
License: MIT
URL: https://rockdaboot.github.io/libpsl
Source0: https://github.com/rockdaboot/libpsl/releases/download/libpsl-%{version}/libpsl-%{version}.tar.gz
2020-06-22 19:17:21 +08:00
Patch0000: 0001-docs-don-t-include-the-type-hierarchy.patch
2019-09-30 10:57:41 -04:00
BuildRequires: gcc git gdb gtk-doc glib2-devel libxslt python3-devel
BuildRequires: libicu-devel libidn2-devel publicsuffix-list libunistring-devel
Requires: publicsuffix-list
2019-11-06 19:39:40 +08:00
Provides: psl = %{version}-%{release}
Obsoletes: psl <= %{version}-%{release}
Provides: psl-make-dafsa = %{version}-%{release}
Obsoletes: psl-make-dafsa <= %{version}-%{release}
2019-09-30 10:57:41 -04:00
%description
Libpsl is a C library to handle the Public Suffix List. A Public Suffix List is a
collection of Top Level Domains (TLDs) suffixes. Some of the features are listed as
follows:
- 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 (if libicu is available);
%package devel
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
Requires: publicsuffix-list
Provides: %{name}-static = %{version}-%{release}
Obsoletes: %{name}-static <= %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package help
Summary: Doc files for %{name}
Buildarch: noarch
Requires: man
%description help
The %{name}-help package contains doc files for %{name}.
%prep
%autosetup -n %{name}-%{version} -p1 -S git
sed -i -e "1s|#!.*|#!%{__python3}|" src/psl-make-dafsa
%build
%configure --enable-man \
--disable-rpath \
--enable-gtk-doc \
--enable-builtin=libicu \
--enable-runtime=libidn2 \
--with-psl-distfile=%{_datadir}/publicsuffix/public_suffix_list.dafsa \
--with-psl-file=%{_datadir}/publicsuffix/effective_tld_names.dat \
--with-psl-testfile=%{_datadir}/publicsuffix/test_psl.txt
%make_build
%install
%make_install
install -m0755 src/psl-make-dafsa %{buildroot}/%{_bindir}
rm -f %{buildroot}/%{_libdir}/%{name}.la
%check
make check
%pre
%preun
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
2019-11-06 19:39:40 +08:00
%license COPYING AUTHORS
2019-09-30 10:57:41 -04:00
%{_libdir}/%{name}.so.*
%{_bindir}/psl
%{_bindir}/psl-make-dafsa
%files devel
%{_includedir}/%{name}.h
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/%{name}.so
%{_libdir}/%{name}.a
%files help
%doc NEWS
%{_mandir}/man*/*
%{_datadir}/gtk-doc/html/%{name}
%changelog
2020-06-22 19:17:21 +08:00
* Mon Jun 22 2020 Liquor <lirui130@huawei.com> - 0.20.2-10
- Type: bugfix
- ID: NA
- SUG: NA
- DESC: docs: don't include the type hierarchy
2019-11-06 19:39:40 +08:00
* Wed Oct 10 2019 luhuaxin <luhuaxin@huawei.com> - 0.20.2-9
- Type: enhancement
- ID: NA
- SUG: NA
- DESC: move AUTHORS to license folder
* Mon Sep 30 2019 luhuaxin <luhuaxin@huawei.com> - 0.20.2-8
- Type: enhancement
- ID: NA
- SUG: NA
- DESC: package rebuild
2019-09-30 10:57:41 -04:00
* Tue Sep 24 2019 luhuaxin <luhuaxin@huawei.com> - 0.20.2-7
- Type: enhancement
- ID: NA
- SUG: NA
- DESC: update dependency name
* Mon Aug 19 2019 luhuaxin <luhuaxin@huawei.com> - 0.20.2-6
- Package init