File re2c.spec of Package re2c

# spec file for package re2c
# Copyright (c) 2011 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:           re2c
BuildRequires:  gcc-c++
Version:        0.13.5
Release:        37
License:        SUSE-Public-Domain
Group:          Development/Libraries/C and C++
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source:         %{name}-%{version}.tar.bz2
Summary:        Tool for generating C-based recognizers from regular expressions

re2c is a tool for writing fast and flexible lexers. Unlike other such
tools, it concentrates solely on generating efficient code for matching
regular expressions. This makes it suitable for a wide variety of
applications. The generated scanners approach hand-crafted ones in
terms of size and speed.

    Dan Nuffer

%setup -q
find -type d -name .svn -print0 | xargs -r0 rm -rf
find CHANGELOG lessons examples -type f -print0 \
    | xargs -r0 chmod -v a-x

%{__make} %{?_smp_mflags} re2c
#regenerate file
%{__rm} -f
./re2c -g >
%{__rm} -f re2c scanner.o
%{__make} %{?_smp_mflags}

%{__make} test


%{__rm} -rf %{buildroot}

%doc doc/*.ps doc/sample.bib
%doc lessons/ examples/