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