Compiling and installing s3fs and building an RPM package out of it
These are my quick notes on how I compiled and built an RPM package out of S3FS for CentOS 7.
1. Download and get the source code:
cd /tmp
curl -LO https://github.com/s3fs-fuse/s3fs-fuse/archive/v1.82.tar.gz
tar -xzf v1.82.tar.gz
cd s3fs-fuse-1.82/
2. Install dependencies:
yum -y install automake gcc-c++ fuse-devel libcurl-devel libxml2-devel openssl-devel
3. Make a temporary directory to use as the target:
mkdir -pv /target
4. Compile and install:
./autogen.sh
./configure --prefix=/target
make -j`nproc`
make install
5. Install Ruby, rpm-build and the FPM gem:
yum -y install ruby ruby-devel rpm-build
gem install fpm --no-ri --no-rdoc
6. Package it all up and don't forget to add "fuse-libs" as a dependency:
cd /target
fpm --verbose -v 1.82 -n s3fs -d fuse-libs --url="http://lampros.chaidas.com" -s dir -t rpm .=/usr/
7. Done! To Install:
yum install s3fs-1.82-1.x86_64.rpm