Blob Blame History Raw
%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 drupaldir %{_datadir}/%{drupal}
# Use upstream name as expressed in URL and tarball
%global modname backup_migrate

Name:    drupal%{drupalver}-%{modname}
Version: 2.6
Release: 1%{?dist}
Summary: Database backup, restore, and migrate module for Drupal %{drupalver}
Group:   Applications/Publishing
License: GPLv2+ and BSD
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:  %{drupal} >= 6.0

%description
Backup and Migrate simplifies the task of backing up and restoring
your Drupal database or copying your database from one Drupal site to
another. It supports gzip, bzip and zip compression as well as
automatic scheduled backups.

With Backup and Migrate you can dump some or all of your database
tables to a file download or save to a file on the server, and to
restore from an uploaded or previously saved database dump. You can
chose which tables and what data to backup and cache data is excluded
by default.

%prep
%setup -qn %{modname}

%build
cp %{SOURCE1} .

%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,-)
%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
* Tue May 15 2012 Paul W. Frields <stickster@gmail.com> - 2.6-1
- Update to upstream 2.6

* Tue Mar 13 2012 Paul W. Frields <stickster@gmail.com> - 2.5-1
- Update to upstream 2.5

* 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

* Sat Apr  2 2011 Paul W. Frields <stickster@gmail.com> - 2.4-1
- Initial RPM package