summaryrefslogtreecommitdiffstats
path: root/source-builder/config/capstone-1-1.cfg
blob: 76eca7c0fe4fce96c5485f3d1ad66ab6afabcf0e (plain) (blame)
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
#
#
# This configuration file configure's, make's and install's CAPSTONE.
#

%if %{release} == %{nil}
%define release 1
%endif

#
# Select Snapshot Macro Maps
#
%select capstone-snapshot

#
# The description.
#
Name:      capstone-%{capstone_version}-%{_host}-%{release}
Summary:   Capstone is light-weight multiplatform disassembler.
Version:   %{capstone_version}
Release:   %{release}
URL: 	   http://www.capstone-engine.org/

#
# Source
#
%source set capstone https://github.com/aquynh/capstone/archive/capstone-%{capstone_version}.tar.gz
%hash sha512 capstone-%{capstone_version}.tar.gz 296c90fcca96117b710472fb55881cb932f4f1d45e847647c2357bfa15bf36fd7f4584db5ffdabf85703d9840e65085ba76f387e6a85555e0af941a344dcf95c

#
# Prepare the source code.
#
%prep
  build_top=$(pwd)

  source_dir_capstone="capstone-%{capstone_version}"
  %source setup capstone -q -n capstone-%{capstone_version}
  %patch setup capstone -p1

  cd ${build_top}

%build
  build_top=$(pwd)

  %{build_directory}

  cd ${source_dir_capstone}

  %{__make} PREFIX=%{_prefix}

  cd ${build_top}

%install
  build_top=$(pwd)

  %{__rmdir} ${SB_BUILD_ROOT}

  cd ${source_dir_capstone}

  %{__make} DESTDIR=$SB_BUILD_ROOT PREFIX=%{_prefix} install

  cd ${build_top}