Blob Blame History Raw
Summary:	Graphical client for PostgreSQL
Name:		pgadmin3
Version:	1.22.1
Release:	1%{?dist}
License:	PostgreSQL
Group:		Applications/Databases
Source:		http://download.postgresql.org/pub/pgadmin3/release/v%{version}/src/%{name}-%{version}.tar.gz
Patch0:		%{name}-1.14.2-cflags.patch
Patch2:		%{name}-desktop.patch
URL:		http://www.pgadmin.org/
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:	wxGTK-devel postgresql-devel desktop-file-utils openssl-devel libxml2-devel libxslt-devel
Requires:	wxGTK

%description
pgAdmin III is a powerful administration and development
platform for the PostgreSQL database, free for any use.
It is designed to answer the needs of all users,
from writing simple SQL queries to developing complex
databases. The graphical interface supports all PostgreSQL
features and makes administration easy.

pgAdmin III is designed to answer the needs of all users,
from writing simple SQL queries to developing complex databases.
The graphical interface supports all PostgreSQL features and
makes administration easy. The application also includes a syntax
highlighting SQL editor, a server-side code editor, an
SQL/batch/shell job scheduling agent, support for the Slony-I
replication engine and much more. No additional drivers are
required to communicate with the database server.

%prep
%setup -q
%patch0 -p1
%patch2 -p0

%build
export LIBS="-lwx_gtk2u_core-2.8"
%configure --disable-debug --disable-dependency-tracking --with-wx-version=2.8 --with-wx=%{_prefix}
make %{?_smp_mflags} all

%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install

mkdir -p %{buildroot}%{_datadir}/%{name}/
cp -f ./pkg/debian/pgadmin3.xpm %{buildroot}/%{_datadir}/%{name}/%{name}.xpm

mkdir -p %{buildroot}/%{_datadir}/applications

desktop-file-install --dir %{buildroot}%{_datadir}/applications \
%if 0%{?rhel}
	--vendor="" \
%endif
	--add-category Development pkg/%{name}.desktop

# Convert changelog, fix incorrect end-of-line encoding
iconv -f iso-8859-1 -t utf-8 -o CHANGELOG.utf8 CHANGELOG
sed -i 's/\r$//' CHANGELOG.utf8
touch -c -r CHANGELOG CHANGELOG.utf8
mv -f CHANGELOG.utf8 CHANGELOG

# Remove unwanted and double files
rm -f docs/{Docs.vcproj,builddocs.bat}
rm -f %{buildroot}%{_datadir}/%{name}/i18n/{*,.}/wxstd.mo

# Move locales to their correct place
mkdir -p %{buildroot}%{_datadir}/locale
mv -f %{buildroot}%{_datadir}/%{name}/i18n/??_?? %{buildroot}%{_datadir}/locale

%find_lang %{name}

%clean
rm -rf %{buildroot}

%files -f %{name}.lang
%defattr(-,root,root)
%doc BUGS CHANGELOG LICENSE README docs/*
%{_bindir}/*
%{_datadir}/%{name}
%{_datadir}/applications/*

%changelog
* Wed Feb 17 2016 Devrim GUNDUZ <devrim@gunduz.org> 1.22.1-1
- Update to 1.22.1
- Update download URL

* Mon Dec 22 2014 Devrim GUNDUZ <devrim@gunduz.org> 1.20.0-1
- Update to 1.20.0
- Update download URL -- community will deprecate FTP service.

* Tue Oct 8 2013 Devrim GUNDUZ <devrim@gunduz.org> 1.18.1-1
- Update to 1.18.1

* Wed Sep 11 2013 Devrim GUNDUZ <devrim@gunduz.org> 1.18.0-1
- Update to 1.18.0
- Trim changelog

* Fri Jan 25 2013 Devrim GUNDUZ <devrim@gunduz.org> 1.16.1-1
- Update to 1.16.1

* Mon Oct 29 2012 Devrim GUNDUZ <devrim@gunduz.org> 1.16.0-2
- Update licence, per bz #871183.

* Sun Oct 28 2012 Devrim GUNDUZ <devrim@gunduz.org> 1.16.0-1
- Update to 1.16.0

* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.14.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri May 11 2012 Ville Skyttä <ville.skytta@iki.fi> - 1.14.2-2
- Fix -debuginfo (#746349).

* Thu May 10 2012 Devrim GUNDUZ <devrim@gunduz.org> 1.14.2-1
- Update to 1.14.2

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.14.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Thu Oct 13 2011 Devrim GUNDUZ <devrim@gunduz.org> 1.14.0-1
- Update to 1.14.0

* Tue Apr 19 2011 Devrim GUNDUZ <devrim@gunduz.org> 1.12.3-1
- Update to 1.12.3

* Wed Feb 23 2011 Devrim GUNDUZ <devrim@gunduz.org> 1.12.2-3
- Actually install desktop file.

* Tue Feb 15 2011 Devrim GUNDUZ <devrim@gunduz.org> 1.12.2-2
- Update to 1.12.2

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Tue Aug 3 2010 Devrim GUNDUZ <devrim@gunduz.org> 1.10.5-1
- Update to 1.10.5

* Wed Jul 14 2010 Dan Horák <dan@danny.cz> - 1.10.3-3
- rebuilt against wxGTK-2.8.11-2

* Tue Jun 15 2010 Michel Salim <salimma@fedoraproject.org> - 1.10.3-2
- Ship the hints files (bz #513039)

* Thu May 13 2010 Devrim GUNDUZ <devrim@gunduz.org> 1.10.3-1
- Update to 1.10.3

* Mon Mar 15 2010 Devrim GUNDUZ <devrim@gunduz.org> 1.10.2-1
- Update to 1.10.2

* Thu Dec 3 2009 Devrim GUNDUZ <devrim@gunduz.org> 1.10.1-1
- Update to 1.10.1

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon Jun 29 2009 Devrim GUNDUZ <devrim@gunduz.org> 1.10.0-1
- Update to 1.10.0
- Update licence
- Incorporate some changes from rpmfusion:
  Corrected pgadmin3 documentation path to avoid errors (#448)
  Re-added the branding directory for some users (RHBZ #473748)
  Removed useless -docs package, main package shipped it anyway
  Many spec file and package cleanups to get rpmlint very silent