[packages/yourls] basic config

glen glen at pld-linux.org
Sat Mar 15 23:33:41 CET 2014


commit 88adff08edeb366f2881e1147d34d4dbab9c3c0e
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat Mar 15 22:10:01 2014 +0000

    basic config

 config.patch | 24 ++++++++++++++++++++++++
 yourls.spec  | 15 ++++++++++++---
 2 files changed, 36 insertions(+), 3 deletions(-)
---
diff --git a/yourls.spec b/yourls.spec
index 4ca0a21..82915df 100644
--- a/yourls.spec
+++ b/yourls.spec
@@ -1,13 +1,14 @@
 Summary:	YOURLS: Your Own URL Shortener
 Name:		yourls
 Version:	1.7
-Release:	0.1
+Release:	0.3
 License:	MIT
 Group:		Applications/WWW
 Source0:	https://github.com/YOURLS/YOURLS/archive/%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	171ea94dc65d1d4f8c7e857a8b650ae1
 Source1:	apache.conf
 Source2:	lighttpd.conf
+Patch0:		config.patch
 URL:		http://yourls.org/
 BuildRequires:	rpmbuild(macros) >= 1.268
 Requires:	webapps
@@ -34,15 +35,23 @@ URL shortener everyone uses.
 
 %prep
 %setup -q -n YOURLS-%{version}
-
 mv user/config{-sample,}.php
 
+%patch0 -p1
+
+# do not obfuscate
+rm user/index.html
+rm user/plugins/index.html
+rm user/languages/index.html
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_sysconfdir}
 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
 
 cp -a . $RPM_BUILD_ROOT%{_appdir}
+mv $RPM_BUILD_ROOT{%{_appdir}/user,%{_sysconfdir}}/config.php
+ln -s %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_appdir}/user
 
 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
@@ -76,5 +85,5 @@ rm -rf $RPM_BUILD_ROOT
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
-#%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
 %{_appdir}
diff --git a/config.patch b/config.patch
new file mode 100644
index 0000000..bb97c0a
--- /dev/null
+++ b/config.patch
@@ -0,0 +1,24 @@
+--- YOURLS-1.7/user/config.php	2014-01-09 22:46:53.000000000 +0200
++++ YOURLS-1.7/user/config.php	2014-03-16 00:02:09.000000000 +0200
+@@ -8,10 +8,10 @@
+  */
+ 
+ /** MySQL database username */
+-define( 'YOURLS_DB_USER', 'your db user name' );
++define( 'YOURLS_DB_USER', 'mysql' );
+ 
+ /** MySQL database password */
+-define( 'YOURLS_DB_PASS', 'your db password' );
++define( 'YOURLS_DB_PASS', '' );
+ 
+ /** The name of the database for YOURLS */
+ define( 'YOURLS_DB_NAME', 'yourls' );
+@@ -29,7 +29,7 @@
+ 
+ /** YOURLS installation URL -- all lowercase and with no trailing slash.
+  ** If you define it to "http://site.com", don't use "http://www.site.com" in your browser (and vice-versa) */
+-define( 'YOURLS_SITE', 'http://site.com' );
++define( 'YOURLS_SITE', '/yourls' );
+ 
+ /** Timezone GMT offset */
+ define( 'YOURLS_HOURS_OFFSET', 0 ); 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/yourls.git/commitdiff/88adff08edeb366f2881e1147d34d4dbab9c3c0e



More information about the pld-cvs-commit mailing list