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