summaryrefslogtreecommitdiff
path: root/packaging/ragel.spec
blob: 4603739e89bcf8fd51625ceb5370de015b86456a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
%define run_tests 0
%if %{run_tests}
    # check is defined off at .rpmmacros file.
    %undefine check
%endif

Name:       ragel
Summary:    Ragel State Machine Compiler
Version:    6.8
Release:    1
Group:      System/Utilities
License:    GPL-2.0
Source0:    %{name}-%{version}.tar.gz
Source1001: 	ragel.manifest

%description
compiles finite state machines into code in various languages
Ragel compiles finite state machines from regular languages into C, C++,
Objective-C, D, Ruby or Java code. Ragel allows the programmer to embed
actions at any point in a regular language. Non-determinism can be
controlled through the use of embedded priorities and guarded regular
language operators. Ragel also supports the construction of scanners and
the building of state machines using state-charts. Ragel can be used to
create robust recognizers and parsers which run very fast. It can work
with integer-sized alphabets and can compile large state machines.
The generated code has no dependencies.


%prep
%setup -q 
cp %{SOURCE1001} .

%build
%autogen.sh
%configure --prefix=%{_prefix}

make %{?jobs:-j%jobs}

%check
%if %{run_tests}
    pushd test
    %__make check || exit 0
    popd
    ./run_test.sh %{name} %{version}
%endif

%install
rm -rf %{buildroot}
%make_install

%remove_docs

%files
%manifest %{name}.manifest
%license COPYING
%manifest ragel.manifest
%{_bindir}/ragel