File opensis.spec of Package openSIS

#
# spec file for package openSIS (Version 4.X.X.X)
#
# Copyright (c) 2008 os4ed.com Atlanta, GA USA
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# 
#
# norootforbuild

Name:           opensis
Summary:        A Student information System
Version:        4.5.0.0.update1
Release:        1
License:        GNU GPL v2 or later
Group:          Productivity/Networking/Web/Utilities
Url:            http://opensis.sourceforge.net/
Source0:        http://downloads.sourceforge.net/project/opensis/%{name}%{version}.zip
Source1:        opensis_include.conf
Source2:        %{name}-rpmlintrc
BuildRoot:	    %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
BuildRequires:	unzip
BuildRequires:  fdupes
Requires:       apache2-mod_php5
Requires:       php5-mysql	
Requires:       mysql
Recommends:     pdftk
%define         OpensisRootDir /srv/www/%{name}

%description
openSIS is a free student information system that rivals costly commercial
alternatives in looks, functionality and ease of use and administration.
openSIS is the centerpiece of an evolving set of integrated open source
education applications that support schools and districts. openSIS is a game
changer and a new paradigm in administrative education software. Our founders
have always said that if we can produce an open source package that is easy to
use, looks great, has the same functionality as commercial alternatives and
represents a TCO up to 75% less than comparable solutions, then the decision
should be easy.


%prep
%setup -qn %{name}
find . -depth -name .svn -type d -exec rm -rf {} \;
find . -name \*~ -type f -exec rm -rf {} \;

%build

%install
%__mkdir_p %{buildroot}%{OpensisRootDir}
%__cp -r * %{buildroot}%{OpensisRootDir}
%__rm -rf %{buildroot}%{OpensisRootDir}/docs

%__mkdir -p %{buildroot}/%{_sysconfdir}/apache2/conf.d
%__sed -e "s#ROOTDIR#%{OpensisRootDir}#g" %{SOURCE1} > %{buildroot}/%{_sysconfdir}/apache2/conf.d/%{name}.conf

%__sed -i "s|/usr/local/bin|%{_bindir}|g" %{buildroot}%{OpensisRootDir}/modules/Grades/FDFReportCards.php

%fdupes %{buildroot}

%clean
test "%{buildroot}" != "/" && %__rm -rf %{buildroot}

%files
%defattr(0644,root,root,0755)
%doc docs
%dir %{_sysconfdir}/apache2
%dir %{_sysconfdir}/apache2/conf.d
%config(noreplace) %{_sysconfdir}/apache2/conf.d/%{name}.conf
%{OpensisRootDir}

%changelog
openSUSE Build Service is sponsored by