]>
Commit | Line | Data |
---|---|---|
0bc28d66 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static library | |
4 | ||
8b795909 | 5 | Summary: Extensible Binary Meta Language access library |
284ca2cc | 6 | Summary(pl.UTF-8): Biblioteka dostępu rozszerzalnego metajęzyka binarnego |
8b795909 | 7 | Name: libebml |
386b4522 | 8 | Version: 1.4.0 |
0bc28d66 | 9 | Release: 1 |
8658b311 | 10 | License: LGPL v2.1+ |
8b795909 | 11 | Group: Libraries |
499e890c | 12 | Source0: https://dl.matroska.org/downloads/libebml/%{name}-%{version}.tar.xz |
386b4522 | 13 | # Source0-md5: 98cd1a1c553608f9d3d35092242cd46b |
f0808813 | 14 | URL: https://www.matroska.org/ |
0bc28d66 | 15 | BuildRequires: cmake >= 3.1.2 |
386b4522 | 16 | BuildRequires: libstdc++-devel >= 6:4.7 |
d76b557e | 17 | BuildRequires: rpmbuild(macros) >= 1.605 |
499e890c | 18 | BuildRequires: xz |
8b795909 JB |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
20 | ||
21 | %description | |
1e89c424 JB |
22 | Extensible Binary Meta Language access library is a library for |
23 | reading and writing files with the Extensible Binary Meta Language, a | |
24 | binary pendant to XML. | |
5a9874e6 | 25 | |
c04fa4d7 JR |
26 | %description -l pl.UTF-8 |
27 | Biblioteka rozszerzalnego metajęzyka binarnego (Extensible Binary Meta | |
28 | Language, w skrócie EBML) umożliwia czytanie i zapisywanie plików w | |
29 | tym metajęzyku, będącym binarnym uzupełnieniem XML-a. | |
8b795909 JB |
30 | |
31 | %package devel | |
1e89c424 | 32 | Summary: Header files for Extensible Binary Meta Language library |
284ca2cc | 33 | Summary(pl.UTF-8): Nagłówki biblioteki rozszerzalnego metajęzyka binarnego |
8b795909 | 34 | Group: Development/Libraries |
104baeb4 | 35 | Requires: %{name} = %{version}-%{release} |
386b4522 | 36 | Requires: libstdc++-devel >= 6:4.7 |
8b795909 JB |
37 | |
38 | %description devel | |
1e89c424 | 39 | Header files for Extensible Binary Meta Language library. |
8b795909 | 40 | |
c04fa4d7 JR |
41 | %description devel -l pl.UTF-8 |
42 | Nagłówki biblioteki rozszerzalnego metajęzyka binarnego. | |
8b795909 JB |
43 | |
44 | %package static | |
1e89c424 | 45 | Summary: Static version of Extensible Binary Meta Language library |
284ca2cc | 46 | Summary(pl.UTF-8): Statyczna wersja biblioteki rozszerzalnego metajęzyka binarnego |
1e89c424 | 47 | Group: Development/Libraries |
104baeb4 | 48 | Requires: %{name}-devel = %{version}-%{release} |
8b795909 JB |
49 | |
50 | %description static | |
1e89c424 | 51 | Static version of Extensible Binary Meta Language library. |
8b795909 | 52 | |
c04fa4d7 JR |
53 | %description static -l pl.UTF-8 |
54 | Statyczna wersja biblioteki rozszerzalnego metajęzyka binarnego. | |
8b795909 JB |
55 | |
56 | %prep | |
bdb94268 | 57 | %setup -q |
8b795909 JB |
58 | |
59 | %build | |
0bc28d66 JB |
60 | # .pc file generation expects relative CMAKE_INSTALL_{INCLUDE,LIB}DIR |
61 | %if %{with static_libs} | |
62 | install -d build-static | |
63 | cd build-static | |
64 | %cmake .. \ | |
65 | -DBUILD_SHARED_LIBS:BOOL=OFF \ | |
66 | -DCMAKE_INSTALL_INCLUDEDIR=include \ | |
67 | -DCMAKE_INSTALL_LIBDIR=%{_lib} | |
d76b557e | 68 | |
0bc28d66 JB |
69 | %{__make} |
70 | cd .. | |
71 | %endif | |
72 | ||
73 | install -d build | |
74 | cd build | |
75 | %cmake .. \ | |
76 | -DCMAKE_INSTALL_INCLUDEDIR=include \ | |
77 | -DCMAKE_INSTALL_LIBDIR=%{_lib} | |
899ab54b JB |
78 | |
79 | %{__make} | |
8b795909 JB |
80 | |
81 | %install | |
82 | rm -rf $RPM_BUILD_ROOT | |
1e89c424 | 83 | |
0bc28d66 JB |
84 | %if %{with static_libs} |
85 | %{__make} -C build-static install \ | |
86 | DESTDIR=$RPM_BUILD_ROOT | |
87 | %endif | |
88 | ||
89 | %{__make} -C build install \ | |
899ab54b | 90 | DESTDIR=$RPM_BUILD_ROOT |
8b795909 JB |
91 | |
92 | %clean | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
95 | %post -p /sbin/ldconfig | |
96 | %postun -p /sbin/ldconfig | |
97 | ||
5a9874e6 | 98 | %files |
8b795909 | 99 | %defattr(644,root,root,755) |
0bc28d66 | 100 | %doc ChangeLog README.md |
1e89c424 | 101 | %attr(755,root,root) %{_libdir}/libebml.so.*.*.* |
386b4522 | 102 | %attr(755,root,root) %ghost %{_libdir}/libebml.so.5 |
8b795909 JB |
103 | |
104 | %files devel | |
105 | %defattr(644,root,root,755) | |
1e89c424 | 106 | %attr(755,root,root) %{_libdir}/libebml.so |
8b795909 | 107 | %{_includedir}/ebml |
899ab54b | 108 | %{_pkgconfigdir}/libebml.pc |
aa2cebf6 | 109 | %{_libdir}/cmake/EBML |
8b795909 | 110 | |
0bc28d66 | 111 | %if %{with static_libs} |
8b795909 JB |
112 | %files static |
113 | %defattr(644,root,root,755) | |
114 | %{_libdir}/libebml.a | |
0bc28d66 | 115 | %endif |