Name: usbhasp Version: 0.1 Release: 1%{?dist} Summary: USB HASP Emulator License: GPLv2 URL: https://github.com/sam88651/UsbHasp Source0: https://github.com/sam88651/UsbHasp/archive/725c843d1d1dd3682de9fd7c483c2af235eb481d.zip Source1: usbhaspd.service Patch0: makefile-release-gcc-version.patch BuildArch: x86_64 BuildRequires: libusb-vhci BuildRequires: unzip BuildRequires: jansson-devel Requires: libusb-vhci Requires: jansson %description USB HASP emulator daemon for Linux %define debug_package %{nil} %prep cd %{_builddir} rm -rf %{name}-%{version} /usr/bin/unzip -qq %{_sourcedir}/725c843d1d1dd3682de9fd7c483c2af235eb481d.zip mv UsbHasp-725c843d1d1dd3682de9fd7c483c2af235eb481d %{name}-%{version} %setup -qDT %if 0%{?el7} %patch0 -p1 %endif %build make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{_sbindir} install -m 755 dist/Release/GNU-Linux/usbhasp $RPM_BUILD_ROOT/%{_sbindir}/usbhasp mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/usbhasp.d touch $RPM_BUILD_ROOT/%{_sysconfdir}/usbhasp.d/.place_files_here mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/systemd/system/ cp %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/systemd/system/ %files %defattr(-,root,root) %{_sysconfdir}/usbhasp.d/.place_files_here %{_sbindir}/usbhasp %{_sysconfdir}/systemd/system/usbhaspd.service %post systemctl daemon-reload %preun systemctl stop usbhaspd %postun systemctl daemon-reload %changelog * Thu Jun 04 2020 Castor Sky 0.1 - First version of RPM package