]> git.pld-linux.org Git - packages/uriparser.git/blob - uriparser.spec
macros for %cmake
[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 BuildRequires:  rpmbuild(macros) >= 1.605
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
33 %description -l pl.UTF-8
34 uriparser to biblioteka analizująca URI ściśle zgodne z RFC 3986. Jest
35 wieloplatformowa, szybka i obsługuje Unicode.
36
37 %package devel
38 Summary:        Header files for uriparser
39 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki uriparser
40 Group:          Development/Libraries
41 Requires:       %{name} = %{version}-%{release}
42
43 %description devel
44 Header files for uriparser.
45
46 %description devel -l pl.UTF-8
47 Pliki nagłówkowe biblioteki uriparser.
48
49 %package static
50 Summary:        Static uriparser library
51 Summary(pl.UTF-8):      Statyczna biblioteka uriparser
52 Group:          Development/Libraries
53 Requires:       %{name}-devel = %{version}-%{release}
54
55 %description static
56 Static uriparser library.
57
58 %description static -l pl.UTF-8
59 Statyczna biblioteka uriparser.
60
61 %prep
62 %setup -q
63 %patch0 -p1
64
65 %build
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
85 %{__make}
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89
90 %if %{with static_libs}
91 %{__make} -C build-static install \
92         DESTDIR=$RPM_BUILD_ROOT
93 %endif
94
95 %{__make} -C build install \
96         DESTDIR=$RPM_BUILD_ROOT
97
98 %if %{with doc}
99 # packaged as %doc
100 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/html
101 %endif
102
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)
111 %doc AUTHORS COPYING ChangeLog GOALS.txt README.md THANKS TODO.txt
112 %attr(755,root,root) %{_bindir}/uriparse
113 %attr(755,root,root) %{_libdir}/liburiparser.so.*.*.*
114 %attr(755,root,root) %ghost %{_libdir}/liburiparser.so.1
115
116 %files devel
117 %defattr(644,root,root,755)
118 %if %{with doc}
119 %doc build/doc/html/*
120 %endif
121 %attr(755,root,root) %{_libdir}/liburiparser.so
122 %{_includedir}/uriparser
123 %{_libdir}/cmake/uriparser-%{version}
124 %{_pkgconfigdir}/liburiparser.pc
125
126 %if %{with static_libs}
127 %files static
128 %defattr(644,root,root,755)
129 %{_libdir}/liburiparser.a
130 %endif
This page took 0.068701 seconds and 3 git commands to generate.