File class.spec of Package class

# spec file for package class

# norootforbuild

Name:           class
Summary:        ClaSS stands for ClaSS Student System
Version:        0.8.68
Release:        1
License:        GPL
BuildArch:      noarch
AutoReqProv:    on
Vendor:         openSUSE-Education
Source:         ClaSS-%{version}.tar.bz2
%define         curriculum_name curriculum_pack_en
%define         curriculum_version 0.8
Source1:        %{curriculum_name}-%{curriculum_version}.tar.bz2
%define         demo_name demo_dataset
%define         demo_version 0.8.68
Source2:        %{demo_name}-%{demo_version}.sql.bz2
Group:          Productivity/Networking/Web/Utilities
BuildRequires:  apache2-devel
Provides:       ClaSS = %version
Obsoletes:      ClaSS <= 0.8.42
Requires:       php5-pear-xml_serializer
Requires:       php5-pear-xml_parser
Requires:       php5-pear-xml_util
Requires:       php5-pear-db
%if %sles_version == 9
Requires:       apache2-mod_php4 php4-mysql
Requires:       mod_php_any php-mysql
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%define installdir /srv/www/class
%define apache_sysconfdir %(/usr/sbin/apxs2 -q SYSCONFDIR)

ClaSS stands for ClaSS Student System, a complete student
tracking, reporting, and information management system for schools.

ClaSS is a working, usable version of what is to be a complete
classroom information assistant.

You are referred to the ClaSS home-page for
more information and documentation. Please email with
questions, requests for support, installation help etc. You can also
use the integrated suppoprt forms in the AboutBook to post queries
to the development team from inside ClaSS.

Look at the README in the subdiretory class/install for instructions
to guide you through the installation procedure.

If you already have an install of ClaSS running then you'll need to
migrate your database across by applying the appropriate sql-patch
scripts in the install directory (if any are more recent than your
current install).

Please do let know if you find this software useful (or
not useful!). All feedback is valued and will help speed the
development of ClaSS.


%setup -q -n class -a1
bunzip2 -cd %{SOURCE2} > %{demo_name}-%{demo_version}.sql 


%{__mkdir_p} %{buildroot}%{installdir}
%{__mkdir_p} %{buildroot}%{_defaultdocdir}/%{name}/
%{__mkdir_p} %{buildroot}%{apache_sysconfdir}/conf.d/
%{__mv} AUTHORS CHANGELOG COPYRIGHT LICENSE README %{buildroot}%{_defaultdocdir}/%{name}/
%{__mv} %{demo_name}-%{demo_version}.sql %{buildroot}%{_defaultdocdir}/%{name}/
cp -a * %{buildroot}%{installdir}/
find %{buildroot}%{installdir}/ -type f -exec chmod -x {} \;
sed -e "s|CLASSROOTDIR|%{installdir}|g; \
        s|CLASSCONFDIR|%{configdir}|g" %{SOURCE2} > %{buildroot}/%{apache_sysconfdir}/conf.d/%{name}.conf
touch %{buildroot}/%{installdir}/dbh_connect.php
mv %{buildroot}%{installdir}/install/toplevel/.htaccess %{buildroot}%{_defaultdocdir}/%{name}/

rm -rf %buildroot

%dir %{installdir}
%dir %{_defaultdocdir}/%{name}
%doc %{_defaultdocdir}/%{name}/*
%doc %{_defaultdocdir}/%{name}/.htaccess
%config(noreplace) %{apache_sysconfdir}/conf.d/%{name}.conf
%attr(640,wwwrun,www) %config(noreplace,missingok) %{installdir}/dbh_connect.php

openSUSE Build Service is sponsored by