]> git.pld-linux.org Git - packages/libpsl.git/blob - libpsl.spec
- rebuild with libidn2 2.1.0
[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.20.2
10 Release:        5
11 License:        MIT
12 Group:          Networking
13 #Source0Download: https://github.com/rockdaboot/libpsl/releases
14 Source0:        https://github.com/rockdaboot/libpsl/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5:  f604f7d30d64bc673870ecf84b860a1e
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 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
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...
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
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
83 %package devel
84 Summary:        Development files for libpsl
85 Summary(pl.UTF-8):      Pliki programistyczne biblioteki libpsl
86 Group:          Development/Libraries
87 Requires:       %{name} = %{version}-%{release}
88
89 %description devel
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.
96
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
113 %if "%{_rpmversion}" >= "5"
114 BuildArch:      noarch
115 %endif
116
117 %description apidocs
118 API documentation for libpsl library.
119
120 %description apidocs -l pl.UTF-8
121 Dokumentacja API biblioteki libpsl.
122
123 %package utils
124 Summary:        Commandline utility to explore the Public Suffix List
125 Summary(pl.UTF-8):      Narzędzie linii poleceń do eksplorowania listy przyrostków publicznych
126 Group:          Applications/Networking
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
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
140 %prep
141 %setup -q
142
143 %if 0
144 rmdir list
145 %{__tar} xf %{SOURCE1}
146 %{__mv} list-%{psl_ref} list
147 %endif
148
149 %build
150 %{__gettextize}
151 %{__gtkdocize}
152 %{__libtoolize}
153 %{__aclocal} -I m4
154 %{__autoconf}
155 %{__autoheader}
156 %{__automake}
157
158 %configure \
159         --disable-silent-rules \
160         %{!?with_static_libs:--disable-static} \
161         --enable-gtk-doc \
162         --enable-man \
163         --enable-builtin=%{?with_icu:libicu}%{!?with_icu:libidn2} \
164         --enable-runtime=%{?with_icu:libicu}%{!?with_icu:libidn2} \
165         --with-html-dir=%{_gtkdocdir}
166
167 %{__make}
168
169 %{?with_tests:%{__make} check}
170
171 %install
172 rm -rf $RPM_BUILD_ROOT
173 %{__make} install \
174         DESTDIR=$RPM_BUILD_ROOT
175
176 # obsoleted by pkg-config
177 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libpsl.la
178 # tool not installed
179 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/psl-make-dafsa.1
180
181 %clean
182 rm -rf $RPM_BUILD_ROOT
183
184 %post   -p /sbin/ldconfig
185 %postun -p /sbin/ldconfig
186
187 %files
188 %defattr(644,root,root,755)
189 %doc AUTHORS COPYING NEWS
190 %attr(755,root,root) %{_libdir}/libpsl.so.*.*.*
191 %attr(755,root,root) %ghost %{_libdir}/libpsl.so.5
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*
199
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
208 %files utils
209 %defattr(644,root,root,755)
210 %attr(755,root,root) %{_bindir}/psl
211 %{_mandir}/man1/psl.1*
This page took 0.057224 seconds and 3 git commands to generate.