]> git.pld-linux.org Git - packages/libebml.git/blob - libebml.spec
- fix building with gcc 11, rel 3
[packages/libebml.git] / libebml.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static library
4
5 Summary:        Extensible Binary Meta Language access library
6 Summary(pl.UTF-8):      Biblioteka dostępu rozszerzalnego metajęzyka binarnego
7 Name:           libebml
8 Version:        1.4.2
9 Release:        3
10 License:        LGPL v2.1+
11 Group:          Libraries
12 Source0:        https://dl.matroska.org/downloads/libebml/%{name}-%{version}.tar.xz
13 # Source0-md5:  194095f4315334fcedacb4900c59c014
14 Patch0:         gcc11.patch
15 URL:            https://www.matroska.org/
16 BuildRequires:  cmake >= 3.1.2
17 BuildRequires:  libstdc++-devel >= 6:4.7
18 BuildRequires:  rpmbuild(macros) >= 1.605
19 BuildRequires:  tar >= 1:1.22
20 BuildRequires:  xz
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
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.
27
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.
32
33 %package devel
34 Summary:        Header files for Extensible Binary Meta Language library
35 Summary(pl.UTF-8):      Nagłówki biblioteki rozszerzalnego metajęzyka binarnego
36 Group:          Development/Libraries
37 Requires:       %{name} = %{version}-%{release}
38 Requires:       libstdc++-devel >= 6:4.7
39
40 %description devel
41 Header files for Extensible Binary Meta Language library.
42
43 %description devel -l pl.UTF-8
44 Nagłówki biblioteki rozszerzalnego metajęzyka binarnego.
45
46 %package static
47 Summary:        Static version of Extensible Binary Meta Language library
48 Summary(pl.UTF-8):      Statyczna wersja biblioteki rozszerzalnego metajęzyka binarnego
49 Group:          Development/Libraries
50 Requires:       %{name}-devel = %{version}-%{release}
51
52 %description static
53 Static version of Extensible Binary Meta Language library.
54
55 %description static -l pl.UTF-8
56 Statyczna wersja biblioteki rozszerzalnego metajęzyka binarnego.
57
58 %prep
59 %setup -q
60 %patch0 -p1
61
62 %build
63 # .pc file generation expects relative CMAKE_INSTALL_{INCLUDE,LIB}DIR
64 %if %{with static_libs}
65 install -d build-static
66 cd build-static
67 %cmake .. \
68         -DBUILD_SHARED_LIBS:BOOL=OFF \
69         -DCMAKE_INSTALL_INCLUDEDIR=include \
70         -DCMAKE_INSTALL_LIBDIR=%{_lib}
71
72 %{__make}
73 cd ..
74 %endif
75
76 install -d build
77 cd build
78 %cmake .. \
79         -DCMAKE_INSTALL_INCLUDEDIR=include \
80         -DCMAKE_INSTALL_LIBDIR=%{_lib}
81
82 %{__make}
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86
87 %if %{with static_libs}
88 %{__make} -C build-static install \
89         DESTDIR=$RPM_BUILD_ROOT
90 %endif
91
92 %{__make} -C build install \
93         DESTDIR=$RPM_BUILD_ROOT
94
95 %clean
96 rm -rf $RPM_BUILD_ROOT
97
98 %post   -p /sbin/ldconfig
99 %postun -p /sbin/ldconfig
100
101 %files
102 %defattr(644,root,root,755)
103 %doc ChangeLog README.md
104 %attr(755,root,root) %{_libdir}/libebml.so.*.*.*
105 %attr(755,root,root) %ghost %{_libdir}/libebml.so.5
106
107 %files devel
108 %defattr(644,root,root,755)
109 %attr(755,root,root) %{_libdir}/libebml.so
110 %{_includedir}/ebml
111 %{_pkgconfigdir}/libebml.pc
112 %{_libdir}/cmake/EBML
113
114 %if %{with static_libs}
115 %files static
116 %defattr(644,root,root,755)
117 %{_libdir}/libebml.a
118 %endif
This page took 0.037354 seconds and 3 git commands to generate.