azure-vm-utils/azure-vm-utils.spec

61 lines
1.7 KiB
RPMSpec

#
# spec file for package azure-vm-utils
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: azure-vm-utils
Version: 0.4.0
Release: 0
Summary: Core utilities and configuration for Linux VMs on Azure
License: MIT
URL: https://github.com/Azure/%{name}
Source: %{url}/archive/v%{version}/%{name}-v%{version}.tar.gz
BuildRequires: cmake
BuildRequires: dracut
BuildRequires: gcc
BuildRequires: pkgconfig(libudev)
%description
This package provides a home for core utilities, udev rules and other
configuration to support Linux VMs on Azure.
%prep
%autosetup -n %{name}-%{version}
%if 0%{?suse_version} < 1500
sed -i 's/usr\/bin\/bash/bin\/bash/g' initramfs/dracut/modules.d/97azure-disk/module-setup.sh
%endif
%build
%cmake -DVERSION="%{version}-%{release}"
%cmake_build
%install
%cmake_install
%check
%ctest
%files
%defattr(-,root,root,-)
%{_mandir}/man8/azure-nvme-id.8.gz
%dir %{_prefix}/lib/dracut/modules.d/97azure-disk
%{_prefix}/lib/dracut/modules.d/97azure-disk/module-setup.sh
%{_sbindir}/azure-nvme-id
%{_udevrulesdir}/80-azure-disk.rules
%changelog