File ems-flasher.spec of Package ems-flasher

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


%if 0%{?suse_version} <= 1110
# Needed for SLE11, keep until hardware drops SLE11 repositories.
%define _udevrulesdir /lib/udev/rules.d/
%endif
Name:           ems-flasher
Version:        0.03
Release:        0
Summary:        Software for flashing the EMS Gameboy USB cart
License:        MIT
Group:          Hardware/Other
Url:            http://lacklustre.net/redmine/projects/ems-flash
Source0:        %{name}-%{version}.tar.bz2
Source1:        50-ems-gb-flash.rules
BuildRequires:  help2man
BuildRequires:  libusb-1_0-devel
BuildRequires:  pkgconfig
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

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

make %{?_smp_mflags}

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

install -d -m 755 %{buildroot}%{_udevrulesdir}
install -m 644 %{SOURCE1} %{buildroot}%{_udevrulesdir}/

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

%files
%defattr(-, root, root)
%doc AUTHORS COPYING README
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*
%{_udevrulesdir}/50-ems-gb-flash.rules
%if 0%{?suse_version} <= 1110
%dir %{_udevrulesdir}
%dir %{_udevrulesdir}/..
%endif

%changelog
openSUSE Build Service is sponsored by