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