diff --git a/.gitignore b/.gitignore index 2574462..a3ba228 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /yourls-1.5.zip /yourls-1.5.1.zip +/YOURLS-1.6.tar.gz diff --git a/sources b/sources index d0cdae5..ba40c50 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9607d8cd3e6efc594f8a3d3f4171bede yourls-1.5.1.zip +fc4444fd1203b8e00db6f332db183682 YOURLS-1.6.tar.gz diff --git a/yourls.change-config-path.patch b/yourls.change-config-path.patch index 0a6cdd4..6724787 100644 --- a/yourls.change-config-path.patch +++ b/yourls.change-config-path.patch @@ -1,18 +1,18 @@ --- includes/load-yourls.php.orig 2011-08-15 18:37:13.291923132 +0200 +++ includes/load-yourls.php 2011-08-15 18:38:04.011434893 +0200 @@ -2,12 +2,9 @@ - // This file initialize everything needed for YOURLS - - // Include settings --if( file_exists( dirname( dirname( __FILE__ ) ) . '/user/config.php' ) ) { -- // config.php in /user/ -- require_once( dirname( dirname( __FILE__ ) ) . '/user/config.php' ); --} elseif ( file_exists( dirname( __FILE__ ) . '/config.php' ) ) { -- // config.php in /includes/ -- require_once( dirname( __FILE__ ) . '/config.php' ); -+if( file_exists('/etc/yourls/config.php') ) { -+ // config.php in /etc/yourls/ -+ require_once( '/etc/yourls/config.php' ); - } else { - // config.php not found :( - die( '

Cannot find config.php.

Please read the readme.html to learn how to install YOURLS

' ); + // This file initialize everything needed for YOURLS + + // Include settings +-if( file_exists( dirname( dirname( __FILE__ ) ) . '/user/config.php' ) ) { +- // config.php in /user/ +- require_once( dirname( dirname( __FILE__ ) ) . '/user/config.php' ); +-} elseif ( file_exists( dirname( __FILE__ ) . '/config.php' ) ) { +- // config.php in /includes/ +- require_once( dirname( __FILE__ ) . '/config.php' ); ++if( file_exists('/etc/yourls/config.php') ) { ++ // config.php in /etc/yourls/ ++ require_once( '/etc/yourls/config.php' ); + } else { + // config.php not found :( + die( '

Cannot find config.php.

Please read the readme.html to learn how to install YOURLS

' ); diff --git a/yourls.spec b/yourls.spec index d1dc370..03657e6 100644 --- a/yourls.spec +++ b/yourls.spec @@ -1,6 +1,6 @@ Name: yourls -Version: 1.5.1 -Release: 4%{?dist} +Version: 1.6 +Release: 1%{?dist} Summary: Your Own URL Shortener Group: Applications/Internet # License scenario: @@ -9,7 +9,10 @@ Group: Applications/Internet # * JQuery files: MIT or GPLv2 License: GPL+ and LGPLv2+ and (MIT or GPLv2) URL: http://yourls.org -Source0: http://%{name}.googlecode.com/files/%{name}-%{version}.zip +# The tarball was pulled from https://github.com/YOURLS/YOURLS/archive/%{version}.tar.gz +# however the url is redirected and the tarball name downloaded is not %{version}.tar.gz +# but YOURLS-%{version}.tar.gz instead +Source0: YOURLS-%{version}.tar.gz Source1: yourls-httpd.conf Patch0: yourls.change-config-path.patch Patch1: yourls.add-fedora-readme.patch @@ -25,15 +28,10 @@ you can pick custom keyword URLs, it comes with its own API. %prep -%setup -q -c %{name}-%{version} +%setup -q -n YOURLS-%{version} %patch0 %patch1 -# Remove DOS line endings -for f in *.txt; do - sed 's/\r//' $f > $f.new && - touch -r $f $f.new && - mv $f.new $f -done + %build @@ -47,8 +45,10 @@ cp -ad ./* ${RPM_BUILD_ROOT}%{_datadir}/%{name} mv ./user/config-sample.php ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/config.php # Remove docs from datadir, to be put in defaultdocdir later -rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/{README.fedora,changelog.txt,license.txt,readme.html,sample-*} +rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/{README.fedora,README.md,CHANGELOG.md,CONTRIBUTING.md,LICENSE.md,readme.html,sample-*} +# Remove Flash files +rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/js/ZeroClipboard.swf %clean rm -rf ${RPM_BUILD_ROOT} @@ -58,14 +58,18 @@ rm -rf ${RPM_BUILD_ROOT} %defattr(-,root,root,-) %config(noreplace) %{_sysconfdir}/%{name}/config.php %config(noreplace) %{_sysconfdir}/httpd/conf.d/yourls.conf -%doc changelog.txt license.txt readme.html sample-public-api.php.txt -%doc sample-public-front-page.php.txt sample-remote-api-call.php.txt sample-robots.txt +%doc README.md CHANGELOG.md CONTRIBUTING.md LICENSE.md +%doc readme.html sample-public-api.txt sample-public-front-page.txt +%doc sample-remote-api-call.txt sample-robots.txt %doc README.fedora %dir %{_sysconfdir}/%{name}/ %{_datadir}/%{name}/ %changelog +* Thu Aug 15 2013 Martin Krizek - 1.5.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild @@ -91,7 +95,7 @@ rm -rf ${RPM_BUILD_ROOT} * Mon Aug 15 2011 Martin Krizek - 1.5-3 - Editing source is now done with patch instead of sed -* Wed Aug 02 2011 Martin Krizek - 1.5-2 +* Wed Aug 03 2011 Martin Krizek - 1.5-2 - Fixed wrong version of license - Made calling sed in prep section more readable