2012-09-19 18:56:25 +02:00
|
|
|
#
|
|
|
|
# spec file for package iodine
|
|
|
|
#
|
2017-03-13 03:59:15 +01:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2012-09-19 18:56:25 +02:00
|
|
|
# Copyright (c) 2012 Malcolm J Lewis <malcolmlewis@opensuse.org>
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2017-03-13 03:59:15 +01:00
|
|
|
|
2017-11-23 16:06:00 +01:00
|
|
|
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
|
|
|
%if ! %{defined _fillupdir}
|
|
|
|
%define _fillupdir /var/adm/fillup-templates
|
|
|
|
%endif
|
|
|
|
|
2012-09-19 18:56:25 +02:00
|
|
|
Name: iodine
|
2014-11-22 02:56:58 +01:00
|
|
|
Version: 0.7.0
|
2012-09-19 18:56:25 +02:00
|
|
|
Release: 0
|
2016-12-29 18:28:32 +01:00
|
|
|
Summary: Tunnel IPv4 data through a DNS server
|
2017-03-13 03:59:15 +01:00
|
|
|
License: ISC
|
2016-12-29 18:28:32 +01:00
|
|
|
Group: Productivity/Networking/System
|
2017-03-13 03:59:15 +01:00
|
|
|
Url: http://code.kryo.se/iodine/
|
2014-11-22 02:56:58 +01:00
|
|
|
Source0: http://code.kryo.se/iodine/iodine-%{version}.tar.gz
|
2012-09-19 18:56:25 +02:00
|
|
|
Source1: iodine.service
|
|
|
|
Source2: sysconfig.iodine
|
|
|
|
Source3: iodined.service
|
|
|
|
Source4: sysconfig.iodined
|
2021-06-07 23:00:06 +02:00
|
|
|
Source5: system-user-iodined.conf
|
2012-09-19 18:56:25 +02:00
|
|
|
#PATCH-FIX-OPENSUSE iodine-fix-makefile-prefix.patch malcolmlewis@opensuse.org -- Modify default install prefix.
|
|
|
|
Patch0: iodine-fix-makefile-prefix.patch
|
2017-03-13 03:59:15 +01:00
|
|
|
BuildRequires: fdupes
|
2019-06-17 07:42:27 +02:00
|
|
|
BuildRequires: pkgconfig(systemd)
|
2012-09-19 18:56:25 +02:00
|
|
|
BuildRequires: zlib-devel
|
2019-01-06 15:41:09 +01:00
|
|
|
# iodine still uses ifconfig
|
|
|
|
Requires: net-tools-deprecated
|
2012-09-19 18:56:25 +02:00
|
|
|
Requires(pre): %fillup_prereq
|
2021-06-07 23:00:06 +02:00
|
|
|
%if 0%{?suse_version} >= 1500
|
|
|
|
Requires(pre): group(nobody)
|
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version} >= 1550
|
|
|
|
BuildRequires: sysuser-tools
|
|
|
|
%sysusers_requires
|
|
|
|
%else
|
|
|
|
Requires(pre): /usr/sbin/useradd
|
|
|
|
%endif
|
2012-09-19 18:56:25 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
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.
|
|
|
|
|
|
|
|
%prep
|
2014-11-22 02:56:58 +01:00
|
|
|
%setup -q -n %{name}-%{version}
|
2012-09-19 18:56:25 +02:00
|
|
|
%patch0 -p1
|
|
|
|
|
|
|
|
%build
|
|
|
|
make PREFIX=%{_prefix} %{?_smp_mflags}
|
2021-06-07 23:00:06 +02:00
|
|
|
%if 0%{?suse_version} >= 1550
|
2021-06-21 15:09:43 +02:00
|
|
|
%sysusers_generate_pre %{SOURCE5} iodine system-user-iodined.conf
|
2021-06-07 23:00:06 +02:00
|
|
|
%endif
|
2012-09-19 18:56:25 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
make install PREFIX=%{buildroot}%{_prefix}
|
|
|
|
# Install client files
|
|
|
|
mkdir -p %{buildroot}%{_unitdir}
|
|
|
|
install -m 0644 %{S:1} %{buildroot}%{_unitdir}/
|
2017-11-23 16:06:00 +01:00
|
|
|
mkdir -p %{buildroot}%{_fillupdir}
|
|
|
|
install -m 0644 %{S:2} %{buildroot}%{_fillupdir}/
|
2012-09-19 18:56:25 +02:00
|
|
|
# Install server files
|
|
|
|
install -m 0644 %{S:3} %{buildroot}%{_unitdir}/
|
2017-11-23 16:06:00 +01:00
|
|
|
install -m 0644 %{S:4} %{buildroot}%{_fillupdir}/
|
2012-09-19 18:56:25 +02:00
|
|
|
# Copy common man page to avoid warning
|
|
|
|
pushd %{buildroot}%{_mandir}/man8/
|
|
|
|
cp %{name}.8 %{name}d.8
|
|
|
|
popd
|
2014-11-22 02:56:58 +01:00
|
|
|
# make chroot dir
|
|
|
|
mkdir -p %{buildroot}/var/lib/iodined
|
2017-03-13 03:59:15 +01:00
|
|
|
# make rc-link
|
|
|
|
ln -sf /usr/sbin/service %{buildroot}%{_sbindir}/rciodine
|
|
|
|
ln -sf /usr/sbin/service %{buildroot}%{_sbindir}/rciodined
|
2021-06-07 23:00:06 +02:00
|
|
|
%if 0%{?suse_version} >= 1550
|
|
|
|
mkdir -p %{buildroot}%{_sysusersdir}
|
|
|
|
install -m 0644 %{SOURCE5} %{buildroot}%{_sysusersdir}/
|
|
|
|
%endif
|
2012-09-19 18:56:25 +02:00
|
|
|
|
2021-06-07 23:00:06 +02:00
|
|
|
%if 0%{?suse_version} >= 1550
|
|
|
|
%pre -f iodine.pre
|
|
|
|
%else
|
2012-09-19 18:56:25 +02:00
|
|
|
%pre
|
2021-06-07 23:00:06 +02:00
|
|
|
/usr/sbin/useradd -r -d /var/lib/iodined -s /bin/false -c "user for iodine dns tunnel" -g nobody iodined 2> /dev/null || :
|
|
|
|
%endif
|
2012-09-19 18:56:25 +02:00
|
|
|
%service_add_pre iodine.service
|
|
|
|
%service_add_pre iodined.service
|
2014-11-22 02:56:58 +01:00
|
|
|
|
2012-09-19 18:56:25 +02:00
|
|
|
%post
|
|
|
|
%service_add_post iodine.service
|
|
|
|
%service_add_post iodined.service
|
|
|
|
%{fillup_only -n iodine}
|
|
|
|
%{fillup_only -n iodined}
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun iodine.service
|
|
|
|
%service_del_preun iodined.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun iodine.service
|
|
|
|
%service_del_postun iodined.service
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc CHANGELOG README TODO
|
|
|
|
%{_sbindir}/%{name}
|
|
|
|
%{_sbindir}/%{name}d
|
2017-11-23 16:06:00 +01:00
|
|
|
%{_fillupdir}/sysconfig.iodine
|
|
|
|
%{_fillupdir}/sysconfig.iodined
|
2017-03-13 03:59:15 +01:00
|
|
|
%{_sbindir}/rciodine
|
|
|
|
%{_sbindir}/rciodined
|
2012-09-19 18:56:25 +02:00
|
|
|
%{_unitdir}/iodine.service
|
|
|
|
%{_unitdir}/iodined.service
|
2021-06-07 23:00:06 +02:00
|
|
|
%if 0%{?suse_version} >= 1550
|
|
|
|
%{_sysusersdir}/system-user-iodined.conf
|
|
|
|
%endif
|
2012-09-19 18:56:25 +02:00
|
|
|
%{_mandir}/man8/%{name}.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/%{name}d.8%{?ext_man}
|
2014-11-22 02:56:58 +01:00
|
|
|
%attr(0700,iodined,nobody)/var/lib/iodined
|
2012-09-19 18:56:25 +02:00
|
|
|
|
|
|
|
%changelog
|