forked from mchalupa/dg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dg.spec.rpkg
65 lines (53 loc) · 1.49 KB
/
dg.spec.rpkg
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
58
59
60
61
62
63
64
65
# vim: syntax=spec
# Do out-of-source build by default on Fedora
%undefine __cmake_in_source_build
Name: {{{ git_dir_name }}}
Version: {{{ git_dir_version }}}
Release: 1%{?dist}
Summary: Analyses, construction of dependence graphs and slicing of LLVM bitcode
License: MIT
URL: https://github.com/mchalupa/dg
VCS: {{{ git_dir_vcs }}}
Source: {{{ git_dir_archive }}}
BuildRequires: clang
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: llvm-devel
BuildRequires: make
BuildRequires: ncurses-devel
BuildRequires: python3
BuildRequires: zlib-devel
Requires: clang
Requires: llvm
%description
DG is a library containing various bits for program analysis. However, the
main motivation of this library is program slicing. The library contains
implementation of a pointer analysis, data dependence analysis, control
dependence analysis, and an analysis of relations between values in LLVM
bitcode. All of the analyses target LLVM bitcode, but most of them are written
in a generic way, so they are not dependent on LLVM in particular.
%prep
{{{ git_dir_setup_macro }}}
%build
GIT_VERSION={{{ git rev-parse --short --sq HEAD }}}
%cmake -DGIT_VERSION="$GIT_VERSION"
%cmake_build
%install
%cmake_install
%check
%if 0%{?suse_version}
%cmake_build -C %{__builddir} check
%else
%if 0%{?epel}
%cmake_build check
%else
%cmake_build --target check
%endif
%endif
%files
%license LICENSE
%doc doc/*
%{_bindir}/*
%{_includedir}/%{name}
%{_libdir}/*