%global drupalver 7 %global modrelease rc4 %{?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 drupaldir %{_datadir}/%{drupal} # Use upstream name as expressed in URL and tarball %global modname admin_menu Name: drupal%{drupalver}-%{modname} Version: 3.0 Release: 0.1.%{modrelease}%{?dist} Summary: Provides a theme-independent administration interface Group: Applications/Publishing License: GPLv2+ URL: http://drupal.org/project/%{modname} Source0: http://ftp.drupal.org/files/projects/%{modname}-%{drupalver}.x-%{version}-%{modrelease}.tar.gz Source1: %{name}-fedora-README.txt Source2: LICENSE.txt BuildArch: noarch Requires: %{drupal} >= 7.0 %description Provides a theme-independent administration interface (aka. "navigation", "back-end"). It's a helper for novice users coming from other CMS, a time-saver for site administrators, and useful for developers and site builders. %prep %setup -qn %{modname} %build cp %{SOURCE1} . cp %{SOURCE2} . %install install -d %{buildroot}%{drupaldir}/modules/%{modname} find . -type f -exec install -m 0644 -D '{}' %{buildroot}%{drupaldir}/modules/%{modname}/'{}' \; %files %defattr(-,root,root,-) %doc LICENSE.txt %{name}-fedora-README.txt %exclude %{drupaldir}/modules/%{modname}/LICENSE.txt %exclude %{drupaldir}/modules/%{modname}/%{name}-fedora-README.txt %{drupaldir}/modules/%{modname} %changelog * Mon Apr 28 2014 Sam Wilson - 3.0-0.1.rc4 - Initial Package