Sophie

Sophie

distrib > Mageia > 8 > i586 > media > core-updates_testing-src > by-pkgid > 59d4ced5c428aea159c9d7c0aae9af17 > files > 4

phppgadmin-7.13.0-1.1.mga8.src.rpm

%define upstream_name phpPgAdmin
%define subrel 1
Summary:	PostgreSQL database administration over the web interface
Name:		phppgadmin
Version:	7.13.0
Release:	%mkrel 1
License:	GPLv2+
Group:		System/Servers
URL:		https://github.com/phppgadmin/phppgadmin
Source0:	https://github.com/phppgadmin/phppgadmin/releases/download/REL_7-13-0/%{upstream_name}-%{version}.tar.bz2
Patch0:		mvConfig.diff
Patch1:		php8.patch
Requires:	php-webinterface > 3:7.2.0
Requires:	php-pgsql
Requires:	php-gettext

BuildRequires:  mercurial
BuildRequires:	ImageMagick
BuildRequires:	libjasper
BuildRequires:	recode
BuildArch:	noarch

%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
%autosetup -S hg -n %{upstream_name}-%{version}

# 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

%build

%install

export DONT_RELINK=1

install -d %{buildroot}%{webappconfdir}
install -d %{buildroot}%{_sysconfdir}/%{name}
install -d %{buildroot}/var/www/%{name}

cp -aRf * %{buildroot}/var/www/%{name}/

mv %{buildroot}/var/www/%{name}/conf/config.inc.php-dist %{buildroot}%{_sysconfdir}/%{name}/config.inc.php
rm -rf %{buildroot}/var/www/%{name}/conf

# generate UTF-8 files
pushd lang
#	make DESTDIR=./recoded
popd
install -m0644 lang/*.php  %{buildroot}/var/www/%{name}/lang/

# cleanup
pushd %{buildroot}/var/www/%{name}
	rm -rf sql
	rm -f CREDITS DEVELOPERS FAQ HISTORY INSTALL LICENSE TODO TRANSLATORS
	rm -f lang/Makefile lang/convert.awk lang/php2po lang/po2php lang/synch lang/langcheck
popd

cat > %{buildroot}%{webappconfdir}/%{name}.conf << EOF
Alias /%{name} /var/www/%{name}

<Directory /var/www/%{name}>
   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require ip 127.0.0.1
       Require ip ::1
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 127.0.0.1
     Allow from ::1
   </IfModule>
   ErrorDocument 403 "Access denied per %{webappconfdir}/%{name}.conf"
</Directory>
EOF

# fix dir perms
find %{buildroot} -type d | xargs chmod 755

# fix file perms
find %{buildroot} -type f | xargs chmod 644

# Mandriva Icons
install -d %{buildroot}%{_iconsdir}
install -d %{buildroot}%{_miconsdir}
install -d %{buildroot}%{_liconsdir}

convert images/themes/default/title.png -resize 16x16  %{buildroot}%{_miconsdir}/%{name}.png
convert images/themes/default/title.png -resize 32x32  %{buildroot}%{_iconsdir}/%{name}.png
convert images/themes/default/title.png -resize 48x48  %{buildroot}%{_liconsdir}/%{name}.png


# FreeDesktop menu
install -d %{buildroot}%{_datadir}/applications
cat > %{buildroot}%{_datadir}/applications/%{_real_vendor}-%{name}.desktop << EOF
[Desktop Entry]
Name=phpPgAdmin
Comment=phpPgAdmin is a web administration GUI for PostgreSQL.
Exec=%{_bindir}/www-browser http://localhost/%{name}/
Icon=%{name}
Terminal=false
Type=Application
Categories=Database;
EOF

%post
#Since we already create a config.inc.php.rpmnew automatically, then we should
#probably remove this.  Otherwise we should do more specific checking for options
#ccp --delete --ifexists --set "NoOrphans" --ignoreopt config_version \
#	--oldfile %{_sysconfdir}/%{name}/config.inc.php \
#	--newfile %{_sysconfdir}/%{name}/config.inc.php.rpmnew

%files
%doc CREDITS DEVELOPERS FAQ HISTORY INSTALL LICENSE TODO TRANSLATORS plugins/Report/sql/reports-pgsql.sql
%config(noreplace) %{webappconfdir}/%{name}.conf
%dir %{_sysconfdir}/%{name}
%attr(0640,apache,root) %config(noreplace) %{_sysconfdir}/%{name}/config.inc.php
/var/www/%{name}
%{_iconsdir}/%{name}.png
%{_miconsdir}/%{name}.png
%{_liconsdir}/%{name}.png
%{_datadir}/applications/*.desktop




%changelog
* Thu Mar 11 2021 mokraemer <mokraemer> 7.13.0-1.1.mga8
+ Revision: 1701473
- fix php8 issue (mga#28582)

* Thu Dec 03 2020 mokraemer <mokraemer> 7.13.0-1.mga8
+ Revision: 1652086
- new version 7.13
+ danf <danf>
- Switch URLs from http: to https:

* Tue Feb 18 2020 umeabot <umeabot> 7.12.0-2.mga8
+ Revision: 1538906
- Mageia 8 Mass Rebuild

* Thu Nov 28 2019 mokraemer <mokraemer> 7.12.0-1.mga8
+ Revision: 1463326
- updated phppgadmin to latest version 7.12.0
- remove old incompatible package

* Thu Sep 20 2018 umeabot <umeabot> 5.1-8.p3.mga7
+ Revision: 1287903
- Mageia 7 Mass Rebuild

* Sat Apr 14 2018 kekepower <kekepower> 5.1-8.p2.mga7
+ Revision: 1218648
- Fix Source0 link and bump rel

* Wed Jan 10 2018 mokraemer <mokraemer> 5.1-8.p1.mga7
+ Revision: 1192183
- updated phppgadmin to master

* Mon Nov 20 2017 tmb <tmb> 5.1-7.mga7
+ Revision: 1177966
- fix config for apache 2.4

* Wed Feb 03 2016 umeabot <umeabot> 5.1-6.mga6
+ Revision: 933594
- Mageia 6 Mass Rebuild

* Wed Oct 15 2014 umeabot <umeabot> 5.1-5.mga5
+ Revision: 747636
- Second Mageia 5 Mass Rebuild

* Wed Oct 01 2014 tv <tv> 5.1-4.mga5
+ Revision: 734227
- rebuild for pear deps

* Tue Sep 16 2014 umeabot <umeabot> 5.1-3.mga5
+ Revision: 687569
- Mageia 5 Mass Rebuild

* Sat Oct 19 2013 umeabot <umeabot> 5.1-2.mga4
+ Revision: 530162
- Mageia 4 Mass Rebuild

* Fri Jul 19 2013 malo <malo> 5.1-1.mga4
+ Revision: 456342
- update to 5.1 (Jeff Robins)
- spec clean-up
- imported package phppgadmin