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