]> git.pld-linux.org Git - SPECS.git/blob - tighturl.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / tighturl.spec
1 Summary:        TightURL - Tighten up long URLs to make short ones
2 Name:           tighturl
3 Version:        0.1.3.3
4 Release:        0.1
5 License:        GPL
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
12 Requires:       webapps
13 Requires:       webserver(php)
14 BuildArch:      noarch
15 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16
17 %define         _webapps        /etc/webapps
18 %define         _webapp         %{name}
19 %define         _sysconfdir     %{_webapps}/%{_webapp}
20 %define         _appdir         %{_datadir}/%{_webapp}
21
22 %description
23 TightURL is a PHP/MySQL-based Blind Redirection Service.
24
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.
30
31 %prep
32 %setup -q
33
34 cat > apache.conf <<'EOF'
35 Alias /%{name} %{_appdir}
36 <Directory %{_appdir}>
37         Allow from all
38 </Directory>
39 EOF
40
41 cat > lighttpd.conf <<'EOF'
42 alias.url += (
43     "/%{name}" => "%{_appdir}",
44 )
45 EOF
46
47 # locale for glob, altho satisified by rpmmacros already
48 export LC_ALL=C
49 install -d docs
50 mv [A-Z]* docs
51
52 # we have rpm pkg
53 rm -rf bad-behavior
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
58
59 cp -a . $RPM_BUILD_ROOT%{_appdir}
60 rm -rf $RPM_BUILD_ROOT%{_appdir}/docs
61
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
65
66 %triggerin -- apache1 < 1.3.37-3, apache1-base
67 %webapp_register apache %{_webapp}
68
69 %triggerun -- apache1 < 1.3.37-3, apache1-base
70 %webapp_unregister apache %{_webapp}
71
72 %triggerin -- apache < 2.2.0, apache-base
73 %webapp_register httpd %{_webapp}
74
75 %triggerun -- apache < 2.2.0, apache-base
76 %webapp_unregister httpd %{_webapp}
77
78 %triggerin -- lighttpd
79 %webapp_register lighttpd %{_webapp}
80
81 %triggerun -- lighttpd
82 %webapp_unregister lighttpd %{_webapp}
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87 %files
88 %defattr(644,root,root,755)
89 %doc docs/*
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
95 %{_appdir}
This page took 1.47461 seconds and 3 git commands to generate.