File yara.spec of Package yara
#
# spec file for package yara
#
# Copyright (c) 2017 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 soname 3
Name: yara
Version: 3.6.1
Release: 0
Summary: A malware identification and classification tool
License: Apache-2.0
Group: System/Filesystems
Url: http://plusvic.github.io/yara/
Source: https://github.com/VirusTotal/yara/archive/v%{version}.tar.gz
BuildRequires: file-devel
BuildRequires: flex
BuildRequires: libjansson-devel
BuildRequires: libtool
BuildRequires: pcre-devel
BuildRequires: pkg-config
BuildRequires: python-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
YARA is a tool aimed at helping malware researchers to identify and classify malware samples. With YARA you can create descriptions of malware families based on textual or binary patterns contained on samples of those families. Each description consists of a set of strings and a Boolean expression which determines its logic. Let's see an example:
%package -n libyara%{soname}
Summary: Library to support the yara malware identification tool
Group: System/Libraries
%description -n libyara%{soname}
YARA is a tool aimed at helping malware researchers to identify and classify malware samples. With YARA you can create descriptions of malware families based on textual or binary patterns contained on samples of those families. Each description consists of a set of strings and a Boolean expression which determines its logic. Let's see an example:
%package -n python-%name
Summary: Python bindings to support the yara malware identification tool
Group: Development/Languages/Python
Requires: python
%description -n python-%name
YARA is a tool aimed at helping malware researchers to identify and classify malware samples. With YARA you can create descriptions of malware families based on textual or binary patterns contained on samples of those families. Each description consists of a set of strings and a Boolean expression which determines its logic. Let's see an example:
%package -n libyara-devel
Summary: Development files to support the yara malware identification tool
Group: Development/Libraries/C and C++
Requires: libyara%{soname} = %{version}-%{release}
%description -n libyara-devel
YARA is a tool aimed at helping malware researchers to identify and classify malware samples. With YARA you can create descriptions of malware families based on textual or binary patterns contained on samples of those families. Each description consists of a set of strings and a Boolean expression which determines its logic. Let's see an example:
%package doc
Summary: Documentation files to support the YARA malware identification tool
Group: Development/Libraries/C and C++
Requires: libyara%{soname} = %{version}-%{release}
%description doc
Documentation and guideslines to support YARA.
YARA is a tool aimed at helping malware researchers to identify and classify malware samples. With YARA you can create descriptions of malware families based on textual or binary patterns contained on samples of those families. Each description consists of a set of strings and a Boolean expression which determines its logic. Let's see an example:
%prep
%setup -q
%build
./bootstrap.sh
# cuckoo depends on libjansson-devel: not in factory
%if 0%{?suse_version} > 1310
%configure --enable-magic --enable-cuckoo
%else
%configure --enable-magic
%endif
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
find %{buildroot} -type f -name '*.la' -delete -print
find %{buildroot} -type f -name '*.a' -delete -print
%post -n libyara%{soname} -p /sbin/ldconfig
%postun -n libyara%{soname} -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc COPYING README.md CONTRIBUTORS AUTHORS
%{_bindir}/yara
%{_bindir}/yarac
%{_mandir}/man1/yara.1.gz
%{_mandir}/man1/yarac.1.gz
%files -n libyara%{soname}
%defattr(-,root,root)
%doc COPYING README.md CONTRIBUTORS AUTHORS
%{_libdir}/libyara.so.3
%{_libdir}/libyara.so.%{version}
%files -n libyara-devel
%defattr(-,root,root)
%doc COPYING README.md CONTRIBUTORS AUTHORS
%{_includedir}/yara.h
%{_includedir}/yara
%{_libdir}/libyara.so
%{_libdir}/pkgconfig/yara.pc
%files doc
%defattr(-,root,root)
%doc docs
%changelog