f3f00db71ac960fbd8c3617b6d3c56ec0d23a356
[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:        1.1.1
10 Release:        0
11 License:        Apache-2.0
12 Summary:        Command line tool to interact with XDS
13 Url:            https://github.com/iotbzh/xds-cli.git
14 Source0:        xds-cli_linux-amd64-v%{version}_2018-04-05_110646.zip
15 BuildRequires:  unzip
16 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
17
18 %description
19 xds-cli is a client tool that should be used to interact with an XDS server.
20
21 %prep
22 %setup -q -n xds-cli
23
24 %build
25
26 %install
27 mkdir -p %{?buildroot}%{_prefix}/xds/cli %{?buildroot}%{_bindir}
28 cp xds-cli %{?buildroot}%{_prefix}/xds/cli
29 ln -s ../xds/cli/xds-cli %{?buildroot}%{_bindir}/xds-cli
30 mkdir -p %{?buildroot}%{_sysconfdir}/profile.d
31 sed -e "s;@XDS_INSTALL_BIN_DIR@;%{_bindir};g" ./conf.d/etc/profile.d/xds-cli.sh > %{buildroot}%{_sysconfdir}/profile.d/%{name}.sh
32
33 %files
34 %defattr(-,root,root)
35 %dir %{_prefix}
36 %dir %{_bindir}
37 %dir %{_prefix}/xds
38 %dir %{_prefix}/xds/cli
39 %{_prefix}/xds/cli/*
40 %{_bindir}/xds-cli
41 %config %{_sysconfdir}/profile.d/%{name}.sh
42 %attr(644,root,root) %{_sysconfdir}/profile.d/%{name}.sh