[packages/yourls] new, version 1.7

glen glen at pld-linux.org
Sat Mar 15 23:00:52 CET 2014


commit 4fcc2537a6988c01e75c8467bc3856464caef0d4
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Mar 16 00:00:18 2014 +0200

    new, version 1.7

 apache.conf   | 12 +++++++++
 lighttpd.conf |  3 +++
 yourls.spec   | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 95 insertions(+)
---
diff --git a/yourls.spec b/yourls.spec
new file mode 100644
index 0000000..4ca0a21
--- /dev/null
+++ b/yourls.spec
@@ -0,0 +1,80 @@
+Summary:	YOURLS: Your Own URL Shortener
+Name:		yourls
+Version:	1.7
+Release:	0.1
+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
+URL:		http://yourls.org/
+BuildRequires:	rpmbuild(macros) >= 1.268
+Requires:	webapps
+Requires:	webserver(access)
+Requires:	webserver(alias)
+Requires:	webserver(php)
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define		_webapps	/etc/webapps
+%define		_webapp		%{name}
+%define		_sysconfdir	%{_webapps}/%{_webapp}
+%define		_appdir		%{_datadir}/%{_webapp}
+
+%description
+YOURLS stands for Your Own URL Shortener. It is a small set of PHP
+scripts that will allow you to run your own URL shortening service (a
+la TinyURL or bitly).
+
+Running your own URL shortener is fun, geeky and useful: you own your
+data and don't depend on third party services. It's also a great way
+to add branding to your short URLs, instead of using the same public
+URL shortener everyone uses.
+
+%prep
+%setup -q -n YOURLS-%{version}
+
+mv user/config{-sample,}.php
+
+%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}
+
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
+cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
+cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%triggerin -- apache1 < 1.3.37-3, apache1-base
+%webapp_register apache %{_webapp}
+
+%triggerun -- apache1 < 1.3.37-3, apache1-base
+%webapp_unregister apache %{_webapp}
+
+%triggerin -- apache < 2.2.0, apache-base
+%webapp_register httpd %{_webapp}
+
+%triggerun -- apache < 2.2.0, apache-base
+%webapp_unregister httpd %{_webapp}
+
+%triggerin -- lighttpd
+%webapp_register lighttpd %{_webapp}
+
+%triggerun -- lighttpd
+%webapp_unregister lighttpd %{_webapp}
+
+%files
+%defattr(644,root,root,755)
+%doc README.md CHANGELOG.md CONTRIBUTING.md LICENSE.md
+%dir %attr(750,root,http) %{_sysconfdir}
+%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
+%{_appdir}
diff --git a/apache.conf b/apache.conf
new file mode 100644
index 0000000..dccba57
--- /dev/null
+++ b/apache.conf
@@ -0,0 +1,12 @@
+Alias /yourls /usr/share/yourls
+<Directory /usr/share/yourls>
+	# Apache 2.x
+	<IfModule !mod_authz_core.c>
+		Order allow,deny
+		Allow from all
+	</IfModule>
+	# Apache 2.4
+	<IfModule mod_authz_core.c>
+		Require all granted
+	</IfModule>
+</Directory>
diff --git a/lighttpd.conf b/lighttpd.conf
new file mode 100644
index 0000000..fa0dbf5
--- /dev/null
+++ b/lighttpd.conf
@@ -0,0 +1,3 @@
+alias.url += (
+	"/yourls" => "/usr/share/yourls",
+)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/yourls.git/commitdiff/4fcc2537a6988c01e75c8467bc3856464caef0d4



More information about the pld-cvs-commit mailing list