]> git.pld-linux.org Git - packages/uriparser.git/blob - uriparser.spec
- fix cmake configs packaging, release 2
[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.8
11 Release:        2
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:  64b8b3fead359b4bfb6aab8c307016ad
17 Patch0:         %{name}-doxygen.patch
18 URL:            https://uriparser.github.io/
19 BuildRequires:  cmake >= 3.5.0
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:  rpm-build >= 4.6
27 BuildRequires:  rpmbuild(macros) >= 1.605
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 uriparser is a strictly RFC 3986 compliant URI parsing library.
32 uriparser is cross-platform, fast, supports Unicode.
33
34 %description -l pl.UTF-8
35 uriparser to biblioteka analizująca URI ściśle zgodne z RFC 3986. Jest
36 wieloplatformowa, szybka i obsługuje Unicode.
37
38 %package devel
39 Summary:        Header files for uriparser
40 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki uriparser
41 Group:          Development/Libraries
42 Requires:       %{name} = %{version}-%{release}
43
44 %description devel
45 Header files for uriparser.
46
47 %description devel -l pl.UTF-8
48 Pliki nagłówkowe biblioteki uriparser.
49
50 %package static
51 Summary:        Static uriparser library
52 Summary(pl.UTF-8):      Statyczna biblioteka uriparser
53 Group:          Development/Libraries
54 Requires:       %{name}-devel = %{version}-%{release}
55
56 %description static
57 Static uriparser library.
58
59 %description static -l pl.UTF-8
60 Statyczna biblioteka uriparser.
61
62 %package apidocs
63 Summary:        API documentation for uriparser library
64 Summary(pl.UTF-8):      Dokumentacja API biblioteki uriparser
65 Group:          Documentation
66 BuildArch:      noarch
67
68 %description apidocs
69 API documentation for uriparser library.
70
71 %description apidocs -l pl.UTF-8
72 Dokumentacja API biblioteki uriparser.
73
74 %prep
75 %setup -q
76 %patch0 -p1
77
78 %build
79 %if %{with static_libs}
80 install -d build-static
81 cd build-static
82 %cmake .. \
83         -DBUILD_SHARED_LIBS=OFF \
84         -DURIPARSER_BUILD_DOCS=OFF \
85         -DURIPARSER_BUILD_TESTS=OFF \
86         -DURIPARSER_BUILD_TOOLS=OFF
87
88 %{__make}
89 cd ..
90 %endif
91
92 install -d build
93 cd build
94 %cmake .. \
95         %{!?with_doc:-DURIPARSER_BUILD_DOCS=OFF} \
96         %{!?with_tests:-DURIPARSER_BUILD_TESTS=OFF}
97
98 %{__make}
99
100 %install
101 rm -rf $RPM_BUILD_ROOT
102
103 %if %{with static_libs}
104 %{__make} -C build-static install \
105         DESTDIR=$RPM_BUILD_ROOT
106
107 # make export files directory clean before shared lib install
108 %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/cmake
109 %endif
110
111 %{__make} -C build install \
112         DESTDIR=$RPM_BUILD_ROOT
113
114 %if %{with doc}
115 # packaged as %doc
116 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/html
117 %endif
118
119 %clean
120 rm -rf $RPM_BUILD_ROOT
121
122 %post   -p /sbin/ldconfig
123 %postun -p /sbin/ldconfig
124
125 %files
126 %defattr(644,root,root,755)
127 %doc AUTHORS COPYING ChangeLog GOALS.txt README.md THANKS TODO.txt
128 %attr(755,root,root) %{_bindir}/uriparse
129 %attr(755,root,root) %{_libdir}/liburiparser.so.*.*.*
130 %attr(755,root,root) %ghost %{_libdir}/liburiparser.so.1
131
132 %files devel
133 %defattr(644,root,root,755)
134 %attr(755,root,root) %{_libdir}/liburiparser.so
135 %{_includedir}/uriparser
136 %{_libdir}/cmake/uriparser-%{version}
137 %{_pkgconfigdir}/liburiparser.pc
138
139 %if %{with static_libs}
140 %files static
141 %defattr(644,root,root,755)
142 %{_libdir}/liburiparser.a
143 %endif
144
145 %if %{with doc}
146 %files apidocs
147 %defattr(644,root,root,755)
148 %doc build/doc/html/{search,*.css,*.html,*.js,*.png}
149 %endif
This page took 0.12675 seconds and 4 git commands to generate.