%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 comment_bonus_api Name: drupal%{drupalver}-%{modname} Version: 1.0 Release: 4%{?dist} Summary: Comment Bonus API 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: %{name}-fedora-README.txt BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: drupal6 %description This module enhances the standard Drupal comment module's API by providing hooks in comment_render(), which allow you to manipulate comment threads in your own way. %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 %{name}-fedora-README.txt %doc %{drupal_modules}/%{modname}/LICENSE.txt %exclude %{drupal_modules}/%{modname}/%{name}-fedora-README.txt %exclude %{drupal_modules}/%{modname}/LICENSE.txt %{drupal_modules}/%{modname} %changelog * Wed Jun 27 2012 Anderson Silva - 1.0-4 - List LICENSE.txt under doc files section * Mon Jun 25 2012 Anderson Silva - 1.0-3 - Fixing longer than 80 characters description * Mon Jun 4 2012 Anderson Silva - 1.0-2 - Update description * Wed Mar 21 2012 Anderson Silva - 1.0-1 - Upstream Update * Fri Mar 9 2012 Anderson Silva - 1.0.rc1-2 - Update spec to comply with Fedora Packaging * Mon Mar 5 2012 Anderson Silva - 1.0.rc1-1 - Initial rpm package