]> git.pld-linux.org Git - packages/php-AutoIndex.git/blame - php-AutoIndex.spec
- blocker for webapps migrate
[packages/php-AutoIndex.git] / php-AutoIndex.spec
CommitLineData
5f8b5e13 1%define _appname AutoIndex
20f26bac 2Summary: A Website Directory Indexer and File Manager (AutoIndex PHP Script)
19529b91 3Summary(pl.UTF-8): Webowy indeks zawartości katagów i zarządca plików (AutoIndex PHP Script)
5f8b5e13 4Name: php-AutoIndex
edfa20f9 5Version: 2.2.0
91cef6d7 6Release: 0.2
20f26bac 7License: GPL
8Group: Applications/Networking
5f8b5e13 9Source0: http://dl.sourceforge.net/autoindex/%{_appname}-%{version}.tar.gz
edfa20f9 10# Source0-md5: 1b3e545baa79218d261a3f64389b38f3
5f8b5e13
ER
11Source1: %{name}.php
12Patch0: %{name}-config.patch
2fbef3c5 13URL: http://autoindex.sourceforge.net/
20f26bac 14BuildRequires: rpmbuild(macros) >= 1.221
8852fc77 15BuildRequires: migrate-to-webapps
91cef6d7 16Requires: php-common >= 4:5.0.0
5c18c1ae 17Requires: webserver = apache
91cef6d7 18Requires: webserver(php)
5f8b5e13
ER
19Obsoletes: AutoIndex
20Obsoletes: php4-AutoIndex
5c18c1ae 21Conflicts: apache1 < 1.3.33-2
20f26bac 22BuildArch: noarch
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
5f8b5e13
ER
25%define _sysconfdir /etc/%{_appname}
26%define _appdir %{_datadir}/%{_appname}
27
20f26bac 28%description
29A Website Directory Indexer and File Manager (AutoIndex PHP Script).
30
c85337f6
JR
31%description -l pl.UTF-8
32Webowy indeks zawartości katalogów i zarządca plików (AutoIndex PHP
20f26bac 33Script).
34
20f26bac 35%prep
5f8b5e13
ER
36%setup -q -n %{_appname}
37%patch0 -p1
38rm -f license.html # GPL
20f26bac 39
40%install
41rm -rf $RPM_BUILD_ROOT
42install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}
43
5f8b5e13
ER
44cp -a *.php classes index_icons languages templates $RPM_BUILD_ROOT%{_appdir}
45cp -a hidden_files $RPM_BUILD_ROOT%{_sysconfdir}
46
47cat <<'EOF'> $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
48Alias /AutoIndex %{_appdir}
49
50<Directory %{_appdir}>
51 <IfModule mod_access.c>
52 order allow,deny
53 allow from all
54 </IfModule>
55</Directory>
56# vim: filetype=apache ts=4 sw=4 et
57EOF
20f26bac 58
5f8b5e13 59install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{_appname}.conf.php
20f26bac 60
61%clean
62rm -rf $RPM_BUILD_ROOT
63
5f8b5e13
ER
64%post
65if [ "$1" = 1 ]; then
66%banner -e %{name} <<EOF
67- To use AutoIndex in your website, call it from php script:
68 require '%{_appdir}/index.php';
69 and copy (or symlink) %{_sysconfdir}/%{_appname}.conf.php to the
70 script dir.
71
72- For opening config file generation screen, open URL:
73 http://yoursite.example.org/AutoIndex/
74
75EOF
76fi
77
663740f7 78%triggerin -- apache1 < 1.3.37-3, apache1-base
5f8b5e13 79%apache_config_install -v 1 -c %{_sysconfdir}/apache.conf
20f26bac 80
663740f7 81%triggerun -- apache1 < 1.3.37-3, apache1-base
20f26bac 82%apache_config_uninstall -v 1
83
84%triggerin -- apache >= 2.0.0
5f8b5e13 85%apache_config_install -v 2 -c %{_sysconfdir}/apache.conf
20f26bac 86
87%triggerun -- apache >= 2.0.0
88%apache_config_uninstall -v 2
89
90%files
91%defattr(644,root,root,755)
5f8b5e13
ER
92%doc *.html
93%attr(751,root,http) %dir %{_sysconfdir}
94%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
95%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php
96%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hidden_files
20f26bac 97%{_appdir}
This page took 0.101236 seconds and 4 git commands to generate.