]> git.pld-linux.org Git - packages/libpsl.git/blame - libpsl.spec
- allow building without apidocs
[packages/libpsl.git] / libpsl.spec
CommitLineData
421caf12
JB
1#
2# Conditional build:
3ad5f476 3%bcond_without apidocs # don't build api docs
421caf12 4%bcond_without static_libs # static library
10680ea9 5%bcond_with icu # use ICU instead of libidn2+libunistring for IDNA2008
abef6c14 6
17484f01 7Summary: C library for the Publix Suffix List
032b7ee9 8Summary(pl.UTF-8): Biblioteka C do obsługi listy przyrostków publicznych (Public Suffix List)
17484f01 9Name: libpsl
56eb14ce 10Version: 0.21.1
3ad5f476 11Release: 2
17484f01
AM
12License: MIT
13Group: Networking
64042f0b 14#Source0Download: https://github.com/rockdaboot/libpsl/releases
56eb14ce
JB
15Source0: https://github.com/rockdaboot/libpsl/releases/download/%{version}/%{name}-%{version}.tar.lz
16# Source0-md5: ebbc144e311a66cfdae503f48f21bf2d
64042f0b
JB
17%if 0
18# not required if packaged with libpsl release
b6d6f747
JB
19%define psl_ref 1fc1ed365818a6a77d6f31d425ff03ca54cdc7f3
20%define psldate 20150827
21Source1: https://github.com/publicsuffix/list/archive/%{psl_ref}/publicsuffix_list-%{psldate}.tar.gz
22# Source1-md5: ee9a591d4545d9f6ca350bd9df2c2e51
64042f0b 23%endif
ecb3403f 24URL: https://rockdaboot.github.io/libpsl
421caf12
JB
25BuildRequires: autoconf >= 2.59
26BuildRequires: automake >= 1:1.10
b3607a92 27BuildRequires: gettext-tools >= 0.18.1
17484f01 28BuildRequires: glib2-devel
3ad5f476 29%{?with_apidocs:BuildRequires: gtk-doc >= 1.15}
10680ea9
JB
30%{?with_icu:BuildRequires: libicu-devel}
31%{!?with_icu:BuildRequires: libidn2-devel}
421caf12
JB
32BuildRequires: libtool >= 2:2
33BuildRequires: libxslt-progs
159d56f0 34BuildRequires: pkgconfig
421caf12 35BuildRequires: sed >= 4.0
56eb14ce
JB
36BuildRequires: tar >= 1:1.22
37BuildRequires: xz
ecb3403f 38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17484f01
AM
39
40%description
41libpsl is a C library to handle the Public Suffix List. A "public
42suffix" is a domain name under which Internet users can directly
43register own names.
44
45Browsers 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
51Libpsl...
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
63libpsl to biblioteka C do obsługi listy przyrostków publicznych
64(Public Suffix List). "Przyrostek publiczny" to nazwa domeny, poniżej
65której bezpośrednio użytkownicy Internetu mogą rejestrować własne
66nazwy.
67
68Przeglą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
74Libpsl:
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
86Summary: Development files for libpsl
87Summary(pl.UTF-8): Pliki programistyczne biblioteki libpsl
421caf12 88Group: Development/Libraries
17484f01
AM
89Requires: %{name} = %{version}-%{release}
90
ecb3403f 91%description devel
032b7ee9
JB
92This package contains the header file for developing applications that
93use libpsl.
94
95%description devel -l pl.UTF-8
96Ten pakiet zawiera plik nagłówkowy do tworzenia aplikacji
97wykorzystujących bibliotekę libpsl.
17484f01 98
421caf12
JB
99%package static
100Summary: Static libpsl library
101Summary(pl.UTF-8): Statyczna biblioteka libpsl
102Group: Development/Libraries
103Requires: %{name}-devel = %{version}-%{release}
104
105%description static
106Static libpsl library.
107
108%description static -l pl.UTF-8
109Statyczna biblioteka libpsl.
110
111%package apidocs
112Summary: API documentation for libpsl library
113Summary(pl.UTF-8): Dokumentacja API biblioteki libpsl
114Group: Documentation
abef6c14 115BuildArch: noarch
421caf12
JB
116
117%description apidocs
118API documentation for libpsl library.
119
120%description apidocs -l pl.UTF-8
121Dokumentacja API biblioteki libpsl.
122
17484f01
AM
123%package utils
124Summary: Commandline utility to explore the Public Suffix List
032b7ee9 125Summary(pl.UTF-8): Narzędzie linii poleceń do eksplorowania listy przyrostków publicznych
421caf12 126Group: Applications/Networking
17484f01
AM
127Requires: %{name} = %{version}-%{release}
128
129%description utils
130This package contains a commandline utility to explore the Public
131Suffix List, for example it checks if domains are public suffixes,
132checks if cookie-domain is acceptable for domains and so on.
133
032b7ee9
JB
134%description utils -l pl.UTF-8
135Ten pakiet zawiera narzędzie linii poleceń do eksplorowania listy
136przyrostków publicznych (Public Suffix List); sprawdza ono na
137przykład, czy domeny są przyrostkami publicznymi, czy domena
138ciasteczka jest akceptowalna dla domen itp.
139
17484f01 140%prep
64042f0b 141%setup -q
17484f01 142
64042f0b 143%if 0
b6d6f747
JB
144rmdir list
145%{__tar} xf %{SOURCE1}
146%{__mv} list-%{psl_ref} list
64042f0b 147%endif
421caf12 148
17484f01 149%build
421caf12 150%{__gettextize}
3ad5f476 151%{?with_apidocs:%{__gtkdocize}}
421caf12
JB
152%{__libtoolize}
153%{__aclocal} -I m4
154%{__autoconf}
155%{__autoheader}
156%{__automake}
17484f01
AM
157%configure \
158 --disable-silent-rules \
421caf12 159 %{!?with_static_libs:--disable-static} \
3ad5f476 160 %{?with_apidocs:--enable-gtk-doc} \
ecb3403f 161 --enable-man \
10680ea9
JB
162 --enable-builtin=%{?with_icu:libicu}%{!?with_icu:libidn2} \
163 --enable-runtime=%{?with_icu:libicu}%{!?with_icu:libidn2} \
421caf12 164 --with-html-dir=%{_gtkdocdir}
17484f01
AM
165
166%{__make}
167
168%{?with_tests:%{__make} check}
169
170%install
171rm -rf $RPM_BUILD_ROOT
17484f01
AM
172%{__make} install \
173 DESTDIR=$RPM_BUILD_ROOT
174
3ad5f476
MK
175%if !%{with apidos}
176install -d $RPM_BUILD_ROOT%{_mandir}/man3
177install -c -m 644 docs/libpsl/libpsl.3 $RPM_BUILD_ROOT%{_mandir}/man3
178%endif
179
421caf12
JB
180# obsoleted by pkg-config
181%{__rm} $RPM_BUILD_ROOT%{_libdir}/libpsl.la
7006dbdd
JB
182# tool not installed
183%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/psl-make-dafsa.1
032b7ee9 184
17484f01
AM
185%clean
186rm -rf $RPM_BUILD_ROOT
187
ecb3403f
ER
188%post -p /sbin/ldconfig
189%postun -p /sbin/ldconfig
17484f01
AM
190
191%files
192%defattr(644,root,root,755)
64042f0b 193%doc AUTHORS COPYING NEWS
17484f01 194%attr(755,root,root) %{_libdir}/libpsl.so.*.*.*
4585954e 195%attr(755,root,root) %ghost %{_libdir}/libpsl.so.5
17484f01
AM
196
197%files devel
198%defattr(644,root,root,755)
199%attr(755,root,root) %{_libdir}/libpsl.so
200%{_includedir}/libpsl.h
201%{_pkgconfigdir}/libpsl.pc
202%{_mandir}/man3/libpsl.3*
17484f01 203
c89787a1 204%if %{with static_libs}
421caf12
JB
205%files static
206%defattr(644,root,root,755)
207%{_libdir}/libpsl.a
c89787a1 208%endif
421caf12 209
3ad5f476 210%if %{with apidocs}
421caf12
JB
211%files apidocs
212%defattr(644,root,root,755)
213%{_gtkdocdir}/libpsl
3ad5f476 214%endif
421caf12 215
17484f01
AM
216%files utils
217%defattr(644,root,root,755)
218%attr(755,root,root) %{_bindir}/psl
7006dbdd 219%{_mandir}/man1/psl.1*
This page took 0.1273 seconds and 4 git commands to generate.