File fcode-utils.spec of Package fcode-utils

%define realname fcode-utils
%define srcext   tar.bz2

# turn off the generation of debuginfo rpm  (RH9) ??
%global debug_package %{nil}

# Common info
Name:          %{realname}
Version:       0
Release:       wiz%{?extraver:0.}1%{?dist}
License:       GPL-2.0 and CPL-1.0
Group:         Development/Tools/Other
URL:           https://www.openfirmware.info/FCODE_suite
Summary:       A set of utilities to process FCODE, OpenFirmware's byte code

# Build-time parameters
BuildRoot:     %{_tmppath}/%{name}-root
Source:        %{realname}-%{version}%{?extraver}.%{srcext}

%description
OpenBIOS provides a sophisticated set of FCODE utilities:

  * the tokenizer toke
  * the detokenizer detok
  * and a PCI rom header utility.
  * a portable implementation of forth local values

# Preparation step (unpackung and patching if necessary)
%prep
%setup -q -n %{realname}-%{version}%{?extraver}
cp detok/README README.detok
cp toke/README README.toke

%build
%{__make} %{?_smp_mflags} \
 CFLAGS="%{optflags} %{?gcc_lto}" \
 CXXFLAGS="%{optflags} %{?gcc_lto}" \
 LDFLAGS="-Wl,--as-needed -Wl,--strip-all %{?gcc_lto}"

%install
%{__make} install DESTDIR=%{buildroot}%{_prefix}

%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}

%files
%defattr(-,root,root)
%doc COPYING README README.* documentation/*
%{_bindir}/*

%changelog
openSUSE Build Service is sponsored by