File ozerocdoff.spec of Package ozerocdoff

# spec file for package ozerocdoff (Version 0.4)
# 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

# norootforbuild

Name:           ozerocdoff
BuildRequires:  libusb-devel licenses
# for directory ownership
BuildRequires:  hal udev
License:        GPLv2+
Group:          Hardware/Modem
Version:        0.4
Release:        4
Summary:        Enable the modem ports on Option ZeroCD devices
Source0:        udev.tar.gz
Patch0:         ozerocdoff-makefile-libdir.diff
Patch1:         ozerocdoff-udevinfo.diff
Patch2:         ozerocdoff-udev.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
AutoReqProv:    on
Requires:       hal udev licenses

This tool allows to switch so called "ZeroCD" devices from Option into
modem mode, so that they can actually be used as intended.

    Peter Henn (

%setup -n udev
%patch0 -p1
%patch1 -p1
%patch2 -p0
ln -s /usr/share/doc/licenses/GPL-2.0.txt COPYING

# This package failed when testing with -Wl,-as-needed being default.
# So we disable it here, if you want to retest, just delete this comment and the line below.
%{__make} clean

mkdir -p $RPM_BUILD_ROOT/usr/bin
%{__make} DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} install
install -d $RPM_BUILD_ROOT%{_mandir}/man8
install -m0644 osetsuspend.8 $RPM_BUILD_ROOT%{_mandir}/man8/
install -m0644 ozerocdoff.8 $RPM_BUILD_ROOT%{_mandir}/man8/

%{__rm} -rf $RPM_BUILD_ROOT

%config(noreplace) /etc/hso-suspend.conf
%config /etc/udev/rules.d/51-hso-udev.rules
%doc %{_mandir}/man8/*.*
%dir %{_libdir}/hal
%dir %{_libdir}/hal/scripts
#%dir /usr/share/hal/fdi
#%dir /usr/share/hal/fdi/preprobe
#%dir /usr/share/hal/fdi/preprobe/20thirdparty
#%dir /usr/share/hal/fdi/information
#%dir /usr/share/hal/fdi/information/20thirdparty
#%dir /etc/udev
#%dir /etc/udev/rules.d