-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
%{!?name:%define name freelan} | ||
%{!?version:%define version 2.1} | ||
%{!?release:%define release 1} | ||
|
||
Summary: Peer-to-peer virtual private network daemon | ||
Name: freelan | ||
Version: %{version} | ||
Release: %{release} | ||
License: GPLv3+ | ||
Group: Networking/Other | ||
URL: http://www.freelan.org | ||
Source0: %{name}-%{version}.tar.gz | ||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root | ||
BuildRequires: openssl-devel | ||
BuildRequires: boost-devel | ||
BuildRequires: libcurl-devel | ||
Requires: openssl-libs | ||
Requires: boost-thread | ||
Requires: boost-iostreams | ||
Requires: boost-date-time | ||
Requires: boost-program-options | ||
Requires: boost-filesystem | ||
Requires: boost-system | ||
Requires: libcurl | ||
|
||
%description | ||
Freelan is an application to create secure ethernet tunnels over a | ||
single UDP port. It can be used to create virtual LANs ("Local | ||
Area Network"), hence the name: "freelan". | ||
|
||
Freelan may create peer-to-peer tunnel connections or rely on a | ||
more classic client/server layout. The virtual network can be | ||
shaped to fit exactly the bandwidth or topology constraints, | ||
providing an optimal virtual private network. | ||
|
||
Freelan is particularly useful for remote sites interconnection and | ||
gaming. | ||
|
||
%prep | ||
%setup -q | ||
|
||
%build | ||
rm -rf $RPM_BUILD_ROOT | ||
make PRODUCT_PREFIX=$RPM_BUILD_ROOT/ PRODUCT_BIN_PREFIX=$RPM_BUILD_ROOT/usr USE_UPNP=no | ||
|
||
%install | ||
mkdir -p $RPM_BUILD_ROOT/%{_bindir} | ||
cp -a build/release/bin/freelan $RPM_BUILD_ROOT/%{_bindir}/ | ||
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/freelan | ||
cp -a apps/freelan/config/freelan.cfg $RPM_BUILD_ROOT/%{_sysconfdir}/freelan/ | ||
# manpage | ||
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1 | ||
cp packaging/rpm/freelan.1 $RPM_BUILD_ROOT/%{_mandir}/man1/freelan.1 | ||
# systemd unit | ||
mkdir -p $RPM_BUILD_ROOT/%{_unitdir} | ||
cp -p packaging/rpm/[email protected] $RPM_BUILD_ROOT/%{_unitdir}/ | ||
|
||
%clean | ||
rm -rf $RPM_BUILD_ROOT | ||
|
||
%files | ||
%defattr(-,root,root,-) | ||
%{_unitdir}/[email protected] | ||
%{_bindir}/freelan | ||
%{_mandir}/man1/* | ||
%{_sysconfdir}/freelan/freelan.cfg | ||
|
||
%preun | ||
# $1 is the number of instances of this package present _after_ the action. | ||
if [ $1 = 0 ]; then | ||
systemctl stop freelan || : | ||
else | ||
systemctl condrestart freelan || : | ||
fi | ||
|
||
%changelog | ||
* Tue Aug 15 2017 <[email protected]> - 2.1-1 | ||
- First RPM version. | ||
|