[drupal6-imagecache] Spec cleanup

Shawn Iwinski siwinski at fedoraproject.org
Sun Jan 26 19:03:29 UTC 2014


commit 11460b3805bb30eeea112e77a060a08edf9ec1b0
Author: Shawn Iwinski <shawn.iwinski at gmail.com>
Date:   Sun Jan 26 14:03:40 2014 -0500

    Spec cleanup

 drupal6-imagecache-RPM-README.txt    |    5 ++
 drupal6-imagecache-fedora-README.txt |    6 --
 drupal6-imagecache.spec              |   84 ++++++++++++++++++++--------------
 3 files changed, 55 insertions(+), 40 deletions(-)
---
diff --git a/drupal6-imagecache-RPM-README.txt b/drupal6-imagecache-RPM-README.txt
new file mode 100644
index 0000000..a098b41
--- /dev/null
+++ b/drupal6-imagecache-RPM-README.txt
@@ -0,0 +1,5 @@
+After installation, you must enable this module from the Drupal administration
+page.
+
+If upgrading this module separately from the core Drupal package, be sure to
+run the http://hostname/drupal6/upgrade.php script after this RPM is upgraded.
diff --git a/drupal6-imagecache.spec b/drupal6-imagecache.spec
index bd35afc..5573dc4 100644
--- a/drupal6-imagecache.spec
+++ b/drupal6-imagecache.spec
@@ -1,57 +1,73 @@
-%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             imagecache
-%global upstream_version    2.0-rc1
-
-Name:    drupal%{drupalver}-%{modname}
-Version: 2.0
-Release: 5.rc1%{?dist}
-Summary: Image Cache Module for Drupal6
-Group:   Applications/Publishing
-License: GPLv2
-URL:     http://drupal.org/project/%{modname}
-Source0: http://ftp.drupal.org/files/projects/%{modname}-%{drupalver}.x-%{upstream_version}.tar.gz
-Source1: %{name}-fedora-README.txt
+%{!?drupal6: %global drupal6 %{_datadir}/drupal6}
+%{!?drupal6_modules: %global drupal6_modules %{drupal6}/sites/all/modules}
+
+%global module      imagecache
+%global pre_release rc1
+
+Name:      drupal6-%{module}
+Version:   2.0
+Release:   6.%{pre_release}%{?dist}
+Summary:   Dynamic image manipulator and cache
+
+Group:     Applications/Publishing
+License:   GPLv2
+URL:       http://drupal.org/project/%{module}
+Source0:   http://ftp.drupal.org/files/projects/%{module}-6.x-%{version}-%{pre_release}.tar.gz
+Source1:   %{name}-RPM-README.txt
+
 BuildArch: noarch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires:  drupal6, drupal6-imageapi, php-date, php-pcre
+
+Requires:  drupal6
+Requires:  drupal6(imageapi)
+# phpcompatinfo (computed from version 2.0-rc1)
+Requires:  php-date
+Requires:  php-pcre
+
+Provides:  drupal6(%{module}) = %{version}
+Provides:  drupal6(%{module}_ui) = %{version}
 
 %description
-ImageCache allows you to setup presets for image processing.
+ImageCache allows you to setup presets for image processing. If an ImageCache
+derivative doesn't exist the web server's rewrite rules will pass the request
+to Drupal which in turn hands it off to ImageCache to dynamically generate the
+file. ImageCache allows you to setup presets for image processing.
+
+This package provides the following Drupal modules:
+* %{module}
+* %{module}_ui
+
 
 %prep
-%setup -qn %{modname}
+%setup -qn %{module}
+cp -p %{SOURCE1} .
+
 
 %build
-cp %{SOURCE1} .
+# Empty build section, nothing required
 
 
 %install
 rm -rf %{buildroot}
-install -p -d %{buildroot}%{drupal_modules}/%{modname}
-find . -type f -exec install -m 0644 -D '{}' %{buildroot}%{drupal_modules}/%{modname}/'{}' \;
+mkdir -pm 0755 %{buildroot}%{drupal6_modules}/%{module}
+cp -pr * %{buildroot}%{drupal6_modules}/%{module}/
+
 
 %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}
+%doc *.txt
+%{drupal6_modules}/%{module}
+%exclude %{drupal6_modules}/%{module}/*.txt
+
 
 %changelog
+* Sun Jan 26 2014 Shawn Iwinski <shawn.iwinski at gmail.com> - 2.0-6.rc1
+- Spec cleanup
+
 * Fri Mar 22 2013 Anderson Silva <ansilva at redhat.com> - 2.0-5.rc1
 - Add LICENSE.txt
 - Add php-date, php-pcre requirements


More information about the scm-commits mailing list