%global drupalver 7 %{?rhel: %{expand: %%global drupal drupal%%{drupalver}}} %if 0%{?fedora} >= 15 %global drupal drupal%{drupalver} %endif %{!?drupal: %{expand: %%global drupal drupal}} # e.g. "/usr/share/drupal7" %global drupaldir %{_datadir}/%{drupal} # Use upstream name as expressed in URL and tarball %global modname context Name: drupal%{drupalver}-%{modname} Version: 3.0 Release: 0.1.beta1%{?dist} Summary: Allows you to manage contextual conditions and reactions of your site Group: Applications/Publishing License: GPLv2+ URL: http://drupal.org/project/%{modname} Source0: http://ftp.drupal.org/files/projects/%{modname}-%{drupalver}.x-%{version}-beta1.tar.gz Source1: %{name}-fedora-README.txt Source2: LICENSE.txt BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: %{drupal} >= 7.0, drupal7-ctools %description Context allows you to manage contextual conditions and reactions for different portions of your site. You can think of each context as representing a "section" of your site. For each context, you can choose the conditions that trigger this context to be active and choose different aspects of Drupal that should react to this active context. Think of conditions as a set of rules that are checked during page load to see what context is active. Any reactions that are associated with active contexts are then fired. %prep %setup -qn context install -p -m 0644 %{SOURCE1} . %build cp %{SOURCE2} . %install rm -rf %{buildroot} install -d %{buildroot}%{drupaldir}/modules/context cp -pr * %{buildroot}%{drupaldir}/modules/context %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) # Remember to include other documentation text here as well %doc LICENSE.txt %{name}-fedora-README.txt # Remember to exclude all documentation texts from above %exclude %{drupaldir}/modules/%{modname}/LICENSE.txt %exclude %{drupaldir}/modules/%{modname}/%{name}-fedora-README.txt %{drupaldir}/modules/%{modname} %changelog * Wed Aug 31 2011 Scott Dodson - 3.0-0.1.beta1 - Initial Packaging