summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-drush-drush.spec103
1 files changed, 70 insertions, 33 deletions
diff --git a/php-drush-drush.spec b/php-drush-drush.spec
index 189d444..642b109 100644
--- a/php-drush-drush.spec
+++ b/php-drush-drush.spec
@@ -11,19 +11,23 @@
%global pear_channel pear.drush.org
%global pear_name drush
-# Tests are only run with rpmbuild --with tests
-# Lot of failures, need investigation
+# PEAR version adds an extra digit
+%global pear_version %{version}.0
+
+# Tests are only run with rpmbuild "--with tests"
+# Tests require download access and a running MariaDB/MySQL server with root
+# user and no password
%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
Name: php-drush-%{pear_name}
-Version: 5.9.0
+Version: 6.2.0
Release: 1%{?dist}
Summary: Command line shell and Unix scripting interface for Drupal
Group: Development/Libraries
License: GPLv2+
URL: http://www.drush.org
-Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz
+Source0: http://%{pear_channel}/get/%{pear_name}-%{pear_version}.tgz
Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version}
Obsoletes: drupal6-drush < %{version}-%{release}
@@ -35,16 +39,17 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php-pear(PEAR)
BuildRequires: php-channel(%{pear_channel})
-BuildRequires: php-pear(Console_Table)
BuildRequires: help2man
%if %{with_tests}
BuildRequires: php-pear(pear.phpunit.de/PHPUnit) >= 3.5
+BuildRequires: php-pear(Console_Table)
%endif
-Requires: php-cli >= 5.2
+Requires: php(language) >= 5.3.0
Requires: php-pear(PEAR)
Requires: php-channel(%{pear_channel})
Requires: php-pear(Console_Table)
+Requires: php-symfony-yaml
Requires: git >= 1.7
Requires(post): %{__pear}
Requires(postun): %{__pear}
@@ -53,14 +58,13 @@ Requires: php-ctype
Requires: php-date
Requires: php-dom
Requires: php-fileinfo
+Requires: php-filter
Requires: php-hash
Requires: php-iconv
Requires: php-json
-Requires: php-mysql
-Requires: php-mysqli
+Requires: php-mbstring
Requires: php-pcre
Requires: php-pdo
-Requires: php-pgsql
Requires: php-posix
Requires: php-reflection
Requires: php-simplexml
@@ -78,36 +82,52 @@ and DB migrations, and misc utilities like run cron or clear cache.
Works with Drupal 6, Drupal 7, and usually Drupal 8.
+NOTE: You must manually install your required database driver
+ (ex: php-mysql, php-mysqli, php-pgsql)
+
%prep
%setup -q -c
+# Remove .travis.yml and .gitignore files from package.xml
+# *** Upstream issue: http://drupal.org/node/1772518
+sed -e '/.travis.yml/d' \
+ -e '/.gitignore/d' \
+ -i package.xml
+
+# Remove bundled Symfony YAML
+# *** Upstream issue: ...
+sed '/name="lib\/Yaml/d' \
+ -i package.xml
+# Update location and remove PEAR checksum
+sed -e "s#\$path\s*=\s*.*#\$path = '%{pear_phpdir}/Symfony/Component/Yaml';#" \
+ -e '/DRUSH_YAML_VERSION/d' \
+ -i %{pear_name}-%{pear_version}/commands/core/outputformat/yaml.inc
+sed '/commands\/core\/outputformat\/yaml.inc/s/md5sum="[^"]*"\s*//' \
+ -i package.xml
+
# Update package.xml for files identified with role="php"
# instead of role="test":
# - tests/
-# NOTE: Ran before role="doc" update because role="doc" update will
-# overwrite some of these test roles (specifically tests/*.txt)
# *** Upstream issue: http://drupal.org/node/1643676
sed '/name="tests\//s/role="php"/role="test"/' \
-i package.xml
# Update package.xml for files identified with role="php"
# instead of role="doc":
+# - *.md
# - *.txt
+# - composer.json
# - docs/
# - examples/
# *** Upstream issue: http://drupal.org/node/1643660
-sed -e '/name="[^"]*\.txt"/s/role="php"/role="doc"/' \
+sed -e '/name="[^"]*\.md"/s/role="[^"]*"/role="doc"/' \
+ -e '/name="[^"]*\.txt"/s/role="[^"]*"/role="doc"/' \
+ -e '/name="composer.json/s/role="php"/role="doc"/' \
-e '/name="docs\//s/role="php"/role="doc"/' \
-e '/name="examples\//s/role="php"/role="doc"/' \
-i package.xml
-# Remove .travis.yml and .gitignore files from package.xml
-# *** Upstream issue: http://drupal.org/node/1772518
-sed -e '/.travis.yml/d' \
- -e '/.gitignore/d' \
- -i package.xml
-
# Remove drush.bat
# *** Upstream issue: http://drupal.org/node/1704986
sed -e '/<file.*name="drush.bat"/,/<\/file>/d' \
@@ -116,42 +136,48 @@ sed -e '/<file.*name="drush.bat"/,/<\/file>/d' \
# Fix rpmlint "W: wrong-file-end-of-line-encoding
# /usr/share/doc/pear/drush/examples/sandwich.txt"
-sed 's/\r//' -i %{pear_name}-%{version}/examples/sandwich.txt
+sed 's/\r//' -i %{pear_name}-%{pear_version}/examples/sandwich.txt
sed '/examples\/sandwich.txt/s/md5sum="[^"]*"//' -i package.xml
# package.xml is version 2.0
-mv package.xml %{pear_name}-%{version}/%{name}.xml
+mv package.xml %{pear_name}-%{pear_version}/%{name}.xml
%build
# Build man page
-cd %{pear_name}-%{version}
-sed -e 's#@pear_directory@/drush#`dirname -- "$0"`#' \
- -e 's#@php_bin@#%{_bindir}/php#' \
- drush > drush-help2man
-chmod +x drush-help2man
-help2man --no-info ./drush-help2man > drush.1
+#cd %%{pear_name}-%%{pear_version}
+#sed -e 's#@pear_directory@/drush#`dirname -- "$0"`#' \
+# -e 's#@php_bin@#%%{_bindir}/php#' \
+# drush > drush-help2man
+#chmod +x drush-help2man
+#help2man --no-info ./drush-help2man > drush.1
+#sed -e 's/drush-help2man/drush/g' \
+# -e 's/DRUSH-HELP2MAN/DRUSH/g' \
+# -i drush.1
%install
-cd %{pear_name}-%{version}
+cd %{pear_name}-%{pear_version}
%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
# Clean up unnecessary files
rm -rf %{buildroot}%{pear_metadir}/.??*
# Fix some file permissions
-chmod a+x %{buildroot}%{pear_phpdir}/%{pear_name}/drush.php
-chmod a+x %{buildroot}%{pear_phpdir}/%{pear_name}/drush.complete.sh
-chmod a+x %{buildroot}%{pear_testdir}/%{pear_name}/tests/runner.php
+#chmod a+x %%{buildroot}%%{pear_phpdir}/%%{pear_name}/drush.php
+#chmod a+x %%{buildroot}%%{pear_phpdir}/%%{pear_name}/drush.complete.sh
+#chmod a+x %%{buildroot}%%{pear_testdir}/%%{pear_name}/tests/runner.php
# Install XML package description
mkdir -p %{buildroot}%{pear_xmldir}
install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
# Install man page
-mkdir -p %{buildroot}%{_mandir}/man1
-cp -p drush.1 %{buildroot}%{_mandir}/man1/
+#mkdir -p %%{buildroot}%%{_mandir}/man1
+#cp -p drush.1 %%{buildroot}%%{_mandir}/man1/
+
+# Create lib directory
+mkdir -pm 0755 %{buildroot}%{pear_phpdir}/%{pear_name}/lib
%check
@@ -178,7 +204,7 @@ fi
%files
%defattr(-,root,root,-)
%doc %{pear_docdir}/%{pear_name}
-%doc %{_mandir}/man1/drush.1*
+#%doc %%{_mandir}/man1/drush.1*
%{pear_xmldir}/%{name}.xml
%{pear_phpdir}/%{pear_name}
%{pear_testdir}/%{pear_name}
@@ -186,6 +212,17 @@ fi
%changelog
+* Thu Dec 12 2013 Remi Collet <remi@fedoraproject.org> 6.2.0-1
+- backport 6.2.0 for remi repo.
+
+* Mon Dec 09 2013 Shawn Iwinski <shawn.iwinski@gmail.com> 6.2.0-1
+- Updated to 6.2.0 (BZ 997843, 1016260)
+- Fixed drush bin as regualr user (BZ 1013501)
+- PHP minimum version 5.2 => 5.3.0
+- Added the following requires: php-symfony-yaml, php-filter, php-mbstring
+- Removed the following requires: php-mysql, php-mysqli, php-pgsql
+- Removed man page (for now) as it was causing koji build errors
+
* Wed May 8 2013 Remi Collet <remi@fedoraproject.org> 5.9.0-1
- backport 5.9.0 for remi repo.