2 # spec file for package agl-xds-server
5 %define _prefix /opt/AGL
6 %global debug_package %{nil}
13 Url: https://gerrit.automotivelinux.org/gerrit/p/src/xds/xds-server.git
14 Source0: xds-server_linux-amd64-%{version}.zip
16 BuildRoot: %{_tmppath}/%{name}-%{version}-build
17 Group: Development/Tools/Debuggers
19 # for now still embedded with xds
23 xds-server is a web server that allows user to remotely cross build applications.
26 %setup -q -n xds-server
31 mkdir -p %{?buildroot}%{_prefix}/xds/server %{?buildroot}%{_bindir}
32 cp -r * %{?buildroot}%{_prefix}/xds/server/
33 rm -rf %{?buildroot}%{_prefix}/xds/server/conf.d
34 ln -s ../xds/server/xds-server %{?buildroot}%{_bindir}/xds-server
35 ln -s ../xds/server/syncthing %{?buildroot}%{_bindir}/syncthing
36 ln -s ../xds/server/syncthing-inotify %{?buildroot}%{_bindir}/syncthing-inotify
37 mkdir -p %{?buildroot}%{_userunitdir}
38 cp ./conf.d/usr/lib/systemd/user/xds-server.service %{?buildroot}%{_userunitdir}
39 mkdir -p %{?buildroot}/%{_sysconfdir}/default
40 cp ./conf.d/etc/default/xds-server %{?buildroot}/%{_sysconfdir}/default/
41 mkdir -p %{?buildroot}/%{_sysconfdir}/xds/server
42 cp ./conf.d/etc/xds/server/* %{?buildroot}/%{_sysconfdir}/xds/server/
43 mkdir -p %{?buildroot}%{_userunitdir}/default.target.wants && ln -s ../xds-server.service %{?buildroot}%{_userunitdir}/default.target.wants/
44 mkdir -p %{?buildroot}%{_sysconfdir}/profile.d
45 sed -e "s;@XDS_INSTALL_BIN_DIR@;%{_bindir};g" ./conf.d/etc/profile.d/xds-server.sh > %{buildroot}%{_sysconfdir}/profile.d/%{name}.sh
52 %dir %{_prefix}/xds/server
53 %{_prefix}/xds/server/*
56 %{_bindir}/syncthing-inotify
57 %dir %{_sysconfdir}/xds
58 %dir %{_sysconfdir}/xds/server
59 %config %{_sysconfdir}/default/xds-server
60 %config %{_sysconfdir}/xds/server/*
61 %config %{_sysconfdir}/profile.d/%{name}.sh
63 %{_userunitdir}/xds-server.service
64 %dir %{_userunitdir}/default.target.wants
65 %{_userunitdir}/default.target.wants/xds-server.service
69 if [ "$1" -ge 2 ]; then
70 if [ -f "${_sysconfdir}/xds-server/config.json" ]; then
71 install -b -S .rpmsave ${_sysconfdir}/xds-server/config.json ${_sysconfdir}/xds/server/server-config.json
77 if [ "$1" -ge 2 ]; then
78 rm -f %{_sysconfdir}/xds-server/*.rpm*