Blob Blame History Raw
%global prerel -rc1

Name:		iodine
Version:		0.6.0
Release:		0.rc1.7%{?dist}
Summary:		Solution to tunnel IPv4 data through a DNS server
Summary(ru):	Решение для туннелирования IPv4 трафика через DNS сервер
Group:		System Environment/Daemons
License:		ISC
URL:			http://code.kryo.se/iodine/
Source0:		http://code.kryo.se/%{name}/%{name}-%{version}%{prerel}.tar.gz
# Initscripts and separate configs made by Nikolay Ulyanitsky
Source1:		%{name}-client.conf
Source2:		%{name}-server.conf

Source3:		%{name}-client.init
Source4:		%{name}-server.init

Source5:		%{name}.logrotate.client
Source6:		%{name}.logrotate.server

# It still needed for EPEL5
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# http://dev.kryo.se/iodine/ticket/87
Patch0:		iodine-0.5.2-prefix.patch

BuildRequires:	zlib-devel
Requires(post):	chkconfig
Requires(preun):	chkconfig, initscripts
Requires(postun):	initscripts

Requires:		%{name}-client
Requires:		%{name}-server

%description
iodine lets you tunnel IPv4 data through a DNS server. This can be usable in
different situations where internet access is firewalled, but DNS queries are
allowed.

It runs on Linux, Mac OS X, FreeBSD, NetBSD, OpenBSD and Windows and needs a
TUN/TAP device. The bandwidth is asymmetrical with limited upstream and up to
1 Mbit/s downstream.

This is meta-package to install both client and server.

%description -l ru
iodine предоставляет возможность пробросить IPv4 туннель сквозь DNS сервер.
Это может быть очень полезно в разных ситуациях, когда доступ в интернет
запрещён фаерволом, но DNS запросы пропускаются нормально.

Iodine работает на Linux, Mac OS X, FreeBSD, NetBSD, OpenBSD и Windows и
использует TUN/TAP устройство. Пропускная способность асимметрична - аплоад не
быстр, скачивание до 1 Mbit/s.

Это мета-пакет для инсталляции обоих пакетов, клиента и сервера.

%package client
Summary:			Client part of solution to tunnel IPv4 data through a DNS server
Summary(ru):		Клиент для туннелирования IPv4 трафика через DNS сервер
Requires(post):	chkconfig
Requires(preun):	chkconfig, initscripts
Requires(postun):	initscripts

%description client
This is the client part of iodine sulution.

%description client -l ru
Это пакет клиентской части

%package server
Summary:			Server part of solution to tunnel IPv4 data through a DNS server
Summary(ru):		Сервер для туннелирования IPv4 трафика через DNS сервер
Requires(post):	chkconfig
Requires(preun):	chkconfig, initscripts
Requires(postun):	initscripts

%description server
This is the server part of iodine solution.

%description server -l ru
Это пакет серверной части

%prep
%setup -q -n %{name}-%{version}%{prerel}
%patch0 -p0 -b .prefix

%build
# It is fail to build without -c gcc flag (comes from upstream Makefile).
make %{?_smp_mflags} PREFIX=%{_prefix} CFLAGS="-c %{optflags} -DLINUX"

%install
rm -rf %{buildroot}
make install PREFIX=%{buildroot}%{_prefix}

install -Dp -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/sysconfig/%{name}-client
install -Dp -m 0644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/sysconfig/%{name}-server

install -Dp -m 0755 %{SOURCE3} %{buildroot}/%{_initrddir}/%{name}-client
install -Dp -m 0755 %{SOURCE4} %{buildroot}/%{_initrddir}/%{name}-server

install -Dp -m 0644 %{SOURCE5} %{buildroot}/%{_sysconfdir}/logrotate.d/%{name}-client
install -Dp -m 0644 %{SOURCE6} %{buildroot}/%{_sysconfdir}/logrotate.d/%{name}-server

%clean
rm -rf %{buildroot}

%post client
/sbin/chkconfig --add %{name}-client

%post server
/sbin/chkconfig --add %{name}-server

%preun client
if [ $1 = 0 ] ; then
	/sbin/service %{name}-client stop >/dev/null 2>&1
	/sbin/chkconfig --del %{name}-client
fi

%preun server
if [ $1 = 0 ] ; then
	/sbin/service %{name}-server stop >/dev/null 2>&1
	/sbin/chkconfig --del %{name}-server
fi

%postun client
if [ "$1" -ge "1" ] ; then
	/sbin/service %{name}-client condrestart >/dev/null 2>&1 || :
fi

%postun server
if [ "$1" -ge "1" ] ; then
	/sbin/service %{name}-server condrestart >/dev/null 2>&1 || :
fi

%files
%defattr(-,root,root,-)
%doc CHANGELOG README TODO

%files client
%defattr(-,root,root,-)
%{_sbindir}/%{name}
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/%{name}-client
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}-client
%{_initrddir}/%{name}-client
%{_mandir}/man8/%{name}.8.gz

%files server
%defattr(-,root,root,-)
%{_sbindir}/%{name}d
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/%{name}-server
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}-server
%{_initrddir}/%{name}-server


%changelog
* Mon Jan 2 2012 Pavel Alexeev <Pahan@Hubbitus.info> - 0.6.0-0.rc1.7
- By request bz#758930 split to subpackages.

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-0.rc1.6.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Tue Oct 26 2010 Pavel Alexeev <Pahan@Hubbitus.info> - 0.6.0-0.rc1.6
- Add -DLINUX to build options (BZ#644310, thanks to Andy Shevchenko)
- Fix service scripts to find binaries in /usr/sbin instead of /usr/bin (BZ#644299 thanks to Andy Shevchenko)
- Add 0600 file attributes to prevent password access from regular users (BZ#644305).
- In comments configs add IODINE(D)_PASS variables description (BZ#644317).

* Wed Sep 29 2010 jkeating - 0.6.0-0.rc1.4.2
- Rebuilt for gcc bug 634757

* Wed Sep 29 2010 jkeating - 0.6.0-0.rc1.4.1
- Rebuilt for gcc bug 634757

* Sun Sep 12 2010 Pavel Alexeev <Pahan@Hubbitus.info> - 0.6.0-0.rc1.4
- Build new version 0.6.0rc1
- Define prerel.

* Sat Mar 6 2010 Pavel Alexeev <Pahan@Hubbitus.info> - 0.5.2-3
- Honor CFLAGS

* Mon Feb 22 2010 Pavel Alexeev <Pahan@Hubbitus.info> - 0.5.2-2
- Import some items from Nikolay Ulyanitsky package ( https://bugzilla.redhat.com/show_bug.cgi?id=530747#c1 ):
	o Add initscripts support (modified)
	o Add logrotate support
	o Exclude README-win32.txt and respective delete dos2unix BR.
	o Add BR zlib-devel

* Sat Oct 24 2009 Pavel Alexeev <Pahan@Hubbitus.info> - 0.5.2-1
- Initial spec.