Created
October 30, 2011 18:02
-
-
Save jumanjiman/1326195 to your computer and use it in GitHub Desktop.
spec file to bundle an intel license file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name: intel-license | |
Version: 0.1 | |
Release: 1%{?dist} | |
Summary: Provides license file for Intel products | |
Group: System Environment/Base | |
License: Proprietary | |
URL: http://jumanjiman.github.com | |
Source0: %{name}-%{version}.tar.gz | |
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) | |
BuildArch: noarch | |
%description | |
Floating license for Intel products, such as VTune. | |
This must be installed on the flexlm server and all | |
clients that need to run Intel tools. | |
%prep | |
%setup -q | |
%build | |
%install | |
%{__rm} -rf %{buildroot} | |
%{__mkdir_p} %{buildroot}%{_sysconfdir}/profile.d | |
%{__install} -pm 644 src/intel-license.sh %{buildroot}%{_sysconfdir}/profile.d | |
%{__mkdir_p} %{buildroot}/opt/intel/licenses | |
%{__install} -pm 644 %{current_license} %{buildroot}/opt/intel/licenses/server.lic | |
%clean | |
%{__rm} -rf %{buildroot} | |
%files | |
%defattr(-,root,root,-) | |
%config /opt/intel/licenses/server.lic | |
%{_sysconfdir}/profile.d/intel-license.sh | |
%post | |
sed -i '/^#INTEL_LICENSE_BEGIN/,/^#INTEL_LICENSE_END/D' /etc/hosts &> /dev/null || : | |
if [ $1 -gt 0 ]; then | |
cat >> /etc/hosts << EOF | |
#INTEL_LICENSE_BEGIN | |
192.168.0.254 id-lic01.example.com id-lic01 | |
#INTEL_LICENSE_END | |
EOF | |
fi | |
%changelog | |
* Fri Mar 04 2011 Paul Morgan <jumanjiman@gmail.com> 0.1-1 | |
- new package built with tito |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See http://jumanjiman.github.com/blog/2011/10/30/deploying-intel-studio-xe for an explanation of this gist.