Name: yourls Version: 1.5 Release: 4%{?dist} Summary: Your Own URL Shortener Group: Applications/Internet # License scenario: # * yourls files: GPL+ # * GeoIP files: LGPLv2+ # * 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 Source1: yourls-httpd.conf Patch0: yourls.change-config-path.patch Requires: php >= 4.3.0, mysql >= 4.1.0, httpd, php-mysql BuildArch: noarch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXX) %description YOURLS is a small set of PHP scripts that will allow you to run your own URL shortening service (a la TinyURL). You can make it private or public, you can pick custom keyword URLs, it comes with its own API. %prep %setup -q -c %{name}-%{version} %patch0 # 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 %install rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name} mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name} install -m 0644 -D -p %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d/yourls.conf cp -ad ./* ${RPM_BUILD_ROOT}%{_datadir}/%{name} mv ./includes/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}/{changelog.txt,readme.html,sample-*} %clean rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root,-) %config(noreplace) %{_sysconfdir}/%{name}/config.php %config(noreplace) %{_sysconfdir}/httpd/conf.d/yourls.conf %doc changelog.txt readme.html sample-public-api.php.txt %doc sample-public-front-page.php.txt sample-remote-api-call.php.txt %dir %{_sysconfdir}/%{name}/ %{_datadir}/%{name}/ %changelog * Tue Aug 23 2011 Martin Krizek - 1.5-4 - Fixed license - Fixed DOC line endings in the doc files * 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 - Fixed wrong version of license - Made calling sed in prep section more readable * Wed Jul 27 2011 Martin Krizek - 1.5-1 - Initial packaging