Skip to content

Instantly share code, notes, and snippets.

@jumanjiman
Created October 30, 2011 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jumanjiman/1326195 to your computer and use it in GitHub Desktop.
Save jumanjiman/1326195 to your computer and use it in GitHub Desktop.
spec file to bundle an intel license file
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
@jumanjiman
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment