-
Notifications
You must be signed in to change notification settings - Fork 3
/
backtrace.spec
160 lines (130 loc) · 4.49 KB
/
backtrace.spec
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
###############################################################################
# $Revision: 1.86 $
# $Date: 2011/07/06 16:54:26 $
###############################################################################
#TODO: define your package name
%define name backtrace
# Bull software starts with 1.1-Bull.1.0
# For versionning policy, please see wiki:
# http://intran0x.frec.bull.fr/projet/HPC/wiki_etudes/index.php/How_to_generate_RPM#Bull_rpm_NAMING_CONVENTION
%define version 1.2.0
# Using the .snapshot suffix helps the SVN tagging process.
# Please run <your_svn_checkout>/devtools/packaged/bin/auto_tag -m
# to get the auto_tag man file
# and to understand the SVN tagging process.
# If you don't care, then, just starts with Bull.1.0%{?dist}.%{?revision}snapshot
# and run 'make tag' when you want to tag.
%define release Bull.9.2%{?dist}.%{?revision}snapshot
# Warning: Bull's continuous compilation tools refuse the use of
# %release in the src_dir variable!
%define src_dir %{name}-%{version}
%define src_tarall %{src_dir}.tar.gz
# Predefined variables:
# {%_mandir} => normally /usr/share/man (depends on the PDP)
# %{perl_vendorlib} => /usr/lib/perl5/vendor_perl/
Prefix: /etc
Prefix: /usr
# Other custom variables
%define src_conf_dir conf
%define src_bin_dir bin
%define src_lib_dir lib
%define src_doc_dir doc
%define target_conf_dir /etc/
%define target_bin_dir /usr/bin
%define target_lib_dir /usr/lib*
%define target_python_lib_dir %{python2_sitearch}
%define target_man_dir %{_mandir}
%define target_doc_dir /usr/share/doc/%{name}
Prefix: /usr
# TODO: Give your summary
Summary: backtrace library extracted from GCC.
Name: %{name}
Version: %{version}
Release: %{release}
Source: %{src_tarall}
# Perform a 'cat /usr/share/doc/rpm-*/GROUPS' to get a list of available
# groups. Note that you should be in the corresponding PDP to get the
# most accurate information!
# TODO: Specify the category your software belongs to
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-root
# Automatically filled in by PDP: it should not appear therefore!
#Packager: BXIHL <[email protected]>
Distribution: Bull HPC
# Automatically filled in by PDP: it should not appear therefore!
#Vendor: Bull
License: BSD
BuildArch: x86_64
URL: https://github.com/gcc-mirror/gcc/tree/master/libbacktrace
#TODO: What do you provide
Provides: %{name}
#Conflicts:
#TODO: What do you require
BuildRequires: gcc
buildRequires: gcc-c++
#TODO: Give a description (seen by rpm -qi) (No more than 80 characters)
%description
Backtrace library extracted from GCC.
%package devel
Summary: Header files providing the library API
Requires: %{name}
#TODO: Give a description (seen by rpm -qi) (No more than 80 characters)
%description devel
Header files providing the library API
###############################################################################
# Prepare the files to be compiled
%prep
#%setup -q -n %{name}
test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
%setup
%configure --disable-debug
###############################################################################
# The current directory is the one main directory of the tar
# Order of upgrade is:
#%pretrans new
#%pre new
#install new
#%post new
#%preun old
#delete old
#%postun old
#%posttrans new
%build
%{__make}
%install
%{__make} install DESTDIR=$RPM_BUILD_ROOT %{?mflags_install}
mkdir -p $RPM_BUILD_ROOT/%{target_doc_dir}
cp ChangeLog $RPM_BUILD_ROOT/%{target_doc_dir}
rm -f $RPM_BUILD_ROOT/%{target_lib_dir}/lib*.la
%post
%postun
%preun
%clean
cd /tmp
rm -rf $RPM_BUILD_ROOT/%{name}-%{version}
test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
###############################################################################
# Specify files to be placed into the package
%files
%defattr(-,root,root)
#%{_libdir}/lib*
%{target_lib_dir}/lib*
%files devel
%{_includedir}/*.h
#%config(noreplace) %{target_conf_dir}/my.conf
# Changelog is automatically generated (see Makefile)
# The %doc macro already contain a default path (usually /usr/doc/)
# See:
# http://www.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html#S3-RPM-INSIDE-FLIST-DOC-DIRECTIVE for details
# %doc ChangeLog
# or using an explicit path:
#%{target_bin_dir}/bin1
#%{target_bin_dir}/prog2
#%{target_bin_dir}/exe3
%doc
%{target_doc_dir}/ChangeLog
# %changelog is automatically generated by 'make log' (see the Makefile)
##################### WARNING ####################
## Do not add anything after the following line!
##################################################
%changelog