%define name phpPgAdmin %define version 3.5.3 %define release 1mdk %define webadminroot /var/www/html/admin Summary: PhpPgAdmin is intended to handle the adminstration of PostgreSQL over the web Name: %{name} Version: %{version} Release: %{release} Source0: http://prdownloads.sourceforge.net/phppgadmin/%{name}-%{version}.tar.bz2 URL: http://sourceforge.net/projects/phppgadmin License: GPL Group: System/Servers Requires: webserver Requires: postgresql Requires: php-common Requires: php-pgsql Requires: mod_php BuildRequires: recode BuildRequires: file BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot BuildArch: noarch Prefix: %{webadminroot} %description phpPgAdmin is phpMyAdmin (for MySQL) ported to PostgreSQL. phpPgAdmin is a fully functional PostgreSQL administration utility. You can use it to create and maintain multiple databases and even multiple servers. %prep %setup -q -n %{name} # strip away annoying ^M find . -type f|xargs file|grep 'CRLF'|cut -d: -f1|xargs perl -p -i -e 's/\r//' find . -type f|xargs file|grep 'text'|cut -d: -f1|xargs perl -p -i -e 's/\r//' %build %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} install -d %{buildroot}%{webadminroot}/%{name}/conf install -d %{buildroot}%{webadminroot}/%{name}/classes/HTML_TreeMenu install -d %{buildroot}%{webadminroot}/%{name}/classes/HTML_TreeMenu/images install -d %{buildroot}%{webadminroot}/%{name}/classes/database install -d %{buildroot}%{webadminroot}/%{name}/images/themes/default install -d %{buildroot}%{webadminroot}/%{name}/lang/recoded install -d %{buildroot}%{webadminroot}/%{name}/libraries/adodb install -d %{buildroot}%{webadminroot}/%{name}/themes/default install -m0644 *.php %{buildroot}%{webadminroot}/%{name}/ install -m0644 *.txt %{buildroot}%{webadminroot}/%{name}/ install -m0644 *.js %{buildroot}%{webadminroot}/%{name}/ install -m0644 conf/config.inc.php-dist %{buildroot}%{webadminroot}/%{name}/conf/config.inc.php install -m0644 classes/*.php %{buildroot}%{webadminroot}/%{name}/classes/ install -m0644 classes/HTML_TreeMenu/*.js %{buildroot}%{webadminroot}/%{name}/classes/HTML_TreeMenu/ install -m0644 classes/HTML_TreeMenu/*.php %{buildroot}%{webadminroot}/%{name}/classes/HTML_TreeMenu/ install -m0644 classes/HTML_TreeMenu/images/*.gif %{buildroot}%{webadminroot}/%{name}/classes/HTML_TreeMenu/images/ install -m0644 classes/database/*.php %{buildroot}%{webadminroot}/%{name}/classes/database/ install -m0644 images/themes/default/*.png %{buildroot}%{webadminroot}/%{name}/images/themes/default/ install -m0644 themes/default/global.css %{buildroot}%{webadminroot}/%{name}/themes/default/ # generate UTF-8 files pushd lang make DESTDIR=./recoded popd install -m0644 lang/recoded/*.php %{buildroot}%{webadminroot}/%{name}/lang/recoded/ install -m0644 lang/*.php %{buildroot}%{webadminroot}/%{name}/lang/ install -m0644 libraries/*.php %{buildroot}%{webadminroot}/%{name}/libraries/ # i tried to use the ADOdb package instead but failed... install -d %{buildroot}%{webadminroot}/%{name}/libraries/adodb/datadict/ install -d %{buildroot}%{webadminroot}/%{name}/libraries/adodb/drivers/ install -m0644 libraries/adodb/*.php %{buildroot}%{webadminroot}/%{name}/libraries/adodb/ install -m0644 libraries/adodb/datadict/*.php %{buildroot}%{webadminroot}/%{name}/libraries/adodb/datadict/ install -m0644 libraries/adodb/drivers/*.php %{buildroot}%{webadminroot}/%{name}/libraries/adodb/drivers/ %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root) %doc FAQ sql/reports-pgsql.sql TODO TRANSLATORS HISTORY INSTALL DEVELOPERS CREDITS %config(noreplace) %attr(0644,root,root) %{webadminroot}/%{name}/conf/config.inc.php %{webadminroot}/%{name} %changelog * Sat Apr 16 2005 Oden Eriksson <oeriksson@mandriva.com> 3.5.3-1mdk - 2.5.3 * Fri Feb 25 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 3.5.2-1mdk - 3.5.2 - strip away annoying ^M * Wed Dec 22 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.5.1-1mdk - 3.5.1 * Tue Nov 16 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.5-1mdk - 3.5 * Sun Apr 11 2004 Geza Gemes <geza@kzsdabas.sulinet.hu> 3.3.1-1mdk - 3.3.1 - Changed ADODB install mode to reflect better the original tarbals structure - Changed location of css file to go to themes/default * Wed Dec 03 2003 Lenny Cartier <lenny@mandrakesoft.com> 3.2.1-1mdk - 3.2.1 * Mon Sep 29 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.1-1mdk - 3.1 - reworked the spec file * Sun Mar 2 2003 Jean-Michel Dault <jmdault@mandrakesoft.com> 2.4.2-5mdk - fix requires [bug 2460] * Wed Jan 29 2003 Lenny Cartier <lenny@mandrakesoft.com> 2.4.2-4mdk - rebuild * Mon Jan 27 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.4.2-3mdk - build release * Thu Sep 19 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.4.2-2mdk - misc spec file fixes - install in common and relocatable %%{webadminroot}/ directory * Tue Jul 09 2002 Christian Belisle <cbelisle@mandrakesoft.com> 2.4.2-1mdk - Version 2.4.2. - updated URL. - no %%postun needed. * Mon Apr 08 2002 Christian Belisle <cbelisle@mandrakesoft.com> 2.4.1-1mdk - Version 2.4.1. * Mon Mar 04 2002 Christian Belisle <cbelisle@mandrakesoft.com> 2.4a-1mdk - official release 2.4a (major security fix and few bug fixes). - Remove distribution tag. - Updated URL. * Thu Nov 15 2001 Christian Belisle <cbelisle@mandrakesoft.com> 2.3-4mdk - Fix strange-permissions and no-url warning in rpmlint. * Tue Oct 16 2001 Christian Belisle <cbelisle@mandrakesoft.com> 2.3-3mdk - Make rpmlint happier. * Thu Aug 09 2001 Christian Belisle <cbelisle@mandrakesoft.com> 2.3-2mdk - s/PostgreSQL/postgresql in require. * Thu Aug 09 2001 Christian Belisle <cbelisle@mandrakesoft.com> 2.3-1mdk - first rpm distribution.