%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 votingapi Name: drupal%{drupalver}-%{modname} Version: 2.11 Release: 0%{?dist} Summary: Drupal Standardized API and schema for storing, retrieving, and tabulating votes 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 Source2: %{name}-LICENSE.txt BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: %{drupal} >= 7.0 %description VotingAPI helps developers who want to use a standardized API and schema for storing, retrieving, and tabulating votes for Drupal content. Among other things, it supports: Rating of any content (comments, nodes, users, fish, whatever) Multi-criteria voting (rate a game based on video, audio, and replayability) Automatic tabulation of results (with support for different voting styles, like 'percentage' and '+1/-1') Efficient caching of results (sorting and filtering doesn't require any recalculation) Hooks for additional vote calculations Note that this module does NOT directly expose any voting mechanisms to end users. It's a framework designed to make life easier for other developers, and to standardize voting data for consumption by other modules (like Views). For some examples of simple voting systems based on VotingAPI, check Is Useful, Fivestar, and Plus1. %prep %setup -qn %{modname} %build cp %{SOURCE1} . cp %{SOURCE2} ./LICENSE.txt %install rm -rf %{buildroot} install -d %{buildroot}%{drupaldir}/modules/%{modname} find . -type f -exec install -m 0644 -D '{}' %{buildroot}%{drupaldir}/modules/%{modname}/'{}' \; %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 * Sat Mar 23 2013 Scott Dodson <sdodson@redhat.com> - 2.11-0 - Update to 2.11 * Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.10-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sat Nov 10 2012 Peter Borsa <peter.borsa@gmail.com> - 2.10-1 - Update to 2.10 * Fri Nov 2 2012 Peter Borsa <peter.borsa@gmail.com> - 2.9-1 - Update to 2.9 * Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Fri Mar 2 2012 Scott Dodson <sdodson@redhat.com> - 2.6-1 - Update to 2.6 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Wed Sep 7 2011 Scott Dodson <sdodson@redhat.com> - 2.4-1 - Initial Drupal 7 package