%define base_name device-aggregator %define prefix_name iml-%{base_name} Name: %{prefix_name} Version: 1.0.1 Release: 1%{?dist} Summary: Assembles global device view from output of multiple device scanner instances. License: MIT Group: System Environment/Libraries URL: https://github.com/intel-hpdd/%{base_name} # Forcing local source because rpkg in copr does not seem to have a way # to build source in the same way a package manager would. Source0: %{prefix_name}-%{version}.tgz ExclusiveArch: %{nodejs_arches} BuildRequires: nodejs-packaging BuildRequires: nodejs BuildRequires: npm BuildRequires: mono-devel BuildRequires: %{?scl_prefix}rh-dotnet20 BuildRequires: systemd Requires: nodejs %description Aggregates info received from device scanner instances over HTTPS. %prep %setup %build mozroots --import --sync scl enable rh-dotnet20 - << EOF set -e export DOTNET_CLI_TELEMETRY_OPTOUT=1 npm i --ignore-scripts npm run restore dotnet fable npm-build EOF %install mkdir -p %{buildroot}%{_unitdir} cp dist/device-aggregator-daemon/%{base_name}.socket %{buildroot}%{_unitdir} cp dist/device-aggregator-daemon/%{base_name}.service %{buildroot}%{_unitdir} mkdir -p %{buildroot}%{_libdir}/%{name}-daemon cp dist/device-aggregator-daemon/device-aggregator-daemon %{buildroot}%{_libdir}/%{name}-daemon %clean rm -rf %{buildroot} %files %dir %{_libdir}/%{name}-daemon %attr(0755,root,root)%{_libdir}/%{name}-daemon/device-aggregator-daemon %attr(0644,root,root)%{_unitdir}/%{base_name}.service %attr(0644,root,root)%{_unitdir}/%{base_name}.socket %post if [ $1 -eq 1 ]; then systemctl enable %{base_name}.socket systemctl start %{base_name}.socket elif [ $1 -eq 2 ]; then systemctl daemon-reload systemctl stop %{base_name}.socket systemctl stop %{base_name}.service systemctl start %{base_name}.socket fi %preun if [ $1 -eq 0 ] ; then systemctl stop %{base_name}.socket systemctl disable %{base_name}.socket systemctl stop %{base_name}.service systemctl disable %{base_name}.service rm /var/run/%{base_name}.sock fi %changelog * Wed Feb 28 2018 Tom Nabarro - 1.0.1-1 - include Vagrantfile and keys - fix project file order - fix rpmlint spec changelog warning and e-mail addresses - fix aggregator output format * Mon Feb 26 2018 Tom Nabarro - 1.0.0-1 - include module-tools, build in docker and publish to COPR * Sat Feb 03 2018 Tom Nabarro - 0.1.2-1 - create and publish package to bintray on push to master * Fri Feb 02 2018 Tom Nabarro - 0.1.1-1 - minor updates to deploy script * Fri Feb 02 2018 Tom Nabarro - 0.1.0-1 - initial package