[packages/CodeIgniter] inline sed, especially with line numbers, is not reliable. patch it
glen
glen at pld-linux.org
Tue Jun 9 14:49:10 CEST 2015
commit e854ff3726263b764e56dd3a82c805a3e3f3f5cb
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Jun 9 15:46:52 2015 +0300
inline sed, especially with line numbers, is not reliable. patch it
CodeIgniter.spec | 4 ++--
pld.patch | 21 +++++++++++++++++++++
2 files changed, 23 insertions(+), 2 deletions(-)
---
diff --git a/CodeIgniter.spec b/CodeIgniter.spec
index dfffabf..0f37b6b 100644
--- a/CodeIgniter.spec
+++ b/CodeIgniter.spec
@@ -10,6 +10,7 @@ Source0: http://www.codeigniter.com/download_files/reactor/%{name}_%{version}.zi
# Source0-md5: c7a2980dff2774c97bd38bfbf450d8d5
Source1: INSTALL-PLD.txt
Source2: codeigniter-install
+Patch0: pld.patch
URL: http://codeigniter.com/
BuildRequires: rpm-php-pearprov >= 4.3
BuildRequires: rpmbuild(macros) >= 1.461
@@ -47,8 +48,7 @@ CodeIgniter documentation.
%prep
%setup -q -n %{name}_%{version}
-%{__sed} -i 's,\$application_folder.*=.*,$application_folder = "PLEASE SET TO CORRECT PATH";,' index.php
-%{__sed} -i '59 s,\$system_path.*=.*,$system_path = "%{_datadir}/CodeIgniter/system"\;, ' index.php
+%patch0 -p1
%install
rm -rf $RPM_BUILD_ROOT
diff --git a/pld.patch b/pld.patch
new file mode 100644
index 0000000..2a64889
--- /dev/null
+++ b/pld.patch
@@ -0,0 +1,21 @@
+diff -ur -x .svn -x .git -x .bzr -x CVS CodeIgniter_2.1.2/index.php CodeIgniter_2.1.2.x/index.php
+--- CodeIgniter_2.1.2/index.php 2012-06-30 00:22:35.000000000 +0300
++++ CodeIgniter_2.1.2.x/index.php 2015-06-09 15:44:16.727178586 +0300
+@@ -56,7 +56,7 @@
+ * as this file.
+ *
+ */
+- $system_path = 'system';
++ $system_path = "/usr/share/CodeIgniter/system";
+
+ /*
+ *---------------------------------------------------------------
+@@ -72,7 +72,7 @@
+ * NO TRAILING SLASH!
+ *
+ */
+- $application_folder = 'application';
++ $application_folder = "PLEASE SET TO CORRECT PATH";
+
+ /*
+ * --------------------------------------------------------------------
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/CodeIgniter.git/commitdiff/86a806ced59db04be25fe99f4d8d63b253cb6c99
More information about the pld-cvs-commit
mailing list