]> git.pld-linux.org Git - packages/CodeIgniter.git/commitdiff
inline sed, especially with line numbers, is not reliable. patch it
authorElan Ruusamäe <glen@delfi.ee>
Tue, 9 Jun 2015 12:46:52 +0000 (15:46 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Tue, 9 Jun 2015 12:46:52 +0000 (15:46 +0300)
CodeIgniter.spec
pld.patch [new file with mode: 0644]

index dfffabf4853450411aea66d98d4aa5711f42fdb8..0f37b6bfc5ccda9538b24dacd8d24060635c40ab 100644 (file)
@@ -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 (file)
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";
+ /*
+  * --------------------------------------------------------------------
This page took 0.054677 seconds and 4 git commands to generate.