Skip to content

Instantly share code, notes, and snippets.

@pkilambi
Created May 7, 2013 14:17
Show Gist options
  • Save pkilambi/5532882 to your computer and use it in GitHub Desktop.
Save pkilambi/5532882 to your computer and use it in GitHub Desktop.
$ git diff
diff --git a/puppet-cobbler.spec b/puppet-cobbler.spec
index 5ee7caa..7543960 100644
--- a/puppet-cobbler.spec
+++ b/puppet-cobbler.spec
@@ -9,6 +9,8 @@ URL: https://github.com/CiscoSystems/puppet-cobbler.git
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+%define tmpname %(echo %{name} | cut -d- -f 2-)
+
%description
This module can be used to flexibly configure cobbler. It is recommended to use the openst
@@ -20,12 +22,12 @@ This module can be used to flexibly configure cobbler. It is recommende
%install
rm -rf %{buildroot}
-install -d %{buildroot}/%{_usr}/share/puppet/modules/%{name}/
-cp -R * %{buildroot}/%{_usr}/share/puppet/modules/%{name}/
+install -d %{buildroot}/%{_usr}/share/puppet/modules/%{tmpname}/
+cp -R * %{buildroot}/%{_usr}/share/puppet/modules/%{tmpname}/
%files
-%dir %{_usr}/share/puppet/modules/%{name}/
-%{_usr}/share/puppet/modules/%{name}/*
+%dir %{_usr}/share/puppet/modules/%{tmpname}/
+%{_usr}/share/puppet/modules/%{tmpname}/*
%defattr(-,root,root,-)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment