File FreeSMS.spec of Package FreeSMS

#
# spec file for package FreeSMS
#

# norootforbuild
# usedforbuild    aaa_base acl apache2 apache2-devel apache2-prefork apache2-utils attr audit-libs autoconf automake bash binutils brp-check-internal bzip2 coreutils cpio cpp cpp43 cracklib cvs cyrus-sasl cyrus-sasl-devel diffutils file filesystem fillup findutils gawk gcc gcc43 gdbm gettext-runtime gettext-tools glibc glibc-devel glibc-locale gmp grep groff gzip info insserv less libacl libapr-util1 libapr-util1-devel libapr1 libapr1-devel libattr libbz2-1 libbz2-devel libdb-4_5 libdb-4_5-devel libexpat-devel libexpat1 libgcc43 libgomp43 libltdl-3 libmpfr1 libmudflap43 libncurses5 libnscd libopenssl-devel libopenssl0_9_8 libreadline5 libsqlite3-0 libstdc++43 libtool libuuid1 libvolume_id libxcrypt libzio linux-kernel-headers login m4 make man net-tools netcfg openldap2-client openldap2-devel openssl-certs pam pam-modules patch pcre perl perl-base permissions popt psmisc pwdutils python python-devel rpm sed sysvinit tar terminfo-base texinfo timezone unzip util-linux zlib zlib-devel

Packager:       Joop Boonen <joop_boonen@web.de>
BuildArch:	noarch
Name:           FreeSMS
Group:          Applications/Publishing
%if 0%{?suse_version}
BuildRequires:  apache2-devel unzip
Requires:       php >= 4.2.0 , apache2, apache2-mod_php5, php5-mysql, mysql, ImageMagick
%endif
%if 0%{?fedora_version} || 0%{?centos_version}
BuildRequires:  httpd-devel unzip
Requires:       php >= 4.2.0 , httpd, httpd-mod_php5, php5-mysql, mysql, ImageMagick
%endif
%if 0%{?mandriva_version}
BuildRequires:  apache-devel unzip
Requires:       php >= 4.2.0 , apache-base, apache-conf, apache-mod_php, php5-mysql, mysql, imagemagick
%endif
Version:        1.0
Release:        1
#
%define	apxs	/usr/sbin/apxs2
%define	apache_libexecdir	%(%{apxs} -q LIBEXECDIR)
%define	apache_sysconfdir	%(%{apxs} -q SYSCONFDIR)
#
%define FreeSMS_src_dir FreeSMS
%define FreeSMS_dir /srv/FreeSMS
Url:            http://sourceforge.net/projects/FreeSMS/
Summary:        Web application for managing an educational facility.
#
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
License:        PHP License
Source0:        FreeSMS_1_0.zip
Source1:        FreeSMS.conf.default
Source2:        FreeSMS.conf.vhost

%description
FreeSMS (Free Student Management System) is a Web application for managing an educational facility. It manages teachers and students and provides marketing, registration, course management, attendance, and a student evaluation system, and manages courses within a class environment. Profile-based management is supported for administrators, teachers, and students. Teachers and students can be registered online. Students are allowed to manage their own class enrolment and submit course evaluations, and teachers can manage student attendance. The differential factor and elegance of this project lie in the OOP standard and a modular structure. The code is clean and very extendible. REMARK: As this code hasn't been changed for quite some time it might contain exploitable code!

%prep
#%setup -q  -c
%setup -q  -n %{FreeSMS_src_dir}

%build

%install
rm -rf $RPM_BUILD_ROOT
mkdir  $RPM_BUILD_ROOT
#
mkdir -p $RPM_BUILD_ROOT/%{apache_sysconfdir}/conf.d
cp -avL %{S:1} $RPM_BUILD_ROOT/%{apache_sysconfdir}/conf.d/FreeSMS.conf
mkdir -p $RPM_BUILD_ROOT/%{apache_sysconfdir}/vhosts.d/conf.d  
cp -avL %{S:2} $RPM_BUILD_ROOT/%{apache_sysconfdir}/vhosts.d/conf.d/FreeSMS.conf
mkdir -p $RPM_BUILD_ROOT/%{FreeSMS_dir}
cp -avL * $RPM_BUILD_ROOT/%{FreeSMS_dir}/
#
find $RPM_BUILD_ROOT%{FreeSMS_dir} -name "* *"|while read file; do    echo "$file";    mv "$file" "`echo "$file"| awk ' BEGIN {OFS="_"} $1=$1 '`"; done
#
find $RPM_BUILD_ROOT%{FreeSMS_dir} -type d | \
sed "s@$RPM_BUILD_ROOT@%dir @" > files.FreeSMS
find $RPM_BUILD_ROOT%{FreeSMS_dir} -type f | \
sed "s@$RPM_BUILD_ROOT@@;/\/templates\/\|\.conf$/s@^@%config (noreplace) @" >> files.FreeSMS
cat files.FreeSMS
#

%files -f files.FreeSMS
%defattr(-,root,root)
%dir %{apache_sysconfdir}/conf.d
%config (noreplace) %{apache_sysconfdir}/conf.d/FreeSMS.conf
%dir %{apache_sysconfdir}/vhosts.d/conf.d  
%config (noreplace) %{apache_sysconfdir}/vhosts.d/conf.d/FreeSMS.conf 

%changelog
* Mon Oct 20 2008 joop_boonen@web.de
- First FreeSMS rpm build
- Used viewvc.spec as a base
openSUSE Build Service is sponsored by