]> git.pld-linux.org Git - packages/lightirc.git/blob - lightirc.spec
6616a2ec111ab047bfe2e7471ac8002136b43c9e
[packages/lightirc.git] / lightirc.spec
1 Summary:        Flash IRC Chat
2 Name:           lightirc
3 Version:        0.9.9.3
4 Release:        1
5 License:        free (but not open)
6 Group:          Applications/WWW
7 Source0:        http://www.lightirc.com/release/lightIRC_%{version}.zip
8 # Source0-md5:  5d67f5d2aab9076e685af85b63e39ef7
9 URL:            http://www.lightirc.com/
10 BuildRequires:  rpmbuild(macros) >= 1.553
11 BuildRequires:  unzip
12 Requires:       js-swfobject
13 Requires:       webapps
14 Requires:       webserver(alias)
15 BuildArch:      noarch
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %define         _webapps        /etc/webapps
19 %define         _webapp         %{name}
20 %define         _sysconfdir     %{_webapps}/%{_webapp}
21 %define         _appdir         %{_datadir}/%{_webapp}
22
23 %description
24 lightIRC is a free Flash IRC client that includes all well known IRC
25 features. It supports stylesheets for its own skins, has support for
26 multiple languages, and can be used with every IRCd.
27
28 %prep
29 %setup -qc
30
31 mv lightIRC/*.txt .
32 rm lightIRC/swfobject.js
33 %undos lightIRC/*.html
34
35 cat > apache.conf <<'EOF'
36 Alias /%{name}/swfobject.js %{_datadir}/swfobject/swfobject.js
37 Alias /%{name} %{_appdir}
38 <Directory %{_appdir}>
39         Allow from all
40 </Directory>
41 EOF
42
43 cat > lighttpd.conf <<'EOF'
44 alias.url += (
45     "/%{name}/swfobject.js" => "%{_datadir}/swfobject/swfobject.js",
46     "/%{name}" => "%{_appdir}",
47 )
48 EOF
49
50 %install
51 rm -rf $RPM_BUILD_ROOT
52 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
53 cp -a lightIRC/* $RPM_BUILD_ROOT%{_appdir}
54
55 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
56 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
57 cp -a lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
58
59 %clean
60 rm -rf $RPM_BUILD_ROOT
61
62 %triggerin -- apache1 < 1.3.37-3, apache1-base
63 %webapp_register apache %{_webapp}
64
65 %triggerun -- apache1 < 1.3.37-3, apache1-base
66 %webapp_unregister apache %{_webapp}
67
68 %triggerin -- apache < 2.2.0, apache-base
69 %webapp_register httpd %{_webapp}
70
71 %triggerun -- apache < 2.2.0, apache-base
72 %webapp_unregister httpd %{_webapp}
73
74 %triggerin -- lighttpd
75 %webapp_register lighttpd %{_webapp}
76
77 %triggerun -- lighttpd
78 %webapp_unregister lighttpd %{_webapp}
79
80 %files
81 %defattr(644,root,root,755)
82 %doc readme.txt changelog.txt
83 %dir %attr(750,root,http) %{_sysconfdir}
84 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
85 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
86 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
87 %dir %{_appdir}
88 %{_appdir}/*.swf
89 %{_appdir}/styles
90 %config(noreplace) %verify(not md5 mtime size) %{_appdir}/index.html
This page took 0.078368 seconds and 2 git commands to generate.