Matt Domsch b937ff4
############################################################
Matt Domsch b937ff4
# AICCU - Automatic IPv6 Connectivity Client Utility
Matt Domsch b937ff4
# by Jeroen Massar <jeroen@sixxs.net>
Matt Domsch b937ff4
# (c) Copyright 2003-2005 SixXS
Matt Domsch b937ff4
############################################################
Matt Domsch b937ff4
# AICCU RPM Spec File
Matt Domsch b937ff4
############################################################
Matt Domsch b937ff4
Matt Domsch 851ef5f
Summary:   SixXS Automatic IPv6 Connectivity Client Utility
Matt Domsch b937ff4
Name:      aiccu
Matt Domsch 47ff8dc
Version:   2007.01.15
Jochen Schmitt 2c5f12e
Release:   9%{?dist}
Matt Domsch 5c3cfb1
License:   BSD
Matt Domsch 5c3cfb1
Group:     System Environment/Daemons
Matt Domsch b937ff4
URL:       http://www.sixxs.net/tools/aiccu/
Matt Domsch b937ff4
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Jochen Schmitt 2c5f12e
Source0:    http://www.sixxs.net/archive/sixxs/aiccu/unix/aiccu_20070115.tar.gz
Jochen Schmitt 2c5f12e
Source1:   aiccu.service
Jochen Schmitt 2c5f12e
Patch0: aiccu-cloexec.patch
Jochen Schmitt 2c5f12e
Patch1: aiccu-run.patch
Matt Domsch 684567d
BuildRequires: gnutls-devel
Jochen Schmitt 2c5f12e
BuildRequires: systemd-units
Matt Domsch b937ff4
Requires:  iproute
Jochen Schmitt 2c5f12e
Requires(post): systemd-units
Jochen Schmitt 2c5f12e
Requires(preun): systemd-units
Jochen Schmitt 2c5f12e
Requires(postun): systemd-units
Matt Domsch b937ff4
Matt Domsch b937ff4
%description
Matt Domsch b937ff4
This client automatically gives one IPv6 connectivity
Matt Domsch b937ff4
without having to manually configure interfaces etc.
Matt Domsch b937ff4
One does need a SixXS account and at least a tunnel. These
Matt Domsch b937ff4
can be freely & gratis requested from the SixXS website.
Matt Domsch b937ff4
For more information about SixXS check http://www.sixxs.net
Matt Domsch b937ff4
Matt Domsch b937ff4
%prep
Matt Domsch b937ff4
%setup -q -n %{name}
Matt Domsch ea8e4c7
%patch0 -p1
Jochen Schmitt 2c5f12e
%patch1 -p1 -b .run
Matt Domsch 31a2b97
Matt Domsch b937ff4
# fix executable permissions on non-executable content
Matt Domsch b937ff4
# so debuginfo can pick them up properly
Matt Domsch b937ff4
find . -type f -not -name rules -and -not -name *init* -exec chmod a-x \{\} \;
Matt Domsch b937ff4
Matt Domsch b937ff4
%build
Matt Domsch b937ff4
make %{?_smp_mflags} RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
Matt Domsch b937ff4
Matt Domsch b937ff4
%install
Matt Domsch b937ff4
rm -rf $RPM_BUILD_ROOT
Matt Domsch b937ff4
mkdir -p $RPM_BUILD_ROOT
Matt Domsch b937ff4
make install DESTDIR=$RPM_BUILD_ROOT
Matt Domsch b937ff4
Jochen Schmitt 2c5f12e
# remove old-style init script
Jochen Schmitt 2c5f12e
rm $RPM_BUILD_ROOT%{_sysconfdir}/init.d/*
Jochen Schmitt 2c5f12e
Jochen Schmitt 2c5f12e
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
Jochen Schmitt 2c5f12e
install -p %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/
Jochen Schmitt 2c5f12e
Jochen Schmitt 2c5f12e
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
Jochen Schmitt 2c5f12e
touch $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/aiccu
Jochen Schmitt 2c5f12e
Matt Domsch b937ff4
%post
Matt Domsch b937ff4
if [ "$1" = "1" ]; then
Jochen Schmitt 2c5f12e
	/bin/systemctl --daemon-reload >/dev/null 2>&1 || :
Matt Domsch b937ff4
fi
Matt Domsch b937ff4
Matt Domsch b937ff4
%preun
Matt Domsch b937ff4
if [ "$1" = "0" ]; then
Jochen Schmitt 2c5f12e
	/bin/systemctl disable aiccu.service >/dev/null 2>&1 || :
Jochen Schmitt 2c5f12e
	/bin/systemctl stop aiccu.service >/dev/null 2>&1 || :
Matt Domsch b937ff4
fi
Matt Domsch b937ff4
Matt Domsch b937ff4
%postun
Jochen Schmitt 2c5f12e
if [ "$1" -ge 1 ]; then
Jochen Schmitt 2c5f12e
   /bin/systemctl try-restart aiccu.service >/dev/null 2>&1 || :   
Jochen Schmitt 2c5f12e
fi
Matt Domsch b937ff4
Matt Domsch b937ff4
%clean
Matt Domsch b937ff4
make clean
Matt Domsch b937ff4
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
Matt Domsch b937ff4
Matt Domsch b937ff4
%files
Matt Domsch b937ff4
%defattr(-,root,root)
Matt Domsch b937ff4
%doc doc/README doc/LICENSE
Matt Domsch b937ff4
%{_sbindir}/aiccu
Matt Domsch b937ff4
# aiccu.conf contains the users's SixXS password, so don't
Matt Domsch b937ff4
# make it readable by non-root
Matt Domsch b937ff4
%attr(600, root,root) %config(noreplace) %{_sysconfdir}/aiccu.conf
Jochen Schmitt 2c5f12e
%{_unitdir}/aiccu.service
Jochen Schmitt 2c5f12e
%{_sysconfdir}/sysconfig/aiccu
Matt Domsch b937ff4
Matt Domsch b937ff4
%changelog
Jochen Schmitt 2c5f12e
* Wed Jul  6 2011 Jochen Schmitt <Jochen herr-schmitt de> - 2007.01.15-9
Jochen Schmitt 2c5f12e
- Implementing native systemd support
Jochen Schmitt 2c5f12e
3f86cb2
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2007.01.15-8
3f86cb2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
3f86cb2
443f3b7
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2007.01.15-7
443f3b7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
443f3b7
643b776
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2007.01.15-6
643b776
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
643b776
Matt Domsch 31a2b97
* Fri Oct 17 2008 Matt Domsch <mdomsch@fedoraproject.org> - 2007.01.15-5
Matt Domsch 31a2b97
- close file descriptors on exec (BZ#467381)
Matt Domsch 31a2b97
25347d9
* Tue Jun 24 2008 Tomas Mraz <tmraz@redhat.com> 2007.01.15-4 
25347d9
- rebuild with new gnutls
25347d9
Matt Domsch ea8e4c7
* Fri Sep 21 2007 Matt Domsch <matt@domsch.com> 2007.01.15-3
Matt Domsch ea8e4c7
- add LSB initscript header (BZ#246861)
Matt Domsch ea8e4c7
Matt Domsch 1822f98
* Wed Sep 19 2007 Matt Domsch <matt@domsch.com> 2007.01.15-2
Matt Domsch 1822f98
- rebuild
Matt Domsch 1822f98
Matt Domsch 47ff8dc
* Wed Jan 31 2007 Matt Domsch <matt@domsch.com> 2007.01.15-1
Matt Domsch 47ff8dc
- upgrade to latest upstream
Matt Domsch 47ff8dc
Matt Domsch 0703458
* Sat Jan 13 2007 Matt Domsch <matt@domsch.com> 2007.01.07-2
Matt Domsch 0703458
- upstream respun their release with the same version number to fix AYIYA.
Matt Domsch 0703458
Matt Domsch 5c3cfb1
* Sun Jan 07 2007 Matt Domsch <matt@domsch.com> 2007.01.07-1
Matt Domsch 5c3cfb1
- upgrade to latest upstream 2007.01.07
Matt Domsch 5c3cfb1
  - license change to BSD 3-clause
Matt Domsch 5c3cfb1
  - Fixed up silly linux bug, adding LL address to tunnels but not to tun/taps.
Matt Domsch 5c3cfb1
  - local_ipv4_override option so one can use AICCU behind a NAT that
Matt Domsch 5c3cfb1
    has been configured correctly to do proto-41 forwarding. This is
Matt Domsch 5c3cfb1
    usually called a DMZ setup.
Matt Domsch 5c3cfb1
Matt Domsch b692680
* Mon Oct 02 2006 Matt Domsch <matt@domsch.com> 2006.07.25-2
Matt Domsch b692680
- rebuilt
Matt Domsch b692680
Matt Domsch 684567d
* Sat Sep 23 2006 Matt Domsch <matt@domsch.com> 2006.07.25-1
Matt Domsch 684567d
- upgrade to latest upstream, drop all applied patches
Matt Domsch 684567d
- add BR gnutls-devel now used for obtaining tunnel info
Matt Domsch 684567d
Matt Domsch 44c0c40
* Sat Sep  2 2006 Matt Domsch <matt@domsch.com> 2005.01.31-5
Matt Domsch 44c0c40
- rebuild
Matt Domsch 44c0c40
Matt Domsch b937ff4
* Wed Jun 28 2006 Matt Domsch <matt@domsch.com> 2005.01.31-4
Matt Domsch b937ff4
- export CFLAGS properly, fix permissions on files for debuginfo
Matt Domsch b937ff4
Matt Domsch b937ff4
* Wed Jun 28 2006 Matt Domsch <matt@domsch.com> 2005.01.31-3
Matt Domsch b937ff4
- cleanups per Fedora Extras review
Matt Domsch b937ff4
Matt Domsch b937ff4
* Sat Apr 22 2006 Matt Domsch <matt@domsch.com> 2005.01.31-2
Matt Domsch b937ff4
- match Fedora Extras spec guidelines
Matt Domsch b937ff4
- add postun condrestart
Matt Domsch b937ff4
- add reload initscript arg to satisfy rpmlint
Matt Domsch b937ff4
Matt Domsch b937ff4
* Sun Aug 29 2004 Jeroen Massar <jeroen@sixxs.net> 2004.08.29
Matt Domsch b937ff4
- Beta2 with TIC, 6in4, 6in4-heartbeat and AYIYA support
Matt Domsch b937ff4