Blob Blame History Raw
Name:		ser2net
Summary: 	Proxy that allows tcp connections to serial ports
Version:	2.7
Release:	1%{?dist}
License:	GPLv2+
Group:		Applications/System
Source0:	http://download.sourceforge.net/ser2net/%{name}-%{version}.tar.gz
# Filed upstream:
# http://sourceforge.net/tracker/index.php?func=detail&aid=2074265&group_id=28625&atid=393783
Patch0:		ser2net-2.5-initfixes.patch
URL:		http://ser2net.sourceforge.net/
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): /sbin/service
Requires(postun): /sbin/service

%description
ser2net provides a way for a user to connect from a network connection to a 
serial port. It provides all the serial port setup, a configuration file to 
configure the ports, a control login for modifying port parameters, 
monitoring ports, and controlling ports.

%prep
%setup -q
%patch0 -p1 -b .initfixes

%build
%configure
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
install -m0644 ser2net.conf $RPM_BUILD_ROOT%{_sysconfdir}
install ser2net.init $RPM_BUILD_ROOT%{_initrddir}/ser2net

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/chkconfig --add ser2net

%preun
if test [ $1  = 0 ]; then
	/sbin/service ser2net stop >/dev/null 2>&1 || :
	/sbin/chkconfig --del ser2net
fi

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

%files
%defattr(-,root,root)
%doc COPYING ChangeLog AUTHORS README
%attr(0755,root,root) %{_initrddir}/ser2net
%config(noreplace) %{_sysconfdir}/ser2net.conf
%{_sbindir}/ser2net
%{_mandir}/man8/ser2net*

%changelog
* Thu Nov  5 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.7-1
- Update to 2.7

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Jul 22 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.6-1
- update to 2.6

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Aug 25 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.5-1
- update to 2.5
- fix initscript to not be on by default
- add try-restart

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.4-2.1
- Autorebuild for GCC 4.3

* Mon Aug 27 2007 Tom "spot" Callaway <tcallawa@redhat.com> 2.4-2
- rebuild for BuildID

* Thu Aug  2 2007 Tom "spot" Callaway <tcallawa@redhat.com> 2.4-1
- bump to 2.4

* Wed Oct 18 2006 Tom "spot" Callaway <tcallawa@redhat.com> 2.3-3
- fix typo

* Wed Oct  4 2006 Tom "spot" Callaway <tcallawa@redhat.com> 2.3-2
- fix initscript handling

* Fri Jul 28 2006 Tom "spot" Callaway <tcallawa@redhat.com> 2.3-1
- Initial package for Fedora Extras