Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build on opensuse TumbleWeed #167

Open
oshikore opened this issue Jul 17, 2022 · 0 comments
Open

How to build on opensuse TumbleWeed #167

oshikore opened this issue Jul 17, 2022 · 0 comments

Comments

@oshikore
Copy link

oshikore commented Jul 17, 2022

Build script

#!/bin/bash

echo Installing dependencies
DEPS="gcc-c++ gcc cmake libboost_program_options-devel libboost_system-devel fuse-devel fuse zlib-devel"
sudo zypper install $DEPS

echo "Cloning repository"
git clone https://github.com/pcloudcom/console-client.git
cd console-client
echo "Patching CMake config"
patch  -p1 < ../opensuse.patch || exit 1
cd pCloudCC/
echo Building pclsync
cd lib/pclsync/
make clean || exit 1
make fs || exit 1
echo Building mbedtls
cd ../mbedtls/
cmake . || exit 1
make clean
make || exit 1
echo Building pcloudCC
cd ../..
cmake . || exit 1
make || exit 1
echo
echo Build complete
echo
echo To install run
echo "cd $PWD; sudo make install; sudo ldconfig"
echo
echo "to set up a constantly running service run the following as root:"
echo "cp pcloud.service /etc/systemd/system && systemctl daemon-reload && systemctl enable pcloud && systemctl start pcloud"

patch to build w/ dynamically linked Boost

diff --git a/pCloudCC/CMakeLists.txt b/pCloudCC/CMakeLists.txt
index bfe3a6b..86414d1 100644
--- a/pCloudCC/CMakeLists.txt
+++ b/pCloudCC/CMakeLists.txt
@@ -1,9 +1,9 @@
-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 3.0)
 project(pcloudcc)

 #INCLUDE(CPack)

-set(Boost_USE_STATIC_LIBS ON)
+set(Boost_USE_STATIC_LIBS OFF)
 set(Boost_USE_MULTITHREADED ON)
 unset(Boost_INCLUDE_DIR CACHE)
 unset(Boost_LIBRARY_DIRS CACHE)

systemd unit

Note: this will work correctly IF your user already saved a password in w/ pcloudcc -s

[Unit]
Description=pCloud service
After=network.target

[Service]
Type=simple
User=oscar
Group=oscar
ExecStart=/usr/local/bin/pcloudcc -u 'username'
KillMode=process
Restart=on-failure
RestartSec=3
[Install]
WantedBy=multi-user.target

See PR #168 for full RPM package build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant