Fix/Update packaging
[src/xds/xds-gdb.git] / conf.d / packaging / rpm / agl-xds-gdb.spec
1 #
2 # spec file for package agl-xds-gdb
3 #
4
5 %define _prefix /opt/AGL
6 %global debug_package %{nil}
7
8 Name:           agl-xds-gdb
9 Version:        0.0.0
10 Release:        0
11 License:        Apache-2.0
12 Summary:        Wrapper on gdb debugger for XDS
13 Url:            https://gerrit.automotivelinux.org/gerrit/p/src/xds/xds-gdb.git
14 Source0:        xds-gdb_linux-amd64-%{version}.zip
15 BuildRequires:  unzip
16 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
17 Group:          Development/Tools/Debuggers
18
19 %description
20 xds-gdb is an agent that should run on your local machine when you use XDS
21
22 %prep
23 %setup -q -n xds-gdb
24
25 %build
26
27 %install
28 mkdir -p %{?buildroot}%{_prefix}/xds/gdb %{?buildroot}%{_bindir}
29 cp xds-gdb %{?buildroot}%{_prefix}/xds/gdb
30 ln -s ../xds/gdb/xds-gdb %{?buildroot}%{_bindir}/xds-gdb
31
32 mkdir -p %{?buildroot}%{_sysconfdir}/profile.d
33 sed -e "s;@XDS_INSTALL_BIN_DIR@;%{_bindir};g" ./conf.d/etc/profile.d/xds-gdb.sh > %{buildroot}%{_sysconfdir}/profile.d/%{name}.sh
34
35 %files
36 %defattr(-,root,root)
37 %dir %{_prefix}
38 %dir %{_bindir}
39 %dir %{_prefix}/xds
40 %dir %{_prefix}/xds/gdb
41 %{_prefix}/xds/gdb/*
42 %{_bindir}/xds-gdb
43 %config %{_sysconfdir}/profile.d/%{name}.sh
44 %attr(644,root,root) %{_sysconfdir}/profile.d/%{name}.sh