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