%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 field_permissions %global alphabeta -beta2 Name: %{drupal}-%{modname} Version: 1.0 Release: 0.2.beta2%{?dist} Summary: A replacement for the Content Permissions module shipped with CCK Group: Applications/Publishing License: GPLv2+ URL: http://drupal.org/project/%{modname} Source0: http://ftp.drupal.org/files/projects/%{modname}-7.x-%{version}%{alphabeta}.tar.gz Source1: %{name}-fedora-README.txt Source2: %{name}-LICENSE.txt BuildArch: noarch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Requires: drupal7 %description The Field Permissions module is a drop-in replacement for the Content Permissions module shipped with CCK. It allows site administrators to set field-level permissions to edit or view CCK fields in any node, and optionally (new feature compared to Content Permissions module), edit field during node creation, and edit or view permissions for nodes owned by the current user. Permissions for each field are not created by default. Instead, administrators can enable these permissions explicitly for the fields where this feature is needed. %prep %setup -qn %{modname} install -p -m 0644 %{SOURCE1} . %build cp %{SOURCE2} ./LICENSE.txt %install rm -rf %{buildroot} install -d %{buildroot}%{drupaldir}/modules/%{modname} cp -pr * %{buildroot}%{drupaldir}/modules/%{modname} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc LICENSE.txt README.txt %{name}-fedora-README.txt %{drupaldir}/modules/%{modname} %changelog * Mon Feb 06 2012 Scott Dodson <sdodson@redhat.com> - 1.0-0.2.beta2 - Update to 1.0-beta2 BZ785686 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-0.2.beta1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Tue Dec 20 2011 Scott Dodson <sdodson@redhat.com> - 1.0-0.2.beta1 - Update to 1.0-beta1 - specfile cleanup * Fri Oct 28 2011 Scott Dodson <sdodson@redhat.com> - 1.0-0.1.alpha1 - Initial Packaging