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