File trinity.spec of Package trinity
#
# spec file for package trinity
#
# 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/
#
%define version_unconverted 1.6+git.20160603
Name: trinity
Version: 1.6+git.20160603
Release: 0
Summary: A Linux System call fuzz tester
License: GPL-2.0
Group: Development/Tools/Other
Url: http://codemonkey.org.uk/projects/trinity/
Source0: %{name}-%{version}.tar.xz
# SLE11-SP*, for -std=gnu11
%if 0%{suse_version} == 1110
%if 0%{?product_libs_gcc_ver} == 48
#SP4
%define gcc_minor 8
%else
#SP3
%define gcc_minor 7
%endif
BuildRequires: gcc4%{gcc_minor}
%else
BuildRequires: gcc
%endif
%if 0%{suse_version} >= 1320
# needed for btrfs/ioctl.h
BuildRequires: libbtrfs-devel
%endif
%if 0%{suse_version} >= 1330
# builds for 32 bit architectures are failing on Tumbleweed
ExcludeArch: %ix86 %arm
%endif
BuildRequires: make
BuildRequires: xz
# older packages which use old versioning scheme need to be obsoleted,
# this can be removed in the future
Provides: %{name} = 20160315
Obsoletes: %{name} = 20160315
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The basic idea is fairly simple. As 'fuzz testing' suggests, we call syscalls
at random, with random arguments. Not an original idea, and one that has been
done many times before on Linux, and on other operating systems. Where
Trinity differs is that the arguments it passes are not purely random.
%prep
%setup -q
%build
%if 0%{suse_version} == 1110
export CC=gcc-4.%{gcc_minor}
%endif
export CFLAGS="%{optflags}"
./configure
make %{?_smp_mflags} V=1
%install
make DESTDIR=%{buildroot}/usr install
install -D -m 0644 trinity.1 %{buildroot}%{_mandir}/man1/trinity.1
%files
%defattr(-,root,root)
%doc README COPYING
%{_bindir}/trinity
%{_mandir}/man1/trinity.1%{ext_man}
%changelog