Sophie

Sophie

distrib > Mandriva > 2007.1 > x86_64 > by-pkgid > 4cdfddf56658cbf6d3490b3141218e60 > files > 3

phpbb-3.0-0.B5.1mdv2007.1.src.rpm

%define major   3
%define Name    phpBB

Summary:        Open Source bulletin board package
Name:           phpbb
Version:        3.0
Release:        %mkrel 0.B5.1
Epoch:          0
License:        GPL
Group:          System/Servers
URL:            http://www.phpbb.com/
Source0:        http://ovh.dl.sourceforge.net/phpbb/phpBB-3.0.B5.tar.bz2
Source1:        %{name}-favicon.ico
Requires(post): rpm-helper
Requires(postun): rpm-helper
Provides:       %{Name} = %{epoch}:%{version}-%{release}
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

%description
phpBB is a high-powered, fully-scalable, and highly-customizable
Open Source bulletin board package. phpBB has a user-friendly
interface, a simple and straightforward administration panel, and a
helpful FAQ. Based on the powerful PHP server language and your
choice of MySQL, MS-SQL, PostgreSQL or Access/ODBC database servers,
phpBB is the ideal free community solution for all web sites.

%prep
%setup -q -n phpBB%{major}
%{_bindir}/find -name '.htaccess' -o -name '.#*' | %{_bindir}/xargs -t %{__rm} -rf

%install
%{__rm} -rf %{buildroot}

%{__mkdir_p} %{buildroot}%{_datadir}/%{name}
%{__cp} -a * %{buildroot}%{_datadir}/%{name}
%{__mkdir_p} %{buildroot}%{_var}/lib/%{name}

%{__cp} -a %{buildroot}%{_datadir}/%{name}/images/avatars %{buildroot}%{_var}/lib/%{name}/avatars
%{__rm} -r %{buildroot}%{_datadir}/%{name}/images/avatars

%{__cp} -a %{buildroot}%{_datadir}/%{name}/cache %{buildroot}%{_var}/lib/%{name}/cache
%{__rm} -r %{buildroot}%{_datadir}/%{name}/cache

%{__cp} -a %{buildroot}%{_datadir}/%{name}/files %{buildroot}%{_var}/lib/%{name}/files
%{__rm} -r %{buildroot}%{_datadir}/%{name}/files

%{__cp} -a %{buildroot}%{_datadir}/%{name}/store %{buildroot}%{_var}/lib/%{name}/store
%{__rm} -r %{buildroot}%{_datadir}/%{name}/store

%{__ln_s} %{_var}/lib/%{name}/cache %{buildroot}%{_datadir}/%{name}/cache
%{__ln_s} %{_var}/lib/%{name}/files %{buildroot}%{_datadir}/%{name}/files
%{__ln_s} %{_var}/lib/%{name}/store %{buildroot}%{_datadir}/%{name}/store

%{__ln_s} %{_var}/lib/%{name}/avatars %{buildroot}%{_datadir}/%{name}/images/avatars

%{__mkdir_p} %{buildroot}%{_sysconfdir}/%{name}
%{__cp} -a %{buildroot}%{_datadir}/%{name}/config.php %{buildroot}%{_sysconfdir}/%{name}/config.php
%{__rm} %{buildroot}%{_datadir}/%{name}/config.php
%{__cp} -a %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/favicon.ico
cat > %{buildroot}%{_sysconfdir}/%{name}/robots.txt << EOF
User-agent: *
Disallow:   /
EOF
%{__ln_s} %{_sysconfdir}/%{name}/config.php %{buildroot}%{_datadir}/%{name}/config.php
%{__ln_s} %{_sysconfdir}/%{name}/favicon.ico %{buildroot}%{_datadir}/%{name}/favicon.ico
%{__ln_s} %{_sysconfdir}/%{name}/robots.txt %{buildroot}%{_datadir}/%{name}/robots.txt

%{__mkdir_p} %{buildroot}%{_webappconfdir}
%{__cat} > %{buildroot}%{_webappconfdir}/%{name}.conf << EOF
# %{name} configuration

Alias /%{name} %{_datadir}/%{name}

<Directory %{_datadir}/%{name}/>
  <IfModule mod_php4.c>
    php_flag register_globals off
  </IfModule>

  Options -Indexes +FollowSymlinks

  DirectoryIndex index.php

  AllowOverride None
  Order Allow,Deny
  Allow from all
</Directory>

<Directory %{_var}/lib/%{name}/files/>
  <Limit GET POST PUT>
    Order Allow,Deny
    Deny from All
  </Limit>
</Directory>

<Directory %{_datadir}/%{name}/install/>
  Order Allow,Deny
  Deny from All
  Allow from 127.0.0.1
</Directory>

<Directory %{_var}/lib/%{name}/store/>
  <Limit GET POST PUT>
    Order Allow,Deny
    Deny from All
  </Limit>
</Directory>

# For a second board on the same server:
#Alias /second_board %{_datadir}/%{name}
#<Location /second_board>
#       php_value auto_prepend_file %{_sysconfdir}/%{name}/alternative_config.php
#</Location>

#<VirtualHost *>
#       # For using an alternative database (for multiple boards for example)
#       php_value auto_prepend_file %{_sysconfdir}/%{name}/virtualhost_config.php
#
#       ServerName forum.example.com
#       DocumentRoot %{_datadir}/%{name}
#       # You may need to workaround the global /images/ alias in your apache
#       # configuration, your mileage may vary
#       Alias /images/avatars %{_var}/lib/%{name}/avatars
#       Alias /images %{_datadir}/%{name}/images
#</VirtualHost>

<IfModule mod_ssl.c>
    <LocationMatch /%{name}>
        Options FollowSymLinks
        RewriteEngine on
        RewriteCond %{SERVER_PORT} !^443$
        RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
    </LocationMatch>
</IfModule>
EOF

%clean
%{__rm} -rf %{buildroot}

%post
%{_post_webapp}

%postun
%{_postun_webapp}

%files
%defattr(644,root,root,755)
%{_datadir}/%{name}
%dir %{_sysconfdir}/%{name}
%config(noreplace) %attr(0660,root,apache) %{_sysconfdir}/%{name}/config.php
%config(noreplace) %{_sysconfdir}/%{name}/favicon.ico
%config(noreplace) %{_sysconfdir}/%{name}/robots.txt
%dir %{_var}/lib/%{name}
%dir %attr(0730,root,apache) %dir %{_var}/lib/%{name}/cache
%dir %attr(0730,root,apache) %dir %{_var}/lib/%{name}/files
%dir %attr(0730,root,apache) %dir %{_var}/lib/%{name}/store
%dir %attr(0730,root,apache) %dir %{_var}/lib/%{name}/avatars
%{_var}/lib/%{name}/avatars/index.htm
%dir %attr(0730,root,apache) %dir %{_var}/lib/%{name}/avatars/gallery
%{_var}/lib/%{name}/avatars/gallery/index.htm
%dir %attr(0730,root,apache) %{_var}/lib/%{name}/avatars/upload
%{_var}/lib/%{name}/avatars/upload/index.htm
%config(noreplace) %{_webappconfdir}/%{name}.conf


%changelog
* Thu Mar 08 2007 David Walluck <walluck@mandriva.org> 3.0-0.B5.1mdv2007.1
+ Revision: 134951
- 3.0.B5

* Thu Dec 14 2006 David Walluck <walluck@mandriva.org> 0:3.0-0.B4.1mdv2007.1
+ Revision: 96752
- Import phpbb



* Wed Dec 13 2006 David Walluck <walluck@mandriva.org> 0:3.0-0.B4.1mdv2007.1
- release