summaryrefslogtreecommitdiff
path: root/libnspsl.spec
blob: 3b2b7d7fc37260001cfd71cc2f6aec9370669e31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#
# Conditional build:
%bcond_without	static_libs	# don't build static library

Summary:	NetSurf public suffix list handling
Summary(pl.UTF-8):	Obsługa listy przyrostków publicznych (Public Suffix List) dla projektu NetSurf
Name:		libnspsl
Version:	0.1.7
Release:	1
License:	MIT
Group:		Libraries
Source0:	http://download.netsurf-browser.org/libs/releases/%{name}-%{version}-src.tar.gz
# Source0-md5:	85aac1153a663faf958557d2cb8c85b6
URL:		http://www.netsurf-browser.org/projects/libnspsl/
BuildRequires:	netsurf-buildsystem >= 1.9
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
The public suffix list is a database of top level domain names
(https://publicsuffix.org/). The database allows an application to
determine if if a domain name requires an additional label to be
valid.

%description -l pl.UTF-8
Lista przyrostków publicznych (Public Suffix List) to baza danych nazw
domen głównego poziomu (https://publicsuffix.org/). Baza pozwala
aplikacjom określić, czy nazwa domeny wymaga dodatkowej etykiety, aby
była poprawna.

%package devel
Summary:	libnspsl library headers
Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki libnspsl
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}

%description devel
This package contains the include files and other resources you can
use to incorporate libnspsl into applications.

%description devel -l pl.UTF-8
Pliki nagłówkowe pozwalające na używanie biblioteki libnspsl w swoich
programach.

%package static
Summary:	libnspsl static library
Summary(pl.UTF-8):	Statyczna biblioteka libnspsl
Group:		Development/Libraries
Requires:	%{name}-devel = %{version}-%{release}

%description static
This is package with static libnspsl library.

%description static -l pl.UTF-8
Statyczna biblioteka libnspsl.

%prep
%setup -q

%build
export AR="%{__ar}"
export CC="%{__cc}"
export CFLAGS="%{rpmcflags}"
export LDFLAGS="%{rpmldflags}"

%{__make} \
	Q= \
	PREFIX=%{_prefix} \
	COMPONENT_TYPE=lib-shared

%if %{with static_libs}
%{__make} \
	Q= \
	PREFIX=%{_prefix} \
	COMPONENT_TYPE=lib-static
%endif

%install
rm -rf $RPM_BUILD_ROOT
export AR="%{__ar}"
export CC="%{__cc}"
export CFLAGS="%{rpmcflags}"
export LDFLAGS="%{rpmldflags}"

rm -rf $RPM_BUILD_ROOT
%{__make} install \
	PREFIX=%{_prefix} \
	LIBDIR=%{_lib} \
	COMPONENT_TYPE=lib-shared \
	DESTDIR=$RPM_BUILD_ROOT

%if %{with static_libs}
%{__make} install \
	PREFIX=%{_prefix} \
	LIBDIR=%{_lib} \
	COMPONENT_TYPE=lib-static \
	DESTDIR=$RPM_BUILD_ROOT
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%post	-p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(644,root,root,755)
%doc COPYING
%attr(755,root,root) %{_libdir}/libnspsl.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libnspsl.so.0

%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libnspsl.so
%{_includedir}/nspsl.h
%{_pkgconfigdir}/libnspsl.pc

%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libnspsl.a
%endif