%global drupalver 6 %{?rhel: %{expand: %%global drupal drupal%%{drupalver}}} %if 0%{?fedora} >= 15 %global drupal drupal%{drupalver} %endif %{!?drupal: %{expand: %%global drupal drupal}} # e.g. "/usr/share/drupal6" %global drupalbase %{_datadir}/%{drupal} %global drupal_sites_all %{drupalbase}/sites/all %global drupal_modules %{drupal_sites_all}/modules # Use upstream name as expressed in URL and tarball %global modname views_bonus Name: drupal%{drupalver}-%{modname} Version: 1.1 Release: 4%{?dist} Summary: Views Bonus Pack module for Drupal6 Group: Applications/Publishing License: GPLv2 URL: http://drupal.org/project/%{modname} Source0: http://ftp.drupal.org/files/projects/%{modname}-%{drupalver}.x-%{version}.tar.gz Source1: LICENSE.txt BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: drupal6, drupal6-views %description This group of modules is sort of a recipe module that makes things easier by showing how to integrate some other modules as well as providing miscellaneous features that aren't distributed by Views itself. %prep %setup -qn %{modname} %build cp %{SOURCE1} . %install rm -rf %{buildroot} install -d %{buildroot}%{drupal_modules}/%{modname} find . -type f -exec install -m 0644 -D '{}' %{buildroot}%{drupal_modules}/%{modname}/'{}' \; %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc LICENSE.txt %doc %{drupal_modules}/%{modname}/README.txt %exclude %{drupal_modules}/%{modname}/README.txt %exclude %{drupal_modules}/%{modname}/LICENSE.txt %{drupal_modules}/%{modname} %changelog * Mon Apr 23 2012 Anderson Silva <ansilva@redhat.com> - 1.1-4 - Exclude README.txt * Fri Apr 20 2012 Anderson Silva <ansilva@redhat.com> - 1.1-3 - Add README.txt to doc section * Tue Apr 17 2012 Anderson Silva <ansilva@redhat.com> - 1.1-2 - Update spec to comply with Fedora guidelines * Mon Mar 19 2012 Anderson Silva <ansilva@redhat.com> - 1.1-1 - Initial rpm package