]>
Commit | Line | Data |
---|---|---|
8cd5b2b7 | 1 | # |
4659b623 | 2 | # Conditional build |
49e0eae2 JB |
3 | %bcond_without doc # generated documentation |
4 | %bcond_without static_libs # static library | |
5 | %bcond_without tests # unit tests | |
4659b623 | 6 | # |
cc01f00a | 7 | Summary: A strictly RFC 3986 compliant URI parsing library |
00e051a9 | 8 | Summary(pl.UTF-8): Biblioteka analizująca URI ściśle zgodne z RFC 3986 |
cc01f00a | 9 | Name: uriparser |
be4007a9 | 10 | Version: 0.9.7 |
cf2fc770 | 11 | Release: 1 |
cc01f00a AM |
12 | License: BSD |
13 | Group: Libraries | |
64a3b2d5 JB |
14 | #Source0Download: https://github.com/uriparser/uriparser/releases |
15 | Source0: https://github.com/uriparser/uriparser/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2 | |
be4007a9 | 16 | # Source0-md5: db4de4763071e993be2621249a96afac |
811af47e | 17 | Patch0: %{name}-doxygen.patch |
64a3b2d5 | 18 | URL: https://uriparser.github.io/ |
49e0eae2 | 19 | BuildRequires: cmake >= 3.3 |
e910c8c8 | 20 | %{?with_tests:BuildRequires: gtest-devel >= 1.8.1-3} |
453061df | 21 | %if %{with doc} |
4659b623 | 22 | BuildRequires: doxygen |
4419e3dc | 23 | BuildRequires: graphviz |
453061df | 24 | %endif |
4419e3dc | 25 | BuildRequires: libstdc++-devel |
d28fb133 | 26 | BuildRequires: rpmbuild(macros) >= 1.605 |
cc01f00a AM |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
28 | ||
29 | %description | |
30 | uriparser is a strictly RFC 3986 compliant URI parsing library. | |
31 | uriparser is cross-platform, fast, supports Unicode. | |
32 | ||
00e051a9 | 33 | %description -l pl.UTF-8 |
53fe79b8 ŁK |
34 | uriparser to biblioteka analizująca URI ściśle zgodne z RFC 3986. Jest |
35 | wieloplatformowa, szybka i obsługuje Unicode. | |
00e051a9 | 36 | |
cc01f00a | 37 | %package devel |
00e051a9 JB |
38 | Summary: Header files for uriparser |
39 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki uriparser | |
cc01f00a AM |
40 | Group: Development/Libraries |
41 | Requires: %{name} = %{version}-%{release} | |
42 | ||
43 | %description devel | |
00e051a9 JB |
44 | Header files for uriparser. |
45 | ||
fef0bd2b | 46 | %description devel -l pl.UTF-8 |
00e051a9 | 47 | Pliki nagłówkowe biblioteki uriparser. |
cc01f00a AM |
48 | |
49 | %package static | |
50 | Summary: Static uriparser library | |
00e051a9 | 51 | Summary(pl.UTF-8): Statyczna biblioteka uriparser |
cc01f00a AM |
52 | Group: Development/Libraries |
53 | Requires: %{name}-devel = %{version}-%{release} | |
54 | ||
55 | %description static | |
56 | Static uriparser library. | |
57 | ||
00e051a9 JB |
58 | %description static -l pl.UTF-8 |
59 | Statyczna biblioteka uriparser. | |
60 | ||
cc01f00a | 61 | %prep |
53fe79b8 | 62 | %setup -q |
811af47e | 63 | %patch0 -p1 |
cc01f00a | 64 | |
8cd5b2b7 | 65 | %build |
49e0eae2 JB |
66 | %if %{with static_libs} |
67 | install -d build-static | |
68 | cd build-static | |
69 | %cmake .. \ | |
70 | -DBUILD_SHARED_LIBS=OFF \ | |
71 | -DURIPARSER_BUILD_DOCS=OFF \ | |
72 | -DURIPARSER_BUILD_TESTS=OFF \ | |
73 | -DURIPARSER_BUILD_TOOLS=OFF | |
74 | ||
75 | %{__make} | |
76 | cd .. | |
77 | %endif | |
78 | ||
79 | install -d build | |
80 | cd build | |
81 | %cmake .. \ | |
82 | %{!?with_doc:-DURIPARSER_BUILD_DOCS=OFF} \ | |
83 | %{!?with_tests:-DURIPARSER_BUILD_TESTS=OFF} | |
84 | ||
cc01f00a AM |
85 | %{__make} |
86 | ||
87 | %install | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
49e0eae2 JB |
90 | %if %{with static_libs} |
91 | %{__make} -C build-static install \ | |
92 | DESTDIR=$RPM_BUILD_ROOT | |
93 | %endif | |
94 | ||
95 | %{__make} -C build install \ | |
cc01f00a AM |
96 | DESTDIR=$RPM_BUILD_ROOT |
97 | ||
453061df | 98 | %if %{with doc} |
329bd1a4 | 99 | # packaged as %doc |
49e0eae2 | 100 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/html |
453061df | 101 | %endif |
329bd1a4 | 102 | |
cc01f00a AM |
103 | %clean |
104 | rm -rf $RPM_BUILD_ROOT | |
105 | ||
106 | %post -p /sbin/ldconfig | |
107 | %postun -p /sbin/ldconfig | |
108 | ||
109 | %files | |
110 | %defattr(644,root,root,755) | |
49e0eae2 | 111 | %doc AUTHORS COPYING ChangeLog GOALS.txt README.md THANKS TODO.txt |
437aea75 | 112 | %attr(755,root,root) %{_bindir}/uriparse |
e55fa743 JB |
113 | %attr(755,root,root) %{_libdir}/liburiparser.so.*.*.* |
114 | %attr(755,root,root) %ghost %{_libdir}/liburiparser.so.1 | |
cc01f00a AM |
115 | |
116 | %files devel | |
117 | %defattr(644,root,root,755) | |
453061df | 118 | %if %{with doc} |
49e0eae2 | 119 | %doc build/doc/html/* |
453061df | 120 | %endif |
e55fa743 | 121 | %attr(755,root,root) %{_libdir}/liburiparser.so |
e55fa743 | 122 | %{_includedir}/uriparser |
49e0eae2 | 123 | %{_libdir}/cmake/uriparser-%{version} |
85049899 | 124 | %{_pkgconfigdir}/liburiparser.pc |
cc01f00a | 125 | |
49e0eae2 | 126 | %if %{with static_libs} |
cc01f00a AM |
127 | %files static |
128 | %defattr(644,root,root,755) | |
e55fa743 | 129 | %{_libdir}/liburiparser.a |
49e0eae2 | 130 | %endif |