Name: ez-ipupdate
Version: 3.0.11
Release: 0.17.b8%{?dist}
Summary: Client for Dynamic DNS Services
Group: Applications/Internet
License: GPL
URL: http://www.gusnet.cx/proj/ez-ipupdate/
Source0: http://www.gusnet.cx/proj/ez-ipupdate/dist/ez-ipupdate-3.0.11b8.tar.gz
Source1: %{name}.init
Patch0: http://ftp.debian.org/debian/pool/main/e/ez-ipupdate/ez-ipupdate_3.0.11b8-10.diff.gz
Patch1: %{name}-pidfile.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(pre): /usr/sbin/useradd /usr/sbin/groupadd
%description
ez-ipupdate is a small utility for updating your host name for any of the
dynamic DNS service offered at:
* http://www.ez-ip.net
* http://www.justlinux.com
* http://www.dhs.org
* http://www.dyndns.org
* http://www.ods.org
* http://gnudip.cheapnet.net (GNUDip)
* http://www.dyn.ca (GNUDip)
* http://www.tzo.com
* http://www.easydns.com
* http://www.dyns.cx
* http://www.hn.org
* http://www.zoneedit.com
It is pure C and works on Linux, *BSD and Solaris.
Don't forget to create your own config file to %{_sysconfdir}/ez-ipupdate.conf.
You can find some examples in %{_docdir}/%{name}-%{version}.
%prep
%setup -q -n %{name}-%{version}b8
%patch0 -p1
%patch1 -p0
touch *.in aclocal.m4 configure
chmod +x missing
chmod a-x example*.conf
%build
%configure
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT bindir=%{_sbindir}
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
cp -p ez-ipupdate.8 $RPM_BUILD_ROOT%{_mandir}/man8
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
%{__perl} -pe \
's|/var/|%{_localstatedir}/|g ;
s|/usr/sbin/|%{_sbindir}/|g ;
s|/etc/([^ir])|%{_sysconfdir}/$1|g ;
s|/etc/rc\.d/init\.d/|%{_initrddir}/|g' \
< %{SOURCE1} > $RPM_BUILD_ROOT%{_initrddir}/ez-ipupdate
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/ez-ipupdate
> $RPM_BUILD_ROOT%{_localstatedir}/cache/ez-ipupdate/default-cache
# Make a directory for config files
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ez-ipupdate
> $RPM_BUILD_ROOT%{_sysconfdir}/ez-ipupdate/default.conf
# Create a dedicated dir for the pid file so we can run as non-root.
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/ez-ipupdate
%clean
rm -rf $RPM_BUILD_ROOT
%pre
/usr/sbin/groupadd -r ez-ipupd >/dev/null 2>&1 || :
/usr/sbin/useradd -r -M -d %{_localstatedir}/cache/ez-ipupdate -g ez-ipupd \
-s /sbin/nologin -c "Dynamic DNS Client" ez-ipupd >/dev/null 2>&1 || :
%post
/sbin/chkconfig --add ez-ipupdate
# move config file from old location to new if it exists
if [ $1 -gt 1 ]; then
[ -f %{_sysconfdir}/ez-ipupdate.conf ] && /bin/mv %{_sysconfdir}/ez-ipupdate.conf %{_sysconfdir}/ez-ipupdate/default.conf
[ -f %{_localstatedir}/run/ez-ipupdate/ez-ipupdate.pid ] && /bin/mv %{_localstatedir}/run/ez-ipupdate/ez-ipupdate.pid %{_localstatedir}/run/ez-ipupdate/default.pid
[ -f %{_localstatedir}/lock/subsys/ez-ipupdate ] && /bin/mv %{_localstatedir}/lock/subsys/ez-ipupdate %{_localstatedir}/lock/subsys/ez-ipupdate-default
%{_initrddir}/ez-ipupdate condrestart >/dev/null
fi
%preun
if [ $1 -eq 0 ] ; then
%{_initrddir}/ez-ipupdate stop >/dev/null 2>&1 || :
/sbin/chkconfig --del ez-ipupdate
fi
%files
%defattr(-,root,root,-)
%{_mandir}/man8/ez-ipupdate.8*
%attr(0755,root,root) %{_sbindir}/ez-ipupdate
%attr(0755,root,root) %{_initrddir}/ez-ipupdate
%dir %{_sysconfdir}/ez-ipupdate/
%doc CHANGELOG COPYING README example.conf example-*.conf
%defattr(0644,root,root,-)
%defattr(-,ez-ipupd,ez-ipupd,-)
%dir %{_localstatedir}/cache/ez-ipupdate/
%dir %{_localstatedir}/run/ez-ipupdate/
%ghost %{_localstatedir}/cache/ez-ipupdate/default-cache
%ghost %attr(0640,root,ez-ipupd) %config(noreplace,missingok) %{_sysconfdir}/ez-ipupdate/default.conf
%changelog
* Tue Mar 11 2008 Jeff Layton <jlayton@redhat.com> - 3.0.11-0.17.b8
- ez-ipupdate would be started a second time on runlevel changes (BZ#436616)
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 3.0.11-0.16.b8
- Autorebuild for GCC 4.3
* Sun Jul 15 2007 Jeff Layton <jlayton@redhat.com> - 3.0.11-0.15.b8
- initscript: add LSB header and fix return values
- initscript: remove /var/lock/subsys references
* Fri Jun 15 2007 J. Randall Owens <jrowens@ghiapet.homeip.net> - 3.0.11-0.14.b8
- fix doc directory permissions
* Thu Mar 8 2007 Jeff Layton <jlayton@redhat.com> - 3.0.11-0.13.b8
- remove Requires(postun) for user/groupdel since they're no longer needed
* Tue Sep 12 2006 Jeff Layton <jlayton@redhat.com> - 3.0.11-0.12.b8
- clean up changelog for specfile
* Tue Sep 12 2006 Jeff Layton <jlayton@redhat.com> - 3.0.11-0.11.b8
- rebuild for FC6
* Sat Jul 1 2006 Jeff Layton <jlayton@redhat.com> - 3.0.11-0.10.b8
- new init script that can handle more than one config file
- move config files into directory under sysconfdir
- don't remove user and group on exit
- don't set permissions explicitly except where needed
* Wed Feb 15 2006 Ville Skyttä <ville.skytta at iki.fi> - 3.0.11-0.9.b8
- Sync with Debian's 3.0.11b8-10.
* Fri Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 3.0.11-0.8.b8
- rebuilt
* Sun Nov 14 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:3.0.11-0.7.b8
- Update patch from Debian to 3.0.11b8-8, fixes CAN-2004-0980.
- Try harder to avoid (re-)running aclocal and friends during build.
- Cosmetic specfile improvements.
* Wed Nov 10 2004 Michael Schwendt <mschwendt[AT]users.sf.net> - 0:3.0.11-0.6.b8
- Fix build on FC3 (add "chmod +x missing" in %%prep).
* Sat Jul 19 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:3.0.11-0.fdr.0.5.b8
- Update patch from Debian to 3.0.11b8-6 (bug 337).
- Revert default-cache to %%ghost (it's not a %%config file).
* Sat Jul 19 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:3.0.11-0.fdr.0.4.b8
- Own (ghost/config) %%{_sysconfdir}/ez-ipupdate.conf (bug 337).
- Change default-cache to ghost/config.
* Tue Jun 17 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:3.0.11-0.fdr.0.3.b8
- Fix "service ez-update status" hang if no cache-file is specified,
thanks to Michael Schwendt for the catch (#337).
- Try to show last IP update from "service ez-ipupdate status" only if the
config file is readable.
* Thu Jun 5 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:3.0.11-0.fdr.0.2.b8
- Fix bad in files section (#337).
* Tue May 27 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:3.0.11-0.fdr.0.1.b8
- First build, based on Debian's 3.0.11b8_2 and Rudolf Kastl's work.