]> git.pld-linux.org Git - packages/libmatroska.git/blobdiff - libmatroska.spec
- updated to 1.6.2 (new soname)
[packages/libmatroska.git] / libmatroska.spec
index c40a703377cad20ef609c12128d411c6fcc47958..19178aa174b34f017539a1a91d49879688d97dfb 100644 (file)
@@ -1,19 +1,23 @@
+#
+# Conditional build:
+%bcond_without static_libs     # static library
+
 Summary:       Extensible Binary Meta Language access library
 Summary(pl.UTF-8):     Biblioteka dostępu rozszerzalnego metajęzyka binarnego
 Name:          libmatroska
-Version:       1.0.0
+Version:       1.6.2
 Release:       1
 License:       LGPL v2.1+
 Group:         Libraries
-Source0:       http://dl.matroska.org/downloads/libmatroska/%{name}-%{version}.tar.bz2
-# Source0-md5: 4efcf3945b17a6f0320cf1aaa326a4de
-Patch0:                %{name}-makefile.patch
-URL:           http://www.matroska.org/
-BuildRequires: libebml-devel >= 1.0.0
-BuildRequires: libstdc++-devel
-BuildRequires: libtool
-BuildRequires: rpmbuild(macros) >= 1.566
-BuildRequires: sed >= 4.0
+Source0:       https://dl.matroska.org/downloads/libmatroska/%{name}-%{version}.tar.xz
+# Source0-md5: 933f56e73f452648d211592762de6389
+URL:           https://www.matroska.org/
+BuildRequires: cmake >= 3.1.2
+BuildRequires: libebml-devel >= 1.4.0
+BuildRequires: libstdc++-devel >= 6:4.7
+BuildRequires: pkgconfig
+BuildRequires: rpmbuild(macros) >= 1.605
+Requires:      libebml >= 1.4.0
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -37,8 +41,8 @@ Summary:      Header files for matroska library
 Summary(pl.UTF-8):     Nagłówki dla biblioteki matroska
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
-Requires:      libebml-devel
-Requires:      libstdc++-devel
+Requires:      libebml-devel >= 1.4.0
+Requires:      libstdc++-devel >= 6:4.7
 
 %description devel
 Header files for matroska library.
@@ -60,29 +64,39 @@ Statyczna wersja biblioteki matroska.
 
 %prep
 %setup -q
-%undos make/linux/Makefile
-%patch0 -p1
 
 %build
-%{__make} -C make/linux \
-       prefix=%{_prefix} \
-       libdir=%{_libdir} \
-       CXX="%{__cxx}" \
-       LD="%{__cxx}" \
-       DEBUGFLAGS="%{rpmcflags} %{?debug:-DDEBUG}" \
-       LDFLAGS="%{rpmldflags}" \
-       LIBEBML_INCLUDE_DIR="%{_includedir}/ebml"
+# .pc file generation expects relative CMAKE_INSTALL_{INCLUDE,LIB}DIR
+%if %{with static_libs}
+install -d build-static
+cd build-static
+%cmake .. \
+       -DBUILD_SHARED_LIBS:BOOL=OFF \
+       -DCMAKE_INSTALL_INCLUDEDIR=include \
+       -DCMAKE_INSTALL_LIBDIR=%{_lib}
+
+%{__make}
+cd ..
+%endif
+
+install -d build
+cd build
+%cmake .. \
+       -DCMAKE_INSTALL_INCLUDEDIR=include \
+       -DCMAKE_INSTALL_LIBDIR=%{_lib}
+
+%{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} -C make/linux install \
-       prefix=$RPM_BUILD_ROOT%{_prefix} \
-       libdir=$RPM_BUILD_ROOT%{_libdir}
+%if %{with static_libs}
+%{__make} -C build-static install \
+       DESTDIR=$RPM_BUILD_ROOT
+%endif
 
-# prepare docs (with working hyperlinks)
-#install -d doc
-#cp --parents src/api/index.html src/api/c/index.html doc
+%{__make} -C build install \
+       DESTDIR=$RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -92,17 +106,19 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc ChangeLog
+%doc ChangeLog README.md
 %attr(755,root,root) %{_libdir}/libmatroska.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libmatroska.so.2
+%attr(755,root,root) %ghost %{_libdir}/libmatroska.so.7
 
 %files devel
 %defattr(644,root,root,755)
-##%doc doc/src/api/*
 %attr(755,root,root) %{_libdir}/libmatroska.so
-%{_libdir}/libmatroska.la
 %{_includedir}/matroska
+%{_pkgconfigdir}/libmatroska.pc
+%{_libdir}/cmake/Matroska
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libmatroska.a
+%endif
This page took 0.038696 seconds and 4 git commands to generate.