From e854ff3726263b764e56dd3a82c805a3e3f3f5cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Tue, 9 Jun 2015 15:46:52 +0300 Subject: [PATCH] inline sed, especially with line numbers, is not reliable. patch it --- CodeIgniter.spec | 4 ++-- pld.patch | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 pld.patch 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"; + + /* + * -------------------------------------------------------------------- -- 2.43.0