File setserial.spec of Package setserial
#
# spec file for package setserial (Version 2.17)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#
# norootforbuild
Name: setserial
Version: 2.17
Release: 720
Provides: util:/sbin/setserial
PreReq: %insserv_prereq
Requires: /sbin/isserial
AutoReqProv: on
Group: Hardware/Other
License: GPLv2+
Url: http://setserial.sourceforge.net
Summary: A utility for configuring serial ports
Source0: ftp://tsx-11.mit.edu/pub/linux/sources/sbin/setserial-%{version}.tar.bz2
Source1: setserial.init
Patch0: %{name}-%{version}-autoconf.diff
Patch1: %{name}-%{version}-error.diff
Patch2: %{name}-%{version}-prototypes.diff
Patch3: %{name}-%{version}-nohayes.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Setserial is a basic system utility for displaying or setting serial
port information. Setserial can reveal and allow you to alter the I/O
port and IRQ that a particular serial device is using.
%prep
%setup -q
%patch0
%patch1
%patch2
%patch3 -p1
%build
%suse_update_config
CFLAGS="$RPM_OPT_FLAGS -Wall" \
./configure \
--prefix=%{_prefix} \
--bindir=/bin \
--sysconfdir=%{_sysconfdir} \
--mandir=%{_mandir}
make
%install
mkdir -p ${RPM_BUILD_ROOT}/bin
mkdir -p ${RPM_BUILD_ROOT}/etc/init.d
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
make install DESTDIR="$RPM_BUILD_ROOT" STRIP=:
install %SOURCE1 ${RPM_BUILD_ROOT}/etc/init.d/setserial
ln -sf /etc/init.d/setserial ${RPM_BUILD_ROOT}%{_sbindir}/rcsetserial
%clean
rm -rf $RPM_BUILD_ROOT
%postun
%{insserv_cleanup}
%files
%defattr(-,root,root)
%doc README setserial.lsm rc.serial
%doc %{_mandir}/man?/*
%config %{_sysconfdir}/init.d/setserial
/bin/*
%{_sbindir}/*
%changelog