summaryrefslogtreecommitdiffstats
path: root/conf.d/packaging/rpm
diff options
context:
space:
mode:
authorRonan Le Martret <ronan.lemartret@iot.bzh>2018-05-15 17:50:09 +0200
committerRonan Le Martret <ronan.lemartret@iot.bzh>2018-05-15 17:50:09 +0200
commit8004920fdc8a55b27c4175293213113423cbb9da (patch)
tree113eaf60e23d7fdf8288155c5125a056a6e9d7a5 /conf.d/packaging/rpm
parentfd92acd31442e32047c5eeb6f7968afd4b04a312 (diff)
Add packaging files
* it's easier to manage native build package. Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
Diffstat (limited to 'conf.d/packaging/rpm')
-rw-r--r--conf.d/packaging/rpm/agl-xds-cli.spec42
1 files changed, 42 insertions, 0 deletions
diff --git a/conf.d/packaging/rpm/agl-xds-cli.spec b/conf.d/packaging/rpm/agl-xds-cli.spec
new file mode 100644
index 0000000..f3f00db
--- /dev/null
+++ b/conf.d/packaging/rpm/agl-xds-cli.spec
@@ -0,0 +1,42 @@
+#
+# spec file for package agl-xds-cli
+#
+
+%define _prefix /opt/AGL
+%global debug_package %{nil}
+
+Name: agl-xds-cli
+Version: 1.1.1
+Release: 0
+License: Apache-2.0
+Summary: Command line tool to interact with XDS
+Url: https://github.com/iotbzh/xds-cli.git
+Source0: xds-cli_linux-amd64-v%{version}_2018-04-05_110646.zip
+BuildRequires: unzip
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
+%description
+xds-cli is a client tool that should be used to interact with an XDS server.
+
+%prep
+%setup -q -n xds-cli
+
+%build
+
+%install
+mkdir -p %{?buildroot}%{_prefix}/xds/cli %{?buildroot}%{_bindir}
+cp xds-cli %{?buildroot}%{_prefix}/xds/cli
+ln -s ../xds/cli/xds-cli %{?buildroot}%{_bindir}/xds-cli
+mkdir -p %{?buildroot}%{_sysconfdir}/profile.d
+sed -e "s;@XDS_INSTALL_BIN_DIR@;%{_bindir};g" ./conf.d/etc/profile.d/xds-cli.sh > %{buildroot}%{_sysconfdir}/profile.d/%{name}.sh
+
+%files
+%defattr(-,root,root)
+%dir %{_prefix}
+%dir %{_bindir}
+%dir %{_prefix}/xds
+%dir %{_prefix}/xds/cli
+%{_prefix}/xds/cli/*
+%{_bindir}/xds-cli
+%config %{_sysconfdir}/profile.d/%{name}.sh
+%attr(644,root,root) %{_sysconfdir}/profile.d/%{name}.sh