Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 3382ca5af76cbd0fdfdd0253b9b89275 > files > 4

bhmis-0.9.7-1mdk.src.rpm

%define name	bhmis
%define version	0.9.7
%define release	1mdk

Summary:	BananaMIS is a BananaPOS web administration GUI
Name:		%{name}
Version:	%{version}
Release:	%{release}
License:	GPL
Group:		System/Servers
URL:		http://www.bananamis.com/
Source0:	%{name}-%{version}-1.tar.bz2
Source1:	db.tar.bz2
Source100:	fix_files.sh.bz2
Source101:	fix_db_embed_changes.txt.bz2
Patch0:		bhmis-0.9.7-system_adodb.diff.bz2
Patch1:		bhmis-0.9.7-buglet_01.diff.bz2
Requires:	apache2 >= 2.0.52
Requires:	apache2-mod_php >= 2.0.52_4.3.2
Requires:	php-mysql
BuildArch:      noarch
BuildRoot:	%{_tmppath}/%{name}-%{version}

%description
BananaMIS is a back office administration system for bananapos.

%prep

%setup -q -n %{name}-%{version} -a1
%patch0 -p0
%patch1 -p0

# clean up CVS stuff
for i in `find . -type d -name CVS` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do
    if [ -e "$i" ]; then rm -r $i; fi >&/dev/null
done

# fix dir perms
find . -type d | xargs chmod 755

# fix file perms
find . -type f | xargs chmod 644

# cleanup some more
find . -type f -name "Makefile*" | xargs rm -f

# dynamic "patch" system by Kort E Patterson
bzcat %{SOURCE100} > fix_files.sh
bzcat %{SOURCE101} > fix_db_embed_changes.txt
chmod 755 fix_files.sh
echo "A *.php ./fix_db_embed_changes.txt ." > files_to_fix
./fix_files.sh ./files_to_fix

%build

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

install -d %{buildroot}/var/www/html/bhmis
cp -aRf mis/* %{buildroot}/var/www/html/bhmis/
#cp -aRf modules/* %{buildroot}/var/www/html/bhmis/

#install -d %{buildroot}%{_sysconfdir}/httpd/webapps.d
#cat > bhmis.conf << EOF
#Alias /bhmis/ /var/www/html/bhmis/
#<Directory /var/www/html/bhmis>
#    Options Includes FollowSymlinks
#</Directory>
#EOF
#install -m0644 bhmis.conf %{buildroot}%{_sysconfdir}/httpd/webapps.d/bhmis.conf

# cleanup
rm -rf %{buildroot}/var/www/html/bhmis/lib/adodb

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-, root, root)
%doc ChangeLog AUTHORS README TODO db sql
#%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/httpd/webapps.d/bhmis.conf
/var/www/html/bhmis

%changelog
* Fri Oct 15 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.9.7-1mdk
- initial mandrake package