]> git.pld-linux.org Git - packages/libpsl.git/blob - libpsl.spec
fix build with gtk-doc >= 1.30
[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.0
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/%{name}-%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5:  171e96d887709e36a57f4ee627bf82d2
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 Patch0:         gtk-doc.patch
24 URL:            https://rockdaboot.github.io/libpsl
25 BuildRequires:  autoconf >= 2.59
26 BuildRequires:  automake >= 1:1.10
27 BuildRequires:  gettext-tools >= 0.18.1
28 BuildRequires:  glib2-devel
29 BuildRequires:  gtk-doc >= 1.15
30 %{?with_icu:BuildRequires:      libicu-devel}
31 %{!?with_icu:BuildRequires:     libidn2-devel}
32 BuildRequires:  libtool >= 2:2
33 BuildRequires:  libxslt-progs
34 BuildRequires:  pkgconfig
35 BuildRequires:  python >= 1:2.7
36 BuildRequires:  sed >= 4.0
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
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...
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
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
84 %package devel
85 Summary:        Development files for libpsl
86 Summary(pl.UTF-8):      Pliki programistyczne biblioteki libpsl
87 Group:          Development/Libraries
88 Requires:       %{name} = %{version}-%{release}
89
90 %description devel
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.
97
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
114 %if "%{_rpmversion}" >= "5"
115 BuildArch:      noarch
116 %endif
117
118 %description apidocs
119 API documentation for libpsl library.
120
121 %description apidocs -l pl.UTF-8
122 Dokumentacja API biblioteki libpsl.
123
124 %package utils
125 Summary:        Commandline utility to explore the Public Suffix List
126 Summary(pl.UTF-8):      Narzędzie linii poleceń do eksplorowania listy przyrostków publicznych
127 Group:          Applications/Networking
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
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
141 %prep
142 %setup -q
143 %patch0 -p1
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
160 %configure \
161         --disable-silent-rules \
162         %{!?with_static_libs:--disable-static} \
163         --enable-gtk-doc \
164         --enable-man \
165         --enable-builtin=%{?with_icu:libicu}%{!?with_icu:libidn2} \
166         --enable-runtime=%{?with_icu:libicu}%{!?with_icu:libidn2} \
167         --with-html-dir=%{_gtkdocdir}
168
169 %{__make}
170
171 %{?with_tests:%{__make} check}
172
173 %install
174 rm -rf $RPM_BUILD_ROOT
175 %{__make} install \
176         DESTDIR=$RPM_BUILD_ROOT
177
178 # obsoleted by pkg-config
179 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libpsl.la
180 # tool not installed
181 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/psl-make-dafsa.1
182
183 %clean
184 rm -rf $RPM_BUILD_ROOT
185
186 %post   -p /sbin/ldconfig
187 %postun -p /sbin/ldconfig
188
189 %files
190 %defattr(644,root,root,755)
191 %doc AUTHORS COPYING NEWS
192 %attr(755,root,root) %{_libdir}/libpsl.so.*.*.*
193 %attr(755,root,root) %ghost %{_libdir}/libpsl.so.5
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*
201
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
210 %files utils
211 %defattr(644,root,root,755)
212 %attr(755,root,root) %{_bindir}/psl
213 %{_mandir}/man1/psl.1*
This page took 0.083365 seconds and 3 git commands to generate.