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