[packages/polonaise] - new
qboosh
qboosh at pld-linux.org
Sat May 25 19:08:05 CEST 2024
commit 033b9bc29ecc75c2a4bc54385045b39c31ba4bc2
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat May 25 19:08:48 2024 +0200
- new
polonaise-cmake.patch | 12 ++++++
polonaise-thrift-c++11.patch | 23 +++++++++++
polonaise.spec | 93 ++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 128 insertions(+)
---
diff --git a/polonaise.spec b/polonaise.spec
new file mode 100644
index 0000000..98414eb
--- /dev/null
+++ b/polonaise.spec
@@ -0,0 +1,93 @@
+# TODO: shared library?
+Summary: Polonaise - file system protocol
+Summary(pl.UTF-8): Polonaise - protokół systemów plików
+Name: polonaise
+Version: 0.3.1
+Release: 1
+License: Apache v2.0
+Group: Libraries
+#Source0Download: https://github.com/polonaise/polonaise/tags
+Source0: https://github.com/polonaise/polonaise/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 4de289df625cdc6669b42d953466e7e3
+Patch0: %{name}-thrift-c++11.patch
+Patch1: %{name}-cmake.patch
+URL: https://github.com/polonaise/polonaise
+BuildRequires: boost-devel
+BuildRequires: cmake >= 2.8
+BuildRequires: libfuse-devel
+BuildRequires: libstdc++-devel >= 6:4.7
+BuildRequires: rpmbuild(macros) >= 1.605
+BuildRequires: thrift >= 0.11
+BuildRequires: thrift-devel >= 0.11
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Polonaise is a file system protocol. It uses Thrift
+(<https://thrift.apache.org/>) in its transport layer.
+
+%description -l pl.UTF-8
+Polonaise to protokół systemów plików. W warstwie transportowej
+wykorzystuje bibliotekę Thrift (<https://thrift.apache.org/>).
+
+%package devel
+Summary: Development files for Polonaise library
+Summary(pl.UTF-8): Pliki programistyczne biblioteki Polonaise
+Group: Development/Libraries
+Requires: libstdc++-devel >= 6:4.7
+Requires: thrift-devel >= 0.11
+
+%description devel
+Development files for Polonaise library.
+
+Polonaise is a file system protocol. It uses Thrift
+(<https://thrift.apache.org/>) in its transport layer.
+
+%description devel -l pl.UTF-8
+Pliki programistyczne biblioteki Polonaise.
+
+Polonaise to protokół systemów plików. W warstwie transportowej
+wykorzystuje bibliotekę Thrift (<https://thrift.apache.org/>).
+
+%package fuse
+Summary: FUSE based Polonaise client
+Summary(pl.UTF-8): Oparty na FUSE klient Polonaise
+Group: Applications/System
+Requires: libfuse-tools
+
+%description fuse
+FUSE based Polonaise client.
+
+%description fuse -l pl.UTF-8
+Oparty na FUSE klient Polonaise.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+
+%build
+install -d build
+cd build
+%cmake ..
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files devel
+%defattr(644,root,root,755)
+%doc README.md
+%{_libdir}/libpolonaise.a
+%{_includedir}/polonaise
+%{_libdir}/cmake/Polonaise
+
+%files fuse
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/polonaise-fuse-client
diff --git a/polonaise-cmake.patch b/polonaise-cmake.patch
new file mode 100644
index 0000000..e470022
--- /dev/null
+++ b/polonaise-cmake.patch
@@ -0,0 +1,12 @@
+--- polonaise-0.3.1/CMakeLists.txt.orig 2014-09-16 15:54:36.000000000 +0200
++++ polonaise-0.3.1/CMakeLists.txt 2024-05-25 18:56:25.076332287 +0200
+@@ -62,7 +62,7 @@ install(FILES
+ "${PROJECT_BINARY_DIR}/PolonaiseConfig.cmake"
+ "${PROJECT_BINARY_DIR}/PolonaiseConfigVersion.cmake"
+ DESTINATION "${CMAKE_INSTALL_CMAKEDIR}"
+- CONFIGURATIONS Debug Release)
++)
+ install(EXPORT PolonaiseTargets
+ DESTINATION "${CMAKE_INSTALL_CMAKEDIR}"
+- CONFIGURATIONS Debug Release)
++)
diff --git a/polonaise-thrift-c++11.patch b/polonaise-thrift-c++11.patch
new file mode 100644
index 0000000..794178e
--- /dev/null
+++ b/polonaise-thrift-c++11.patch
@@ -0,0 +1,23 @@
+--- polonaise-0.3.1/src/examples/fuse/main.cc.orig 2014-09-16 15:54:36.000000000 +0200
++++ polonaise-0.3.1/src/examples/fuse/main.cc 2024-05-25 18:30:16.361497411 +0200
+@@ -23,7 +23,6 @@
+ #include <memory>
+ #include <mutex>
+
+-#include <boost/make_shared.hpp>
+ #include <fuse.h>
+ #include <fuse/fuse_lowlevel.h>
+ #include <fuse/fuse_opt.h>
+@@ -104,9 +103,9 @@ public:
+ lock.unlock();
+ // No clients in the pool; create a new connection
+ fprintf(stderr, "Opening a new connection to %s:%d\n", host_.c_str(), port_);
+- auto socket = boost::make_shared<TSocket>(host_, port_);
+- auto transport = boost::make_shared<TBufferedTransport>(socket, 512 * 1024, 4096);
+- auto protocol = boost::make_shared<TBinaryProtocol>(transport);
++ auto socket = std::make_shared<TSocket>(host_, port_);
++ auto transport = std::make_shared<TBufferedTransport>(socket, 512 * 1024, 4096);
++ auto protocol = std::make_shared<TBinaryProtocol>(transport);
+ auto client = std::unique_ptr<Client>(new Client(protocol));
+ socket->setNoDelay(true);
+ transport->open();
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/polonaise.git/commitdiff/033b9bc29ecc75c2a4bc54385045b39c31ba4bc2
More information about the pld-cvs-commit
mailing list