Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Update to Syncthing 1.0.0
Browse files Browse the repository at this point in the history
Using make to build
  • Loading branch information
mahiso committed Jan 24, 2019
1 parent 6b0a72e commit 4209516
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 22 deletions.
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
BUILD
BUILDROOT
RPMS
SOURCES
SRPMS

build
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
VERSION=1.0.0
RELEASE=1

.PHONY: all

all: build_rpm

prepare:
mkdir -p build/{BUILD,RPMS,SOURCES,SPECS}
ln -sf ../../SPECS/syncthing.spec build/SPECS/syncthing.spec
spectool -g -C build/SOURCES build/SPECS/syncthing.spec


build_rpm:
rpmbuild --define "_topdir `pwd`/build" -bb build/SPECS/syncthing.spec

install:
install -y build/RPMS/x86_64/syncthing-${VERSION}-${RELEASE}.el7.x86_64.rpm

clean:
rm -rf build
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

```
yum install -y policycoreutils-python
rpm -Uvh https://github.com/vdar/syncthing-centos/releases/download/v0.14.45/syncthing-0.14.45-0.el7.centos.x86_64.rpm
rpm -Uvh https://github.com/m2h7/syncthing-centos/releases/download/v1.0.0/syncthing-1.0.0-1.el7.centos.x86_64.rpm
```


Expand All @@ -13,27 +13,28 @@ rpm -Uvh https://github.com/vdar/syncthing-centos/releases/download/v0.14.45/syn
#### Install rpmbuild requirements

```
yum install -y yum-utils vim rpm-build rpmdevtools redhat-rpm-config make gcc gcc-c++ git
yum install -y yum-utils vim rpm-build rpmdevtools redhat-rpm-config make git
```

### Clone the repo and build rpm package
#### Clone the repo and build rpm package

```
cd ~
git clone https://github.com/vdar/syncthing-centos.git rpmbuild/
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros
cd ~/rpmbuild/SOURCES/
wget https://github.com/syncthing/syncthing/releases/download/v0.14.45/syncthing-linux-amd64-v0.14.45.tar.gz
cd ~/rpmbuild/SPECS/
rpmbuild -bb syncthing.spec
git clone https://github.com/vdar/syncthing-centos.git
cd syncthing-centos
make prepare
make
```
#### Install builded rpm package
```
sudo make install
```


### Start syncthing systemd service

```
sudo systemctl start syncthing@<username>
```

You can now access the GUI through this URL:
http://localhost:8080
You can now access the GUI through this URL:
http://localhost:8384
10 changes: 7 additions & 3 deletions SPECS/syncthing.spec
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Name: syncthing
Version: 0.14.49
Release: 0%{?dist}
Version: 1.0.0
Release: 1%{?dist}
Summary: Open, trustworthy and decentralized sync
# Set to amd64 or 386
%define arch amd64

Group: Applications/System
License: MPLv2
URL: https://github.com/syncthing/syncthing
Source0: https://github.com/syncthing/syncthing/releases/download/v${version}/syncthing-linux-%{arch}-v%{version}.tar.gz
Source0: https://github.com/syncthing/syncthing/releases/download/v%{version}/syncthing-linux-%{arch}-v%{version}.tar.gz

Requires: policycoreutils-python

Expand Down Expand Up @@ -40,6 +40,10 @@ cp etc/linux-systemd/user/syncthing.service %{buildroot}/etc/systemd/user/
/etc/systemd/user/syncthing.service

%changelog
* Thu Jan 24 2019 mahiso 1.0.0-1
- Updated to Syncthing version 1.0.0
- Build using Make

* Wed Jul 25 2018 eashman
- Updated to version 0.14.49

Expand Down

0 comments on commit 4209516

Please sign in to comment.