Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 59eae8e0266c62d368b83e2c1e0459c4 > files > 5

powl-0.93-2mdv2007.0.src.rpm

%define name    powl
%define version 0.93
%define release %mkrel 2

# php dependencies extraction is utterly stupid, it consider every external 
# statement as pear dependency
%define _requires_exceptions pear(\\(FCKeditor/fckeditor.php\\|nusoap/lib/nusoap.php\\))

Name:       %{name}
Version:    %{version}
Release:    %{release}
Summary:    Semantic Web Development Platform
License:    GPL
Group:      System/Servers
URL:        http://powl.sourceforge.net
Source0:    http://prdownloads.sourceforge.net/powl/%{name}-%{version}.tar.bz2
Patch0:     %{name}-0.9.fhs.patch
Patch1:     %{name}-0.9.3.external-rap.patch
Patch2:     %{name}-0.9.utf8.patch
Requires:   apache-mod_php
Requires:   php-rap >= 0.9.1-7mdk
Requires:   php-xml
# webapp macros and scriptlets
Requires(post):     rpm-helper >= 0.16-2mdv2007.0
Requires(postun):   rpm-helper >= 0.16-2mdv2007.0
BuildRequires:  rpm-helper >= 0.16-2mdv2007.0
BuildRequires:  rpm-mandriva-setup >= 1.23-1mdv2007.0
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}

%description
Since PHP is by far the most distributed web development technology (as
regularly confirmed by Netcraft), the semantic web paradigm will probably only
be successful in a broad perspective if there are applications and tools
available tightly interacting with this language. The aim of the pOWL project
is thus to deliver a PHP and web-based ontology edititing and management
solution to the OpenSoure community.

%prep
%setup -q -n %{name}
%patch0 -p 1
%patch1 -p 1
%patch2

# fix encoding
for file in `find . -type f`; do
    perl -pi -e 'BEGIN {exit unless -T $ARGV[0];} s/\r\n$/\n/;' $file
done

rm -f powlapi/.#include.php.1.91

%build

%install
rm -rf %{buildroot}

install -d -m 755 %{buildroot}%{_var}/www/%{name}
cp -p *.php %{buildroot}%{_var}/www/%{name}
cp -p *.css %{buildroot}%{_var}/www/%{name}
cp -pr doc %{buildroot}%{_var}/www/%{name}
cp -pr images %{buildroot}%{_var}/www/%{name}
cp -pr modules %{buildroot}%{_var}/www/%{name}
cp -pr owlapi %{buildroot}%{_var}/www/%{name}
cp -pr plugins %{buildroot}%{_var}/www/%{name}
cp -pr powlapi %{buildroot}%{_var}/www/%{name}
cp -pr rdfsapi %{buildroot}%{_var}/www/%{name}

install -d -m 755 %{buildroot}%{_sysconfdir}
install -m 644 config.inc.php-dist %{buildroot}%{_sysconfdir}/%{name}.conf

install -d -m 755 %{buildroot}%{_datadir}/%{name}
install -m 644 SysOnt.owl %{buildroot}%{_datadir}/%{name}

# apache configuration
install -d -m 755 %{buildroot}%{_webappconfdir}
cat > %{buildroot}%{_webappconfdir}/%{name}.conf <<EOF
# Cacti Apache configuration file
Alias /%{name} %{_var}/www/%{name}
<Directory %{_var}/www/%{name}>
    Allow from all
    php_value memory_limit 16M
    php_value allow_call_time_pass_reference 1
</Directory>
EOF

cat > README.mdv <<EOF
Mandriva RPM specific notes

setup
-----
The setup used here differs from default one, to achieve better FHS compliance.
- the configuration file is /etc/powl.conf
- the files accessibles from the web are in /var/www/powl
- an external rap is used

post-installation
-----------------
You have to create the database using instructions from
/usr/share/doc/powl-*/INSTALL.

Additional useful packages
--------------------------
- any database supported by adodb, either locale or remote
EOF

%post
%_post_webapp

%postun
%_postun_webapp

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc README.mdv CHANGELOG INSTALL readme todo
%config(noreplace) %{_webappconfdir}/%{name}.conf
%config(noreplace) %{_sysconfdir}/%{name}.conf
%{_var}/www/%{name}
%{_datadir}/%{name}

%changelog
* Fri Aug 25 2006 Guillaume Rousse <guillomovitch@mandriva.org> 0.93-2mdv2007.0
- fix patch 1
- fix requires

* Mon Jul 31 2006 Guillaume Rousse <guillomovitch@mandriva.org> 0.93-1mdv2007.0
- new version
- rediff patch 1

* Tue Jul 11 2006 Guillaume Rousse <guillomovitch@mandriva.org> 0.9-3mdv2007.0
- %%mkrel
- webapps macros
- use herein document for README.mdv

* Thu Jun 30 2005 Guillaume Rousse <guillomovitch@mandriva.org> 0.9-2mdk 
- use new rpm apache macros
- requires php-rap >= 0.9.1-7mdk
- allow 16Mo memory limit
- better external rap patch

* Mon Jun 27 2005 Guillaume Rousse <guillomovitch@mandriva.org> 0.9-1mdk 
- new release
- safer %%post and %%postun
- rediff patches 0 and 2

* Fri Jun 17 2005 Pascal Terjan <pterjan@mandriva.org> 0.8-2mdk
- fix invalid utf8 in SysOnt.owl (P2)

* Wed Jun 15 2005 Guillaume Rousse <guillomovitch@mandriva.org> 0.8-1mdk 
- first mdk release