]>
Commit | Line | Data |
---|---|---|
421caf12 JB |
1 | # |
2 | # Conditional build: | |
34e946aa | 3 | %bcond_without apidocs # API documentation |
421caf12 | 4 | %bcond_without static_libs # static library |
10680ea9 | 5 | %bcond_with icu # use ICU instead of libidn2+libunistring for IDNA2008 |
abef6c14 | 6 | |
17484f01 | 7 | Summary: C library for the Publix Suffix List |
032b7ee9 | 8 | Summary(pl.UTF-8): Biblioteka C do obsługi listy przyrostków publicznych (Public Suffix List) |
17484f01 | 9 | Name: libpsl |
07f1a427 | 10 | Version: 0.21.2 |
34e946aa | 11 | Release: 2 |
17484f01 AM |
12 | License: MIT |
13 | Group: Networking | |
64042f0b | 14 | #Source0Download: https://github.com/rockdaboot/libpsl/releases |
56eb14ce | 15 | Source0: https://github.com/rockdaboot/libpsl/releases/download/%{version}/%{name}-%{version}.tar.lz |
07f1a427 | 16 | # Source0-md5: 074379959be1bfe5355db6c331f10829 |
64042f0b JB |
17 | %if 0 |
18 | # not required if packaged with libpsl release | |
b6d6f747 JB |
19 | %define psl_ref 1fc1ed365818a6a77d6f31d425ff03ca54cdc7f3 |
20 | %define psldate 20150827 | |
21 | Source1: https://github.com/publicsuffix/list/archive/%{psl_ref}/publicsuffix_list-%{psldate}.tar.gz | |
22 | # Source1-md5: ee9a591d4545d9f6ca350bd9df2c2e51 | |
64042f0b | 23 | %endif |
ecb3403f | 24 | URL: https://rockdaboot.github.io/libpsl |
421caf12 JB |
25 | BuildRequires: autoconf >= 2.59 |
26 | BuildRequires: automake >= 1:1.10 | |
07f1a427 | 27 | BuildRequires: gettext-tools >= 0.19.3 |
17484f01 | 28 | BuildRequires: glib2-devel |
3ad5f476 | 29 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.15} |
10680ea9 JB |
30 | %{?with_icu:BuildRequires: libicu-devel} |
31 | %{!?with_icu:BuildRequires: libidn2-devel} | |
421caf12 | 32 | BuildRequires: libtool >= 2:2 |
34e946aa | 33 | %{!?with_icu:BuildRequires: libunistring-devel} |
421caf12 | 34 | BuildRequires: libxslt-progs |
e55e4c0f | 35 | BuildRequires: lzip |
159d56f0 | 36 | BuildRequires: pkgconfig |
0522f11c | 37 | BuildRequires: python3 |
86f6afef | 38 | BuildRequires: python3-modules |
0934971c | 39 | BuildRequires: rpm-build >= 4.6 |
421caf12 | 40 | BuildRequires: sed >= 4.0 |
56eb14ce JB |
41 | BuildRequires: tar >= 1:1.22 |
42 | BuildRequires: xz | |
ecb3403f | 43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
17484f01 AM |
44 | |
45 | %description | |
46 | libpsl is a C library to handle the Public Suffix List. A "public | |
47 | suffix" is a domain name under which Internet users can directly | |
48 | register own names. | |
49 | ||
50 | Browsers and other web clients can use it to | |
17484f01 AM |
51 | - Avoid privacy-leaking "supercookies"; |
52 | - Avoid privacy-leaking "super domain" certificates; | |
53 | - Domain highlighting parts of the domain in a user interface; | |
54 | - Sorting domain lists by site; | |
55 | ||
56 | Libpsl... | |
17484f01 AM |
57 | - has built-in PSL data for fast access; |
58 | - allows to load PSL data from files; | |
59 | - checks if a given domain is a "public suffix"; | |
60 | - provides immediate cookie domain verification; | |
61 | - finds the longest public part of a given domain; | |
62 | - finds the shortest private part of a given domain; | |
63 | - works with international domains (UTF-8 and IDNA2008 Punycode); | |
64 | - is thread-safe; | |
65 | - handles IDNA2008 UTS#46; | |
66 | ||
032b7ee9 JB |
67 | %description -l pl.UTF-8 |
68 | libpsl to biblioteka C do obsługi listy przyrostków publicznych | |
69 | (Public Suffix List). "Przyrostek publiczny" to nazwa domeny, poniżej | |
70 | której bezpośrednio użytkownicy Internetu mogą rejestrować własne | |
71 | nazwy. | |
72 | ||
73 | Przeglądarki i inni klienci WWW mogą jej używać w celu: | |
74 | - zapobieganiu "superciasteczek" naruszającym prywatność | |
75 | - zapobieganiu certyfikatom "superdomenowym" naruszającym prywatność | |
76 | - podświetlania części domen w interfejsie użytkownika | |
77 | - sortowania listy domen według serwisu. | |
78 | ||
79 | Libpsl: | |
80 | - ma wbudowane dane PSL dla szybkiego dostępu | |
81 | - pozwala na wczytywanie danych PSL z plików | |
82 | - sprawdza, czy dana domena jest "przyrostkiem publicznym" | |
83 | - zapewnia natychmiastową weryfikację domeny ciasteczka | |
84 | - znajduje najdłuższą publiczną część podanej domeny | |
85 | - znajduje najkrótszą prywatną część podanej domeny | |
86 | - działa z domenami międzynarodowymi (UTF-8 i IDNA2008 Punycode) | |
87 | - jest bezpieczna względem wątków | |
88 | - obsługuje IDNA2008 UTS#46. | |
89 | ||
ecb3403f | 90 | %package devel |
032b7ee9 JB |
91 | Summary: Development files for libpsl |
92 | Summary(pl.UTF-8): Pliki programistyczne biblioteki libpsl | |
421caf12 | 93 | Group: Development/Libraries |
17484f01 AM |
94 | Requires: %{name} = %{version}-%{release} |
95 | ||
ecb3403f | 96 | %description devel |
032b7ee9 JB |
97 | This package contains the header file for developing applications that |
98 | use libpsl. | |
99 | ||
100 | %description devel -l pl.UTF-8 | |
101 | Ten pakiet zawiera plik nagłówkowy do tworzenia aplikacji | |
102 | wykorzystujących bibliotekę libpsl. | |
17484f01 | 103 | |
421caf12 JB |
104 | %package static |
105 | Summary: Static libpsl library | |
106 | Summary(pl.UTF-8): Statyczna biblioteka libpsl | |
107 | Group: Development/Libraries | |
108 | Requires: %{name}-devel = %{version}-%{release} | |
109 | ||
110 | %description static | |
111 | Static libpsl library. | |
112 | ||
113 | %description static -l pl.UTF-8 | |
114 | Statyczna biblioteka libpsl. | |
115 | ||
116 | %package apidocs | |
117 | Summary: API documentation for libpsl library | |
118 | Summary(pl.UTF-8): Dokumentacja API biblioteki libpsl | |
119 | Group: Documentation | |
abef6c14 | 120 | BuildArch: noarch |
421caf12 JB |
121 | |
122 | %description apidocs | |
123 | API documentation for libpsl library. | |
124 | ||
125 | %description apidocs -l pl.UTF-8 | |
126 | Dokumentacja API biblioteki libpsl. | |
127 | ||
17484f01 AM |
128 | %package utils |
129 | Summary: Commandline utility to explore the Public Suffix List | |
032b7ee9 | 130 | Summary(pl.UTF-8): Narzędzie linii poleceń do eksplorowania listy przyrostków publicznych |
421caf12 | 131 | Group: Applications/Networking |
17484f01 AM |
132 | Requires: %{name} = %{version}-%{release} |
133 | ||
134 | %description utils | |
135 | This package contains a commandline utility to explore the Public | |
136 | Suffix List, for example it checks if domains are public suffixes, | |
137 | checks if cookie-domain is acceptable for domains and so on. | |
138 | ||
032b7ee9 JB |
139 | %description utils -l pl.UTF-8 |
140 | Ten pakiet zawiera narzędzie linii poleceń do eksplorowania listy | |
141 | przyrostków publicznych (Public Suffix List); sprawdza ono na | |
142 | przykład, czy domeny są przyrostkami publicznymi, czy domena | |
143 | ciasteczka jest akceptowalna dla domen itp. | |
144 | ||
17484f01 | 145 | %prep |
64042f0b | 146 | %setup -q |
17484f01 | 147 | |
64042f0b | 148 | %if 0 |
b6d6f747 JB |
149 | rmdir list |
150 | %{__tar} xf %{SOURCE1} | |
151 | %{__mv} list-%{psl_ref} list | |
64042f0b | 152 | %endif |
421caf12 | 153 | |
17484f01 | 154 | %build |
421caf12 | 155 | %{__gettextize} |
3ad5f476 | 156 | %{?with_apidocs:%{__gtkdocize}} |
421caf12 JB |
157 | %{__libtoolize} |
158 | %{__aclocal} -I m4 | |
159 | %{__autoconf} | |
160 | %{__autoheader} | |
161 | %{__automake} | |
17484f01 | 162 | %configure \ |
0522f11c | 163 | PYTHON=%{__python3} \ |
17484f01 | 164 | --disable-silent-rules \ |
421caf12 | 165 | %{!?with_static_libs:--disable-static} \ |
3ad5f476 | 166 | %{?with_apidocs:--enable-gtk-doc} \ |
ecb3403f | 167 | --enable-man \ |
34e946aa | 168 | --enable-builtin \ |
10680ea9 | 169 | --enable-runtime=%{?with_icu:libicu}%{!?with_icu:libidn2} \ |
421caf12 | 170 | --with-html-dir=%{_gtkdocdir} |
17484f01 AM |
171 | |
172 | %{__make} | |
173 | ||
174 | %{?with_tests:%{__make} check} | |
175 | ||
176 | %install | |
177 | rm -rf $RPM_BUILD_ROOT | |
17484f01 AM |
178 | %{__make} install \ |
179 | DESTDIR=$RPM_BUILD_ROOT | |
180 | ||
867e88d1 | 181 | %if !%{with apidocs} |
3ad5f476 MK |
182 | install -d $RPM_BUILD_ROOT%{_mandir}/man3 |
183 | install -c -m 644 docs/libpsl/libpsl.3 $RPM_BUILD_ROOT%{_mandir}/man3 | |
184 | %endif | |
185 | ||
421caf12 JB |
186 | # obsoleted by pkg-config |
187 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libpsl.la | |
7006dbdd JB |
188 | # tool not installed |
189 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/psl-make-dafsa.1 | |
032b7ee9 | 190 | |
17484f01 AM |
191 | %clean |
192 | rm -rf $RPM_BUILD_ROOT | |
193 | ||
ecb3403f ER |
194 | %post -p /sbin/ldconfig |
195 | %postun -p /sbin/ldconfig | |
17484f01 AM |
196 | |
197 | %files | |
198 | %defattr(644,root,root,755) | |
64042f0b | 199 | %doc AUTHORS COPYING NEWS |
17484f01 | 200 | %attr(755,root,root) %{_libdir}/libpsl.so.*.*.* |
4585954e | 201 | %attr(755,root,root) %ghost %{_libdir}/libpsl.so.5 |
17484f01 AM |
202 | |
203 | %files devel | |
204 | %defattr(644,root,root,755) | |
205 | %attr(755,root,root) %{_libdir}/libpsl.so | |
206 | %{_includedir}/libpsl.h | |
207 | %{_pkgconfigdir}/libpsl.pc | |
208 | %{_mandir}/man3/libpsl.3* | |
17484f01 | 209 | |
c89787a1 | 210 | %if %{with static_libs} |
421caf12 JB |
211 | %files static |
212 | %defattr(644,root,root,755) | |
213 | %{_libdir}/libpsl.a | |
c89787a1 | 214 | %endif |
421caf12 | 215 | |
3ad5f476 | 216 | %if %{with apidocs} |
421caf12 JB |
217 | %files apidocs |
218 | %defattr(644,root,root,755) | |
219 | %{_gtkdocdir}/libpsl | |
3ad5f476 | 220 | %endif |
421caf12 | 221 | |
17484f01 AM |
222 | %files utils |
223 | %defattr(644,root,root,755) | |
224 | %attr(755,root,root) %{_bindir}/psl | |
7006dbdd | 225 | %{_mandir}/man1/psl.1* |