]> git.pld-linux.org Git - packages/libpsl.git/blob - libpsl.spec
- updated to 0.21.1
[packages/libpsl.git] / libpsl.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static library
4 %bcond_with     icu             # use ICU instead of libidn2+libunistring for IDNA2008
5
6 Summary:        C library for the Publix Suffix List
7 Summary(pl.UTF-8):      Biblioteka C do obsługi listy przyrostków publicznych (Public Suffix List)
8 Name:           libpsl
9 Version:        0.21.1
10 Release:        1
11 License:        MIT
12 Group:          Networking
13 #Source0Download: https://github.com/rockdaboot/libpsl/releases
14 Source0:        https://github.com/rockdaboot/libpsl/releases/download/%{version}/%{name}-%{version}.tar.lz
15 # Source0-md5:  ebbc144e311a66cfdae503f48f21bf2d
16 %if 0
17 # not required if packaged with libpsl release
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
22 %endif
23 URL:            https://rockdaboot.github.io/libpsl
24 BuildRequires:  autoconf >= 2.59
25 BuildRequires:  automake >= 1:1.10
26 BuildRequires:  gettext-tools >= 0.18.1
27 BuildRequires:  glib2-devel
28 BuildRequires:  gtk-doc >= 1.15
29 %{?with_icu:BuildRequires:      libicu-devel}
30 %{!?with_icu:BuildRequires:     libidn2-devel}
31 BuildRequires:  libtool >= 2:2
32 BuildRequires:  libxslt-progs
33 BuildRequires:  pkgconfig
34 BuildRequires:  python >= 1:2.7
35 BuildRequires:  sed >= 4.0
36 BuildRequires:  tar >= 1:1.22
37 BuildRequires:  xz
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
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...
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
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
85 %package devel
86 Summary:        Development files for libpsl
87 Summary(pl.UTF-8):      Pliki programistyczne biblioteki libpsl
88 Group:          Development/Libraries
89 Requires:       %{name} = %{version}-%{release}
90
91 %description devel
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.
98
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
115 %if "%{_rpmversion}" >= "4.6"
116 BuildArch:      noarch
117 %endif
118
119 %description apidocs
120 API documentation for libpsl library.
121
122 %description apidocs -l pl.UTF-8
123 Dokumentacja API biblioteki libpsl.
124
125 %package utils
126 Summary:        Commandline utility to explore the Public Suffix List
127 Summary(pl.UTF-8):      Narzędzie linii poleceń do eksplorowania listy przyrostków publicznych
128 Group:          Applications/Networking
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
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
142 %prep
143 %setup -q
144
145 %if 0
146 rmdir list
147 %{__tar} xf %{SOURCE1}
148 %{__mv} list-%{psl_ref} list
149 %endif
150
151 %build
152 %{__gettextize}
153 %{__gtkdocize}
154 %{__libtoolize}
155 %{__aclocal} -I m4
156 %{__autoconf}
157 %{__autoheader}
158 %{__automake}
159 %configure \
160         --disable-silent-rules \
161         %{!?with_static_libs:--disable-static} \
162         --enable-gtk-doc \
163         --enable-man \
164         --enable-builtin=%{?with_icu:libicu}%{!?with_icu:libidn2} \
165         --enable-runtime=%{?with_icu:libicu}%{!?with_icu:libidn2} \
166         --with-html-dir=%{_gtkdocdir}
167
168 %{__make}
169
170 %{?with_tests:%{__make} check}
171
172 %install
173 rm -rf $RPM_BUILD_ROOT
174 %{__make} install \
175         DESTDIR=$RPM_BUILD_ROOT
176
177 # obsoleted by pkg-config
178 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libpsl.la
179 # tool not installed
180 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/psl-make-dafsa.1
181
182 %clean
183 rm -rf $RPM_BUILD_ROOT
184
185 %post   -p /sbin/ldconfig
186 %postun -p /sbin/ldconfig
187
188 %files
189 %defattr(644,root,root,755)
190 %doc AUTHORS COPYING NEWS
191 %attr(755,root,root) %{_libdir}/libpsl.so.*.*.*
192 %attr(755,root,root) %ghost %{_libdir}/libpsl.so.5
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*
200
201 %if %{with static_libs}
202 %files static
203 %defattr(644,root,root,755)
204 %{_libdir}/libpsl.a
205 %endif
206
207 %files apidocs
208 %defattr(644,root,root,755)
209 %{_gtkdocdir}/libpsl
210
211 %files utils
212 %defattr(644,root,root,755)
213 %attr(755,root,root) %{_bindir}/psl
214 %{_mandir}/man1/psl.1*
This page took 0.610761 seconds and 3 git commands to generate.