Skip to content

Commit

Permalink
Adds Sailfish OS RPM packaging.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-vincent committed Aug 15, 2017
1 parent 2999934 commit f5b67c2
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions packaging/sailfishos/freelan.spec
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.

0 comments on commit f5b67c2

Please sign in to comment.