1 Summary: TightURL - Tighten up long URLs to make short ones
6 Group: Applications/WWW
7 Source0: http://dl.sourceforge.net/project/tighturl/tighturl/%{version}%20beta/%{name}-%{version}.tar.gz
8 # Source0-md5: e16b2a2aa96583c869e4f1af042170d3
9 URL: http://www.tighturl.com/project/
10 BuildRequires: rpmbuild(macros) >= 1.268
11 Requires: php-bad-behavior
13 Requires: webserver(php)
15 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17 %define _webapps /etc/webapps
18 %define _webapp %{name}
19 %define _sysconfdir %{_webapps}/%{_webapp}
20 %define _appdir %{_datadir}/%{_webapp}
23 TightURL is a PHP/MySQL-based Blind Redirection Service.
25 The primary purpose of TightURL is to allow people to shorten very
26 long URLs that would otherwise wrap when pasted into e-mail messages.
27 URL wrapping in e-mail messages usually results in broken links. The
28 e-mail program will convert everything up to the end of the first line
29 into a hyperlink, and the rest of the URL gets ignored.
34 cat > apache.conf <<'EOF'
35 Alias /%{name} %{_appdir}
36 <Directory %{_appdir}>
41 cat > lighttpd.conf <<'EOF'
43 "/%{name}" => "%{_appdir}",
47 # locale for glob, altho satisified by rpmmacros already
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
59 cp -a . $RPM_BUILD_ROOT%{_appdir}
60 rm -rf $RPM_BUILD_ROOT%{_appdir}/docs
62 mv $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}/apache.conf
63 cp -a $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
64 mv $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}/lighttpd.conf
66 %triggerin -- apache1 < 1.3.37-3, apache1-base
67 %webapp_register apache %{_webapp}
69 %triggerun -- apache1 < 1.3.37-3, apache1-base
70 %webapp_unregister apache %{_webapp}
72 %triggerin -- apache < 2.2.0, apache-base
73 %webapp_register httpd %{_webapp}
75 %triggerun -- apache < 2.2.0, apache-base
76 %webapp_unregister httpd %{_webapp}
78 %triggerin -- lighttpd
79 %webapp_register lighttpd %{_webapp}
81 %triggerun -- lighttpd
82 %webapp_unregister lighttpd %{_webapp}
85 rm -rf $RPM_BUILD_ROOT
88 %defattr(644,root,root,755)
90 %dir %attr(750,root,http) %{_sysconfdir}
91 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
92 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
93 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
94 #%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php