From: Jan Rękorajski Date: Sat, 14 Sep 2019 13:01:57 +0000 (+0200) Subject: - new X-Git-Tag: auto/th/lib3mf-1.8.1-1 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=46cfa32f81be5b5804293ce27bd9d49ff3f854fe;p=packages%2Flib3mf.git - new --- 46cfa32f81be5b5804293ce27bd9d49ff3f854fe diff --git a/lib3mf.spec b/lib3mf.spec new file mode 100644 index 0000000..20200e4 --- /dev/null +++ b/lib3mf.spec @@ -0,0 +1,80 @@ +# +# Conditional build: +%bcond_with tests # build with tests +# +Summary: Implementation of the 3D Manufacturing Format file standard +Name: lib3mf +Version: 1.8.1 +Release: 1 +License: BSD +Group: Libraries +Source0: https://github.com/3MFConsortium/lib3mf/archive/v%{version}/%{name}-%{version}.tar.gz +# Source0-md5: 39dc08572cf5d080d3f15a66d99c3efb +Patch0: pkgconfig.patch +URL: https://3mf.io/ +BuildRequires: cmake +BuildRequires: ossp-uuid-devel +%{?with_tests:BuildRequires: googletest} +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +As 3MF shall become an universal 3D Printing standard, its quick +adoption is very important. This library shall lower all barriers of +adoption to any possible user, let it be software providers, hardware +providers, service providers or middleware tools. The specification +can be downloaded at http://3mf.io/specification/ + +Its aim is to offer an open source way to integrate 3MF reading and +writing capabilities, as well as conversion and validation tools for +input and output data. The 3MF Library shall provide a clean and +easy-to-use API to speed up the development and keep integration costs +at a minimum. + +%package devel +Summary: Header files for %{name} library +Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +Header files for %{name} library. + +%description devel -l pl.UTF-8 +Pliki nagłówkowe biblioteki %{name}. + +%prep +%setup -q +%patch0 -p1 + +%build +mkdir -p build +cd build +%{cmake} ../ \ + -DCMAKE_INSTALL_INCLUDEDIR:PATH=%{_includedir}/lib3MF \ + %{cmake_on_off tests LIB3MF_TESTS} +%{__make} + +%install +rm -rf $RPM_BUILD_ROOT + +%{__make} -C build install \ + DESTDIR=$RPM_BUILD_ROOT + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(644,root,root,755) +%doc README.md +%attr(755,root,root) %{_libdir}/lib3MF.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/lib3MF.so.1 + +%files devel +%defattr(644,root,root,755) +%doc CONTRIBUTING.md Lib3MF-1.pdf +%attr(755,root,root) %{_libdir}/lib3MF.so +%{_includedir}/lib3MF +%{_pkgconfigdir}/lib3MF.pc diff --git a/pkgconfig.patch b/pkgconfig.patch new file mode 100644 index 0000000..526a64b --- /dev/null +++ b/pkgconfig.patch @@ -0,0 +1,12 @@ +--- lib3mf-1.8.1/lib3MF.pc.in~ 2019-01-08 13:36:18.000000000 +0100 ++++ lib3mf-1.8.1/lib3MF.pc.in 2019-09-14 14:02:54.652811189 +0200 +@@ -1,7 +1,7 @@ + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=@CMAKE_INSTALL_PREFIX@ +-libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ +-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ ++libdir=@CMAKE_INSTALL_LIBDIR@ ++includedir=@CMAKE_INSTALL_INCLUDEDIR@ + + Name: @PROJECT_NAME@ + Description: @PROJECT_DESCRIPTION@