File ems-flasher.spec of Package ems-flasher

#
# spec file for package ems-flasher
#
# Copyright (c) 2012 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/
#



Name:           ems-flasher
Version:        0.03
Release:        0
License:        MIT 
Summary:        Software for flashing the EMS Gameboy USB cart
Url:            http://lacklustre.net/redmine/projects/ems-flash
Group:          Hardware/Other
Source0:        %{name}-%{version}.tar.bz2
Source1:        50-ems-gb-flash.rules
Patch0:         Makefile.patch
BuildRequires:  help2man
BuildRequires:  libusb-1_0-devel
BuildRequires:  pkgconfig
BuildRequires:  udev
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The EMS USB Cart (also available from the fine folks at nonfinite electronics)
for Game Boy is pretty fantastic: it is big (64 Mbit), cheap (~US$40), and has
a replaceable battery. This project aims to provide portable flasher software
for use on operating systems such as Linux. In theory it runs anywhere libusb
runs (Linux, BSD, Mac).

%prep
%setup -q
%patch -P 0 -p0

%build
%if 0%{?suse_version} >= 1120
  export SUSE_ASNEEDED=0
%endif

export CFLAGS="$RPM_OPT_FLAGS"
make %{?_smp_mflags}

%install
install -d -m 755 %{buildroot}%{_prefix}/bin
install -m 755 %{name} %{buildroot}%{_bindir}/

%if 0%{?suse_version} >= 1230
%define udevbasedir /usr/lib
%else
%define udevbasedir /lib
%endif

install -d -m 755 %{buildroot}%{udevbasedir}/udev/rules.d
install -m 644 %{SOURCE1} %{buildroot}%{udevbasedir}/udev/rules.d/

install -d -m 755 %{buildroot}%{_mandir}/man1/
help2man -N ./%{name} > %{buildroot}%{_mandir}/man1/%{name}.1

%clean
rm -rf %{buildroot}

%files
%defattr(-, root, root)
%doc AUTHORS COPYING  README
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*
%{udevbasedir}/udev/rules.d/*


%changelog
openSUSE Build Service is sponsored by