Name: synaptic
Version: 0.57.2
Release: 21%{?_dist_release}
Summary: GTK based graphical front-end for APT
Summary(ja): GTK ベースの APT グラフィカルフロントエンド
Group: Applications/Administration
License: GPL

Source0: %{name}-%{version}.tar.gz
Source10: synaptic-0.57.2-ja.po
Source20: synaptic-dummy-grouplist.txt
Source30: package-supported.png

Patch1: synaptic-0.57.2-gcc41.patch
Patch2: synaptic-0.57.2-repomd-1.patch
Patch3: synaptic-0.57.2-showprog.patch
Patch4: synaptic-0.57.2-progressapi-hack.patch
Patch5: synaptic-0.57.2-gcc43.patch
Patch6: synaptic-0.57.2-gcc44.patch
Patch7: synaptic-0.57.2-gcc45.patch

Patch10: synaptic-0.56-desktopfile.patch
Patch11: synaptic-0.57.2-no-utf8-help.patch
Patch13: synaptic-0.57.2-apt-cdrom.patch
Patch14: synaptic-0.57.2-prefer-normal-upgrade.patch
Patch15: synaptic-0.57.2-default-size.patch
Patch16: synaptic-0.57.2-firefox.patch
Patch20: synaptic-dummy-grouplist.patch

Patch21: synaptic-0.57.2-convert-eucjp-to-utf8.patch
Patch22: synaptic-0.57.2-fix-memory-corruption.patch
Patch23: synaptic-0.57.2-fix-assertion-failure.patch
Patch24: synaptic-0.57.2-no-skip-taskbar.patch
Patch25: synaptic-0.57.2-add-default-filters.patch
Patch26: synaptic-0.57.2-fix-repository-updown.patch
Patch27: synaptic-0.57.2-fix-crash-on-font-change.patch
Patch28: synaptic-0.57.2-fix-reinstall.patch
Patch29: synaptic-0.57.2-fix-crash-in-lock-package.patch

Patch100: synaptic-0.57.2-build-with-rpm-4.9.patch

Requires: apt >= 0.5.15lorg3.93-0vl1
Requires: usermode >= 1.69
BuildRequires: bzip2-devel, zlib-devel
BuildRequires: rpm-devel >= 4.8
BuildRequires: apt-devel >= 0.5.15lorg3.95
BuildRequires: gtk2-devel >= 2.4.0
BuildRequires: libglade2-devel >= 2.0.1
BuildRequires: vte-devel >= 0.11.10
BuildRequires: xmlto
BuildRequires: scrollkeeper
BuildRequires: perl-XML-Parser
BuildRequires: desktop-file-utils
BuildRoot: %{_tmppath}/%{name}-%{version}-root

Vendor: Project Vine
Distribution: Vine Linux
Packager: daisuke


%description
Synaptic is a graphical front-end for APT (Advanced Package Tool). This
version is written with the Gtk toolkit. 

Instead of using trees to display packages, Synaptic is heavily based on a
powerful package filtering system. That greatly simplifies the interface
while giving a lot more flexibility to browse through very long package
lists.

%description -l ja
Synaptic は APT(Advanced Package Tool) の Gtk+ ベースのグラフィカル
フロントエンドです。Synaptic はパッケージを単純にツリー表示するのでは
なく、強力なパッケージフィルタリングシステムを用いてパッケージを表示
しています。


%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch10 -p1
%patch11 -p1
#%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch29 -p1

%if "%{_dist_release}" >= "vl7"
%patch100 -p1
%endif

cp -f po/ja.po po/ja.po.orig
cp -f %{SOURCE10} po/ja.po

cp -f %{SOURCE20} .

cp -f %{SOURCE30} pixmaps/

%build
libtoolize --force --copy
autoconf
%configure --with-pkg-hold --with-vte --enable-scripts=yes --disable-dependency-tracking
make -C po update-po
make %{?_smp_mflags}

%install
rm -fr %{buildroot}
%makeinstall

# usermode setting
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_sysconfdir}/security/console.apps
mkdir -p %{buildroot}%{_sysconfdir}/pam.d
ln -s %{_bindir}/consolehelper %{buildroot}%{_bindir}/synaptic
cat << EOF > %{buildroot}%{_sysconfdir}/security/console.apps/synaptic
. config-util
PROGRAM=%{_sbindir}/synaptic
SESSION=true
EOF
cat << EOF > %{buildroot}%{_sysconfdir}/pam.d/synaptic
#%PAM-1.0
auth        include     config-util
account     include     config-util
session     include     config-util
EOF

desktop-file-install --vendor=synaptic          \
  --delete-original                             \
  --dir %{buildroot}%{_datadir}/applications    \
  --remove-key MultipleArgs                     \
  --add-category Application                    \
  --add-category System                         \
  --add-category Settings                       \
  %{buildroot}%{_datadir}/applications/%{name}.desktop

# install japanese manpage
mkdir -p %{buildroot}%{_mandir}/ja/man8/
install man/synaptic.ja.8 %{buildroot}%{_mandir}/ja/man8/synaptic.8

# fixed uri of manual.
sed -i 's@file://usr@file:///usr@' %{buildroot}%{_datadir}/omf/synaptic/*.omf

# remove uninstalled files
rm -rf %{buildroot}/%{_localstatedir}/scrollkeeper
rm -rf %{buildroot}/%{_sysconfdir}/X11
rm -rf %{buildroot}/%{_datadir}/applications/%{name}-kde.desktop

%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root)
%doc COPYING* README* TODO
%attr(755,root,root) %{_sbindir}/synaptic
%attr(755,root,root) %{_bindir}/synaptic
%{_sysconfdir}/security/console.apps/synaptic
%{_sysconfdir}/pam.d/synaptic
%{_datadir}/locale/*/LC_MESSAGES/%{name}.mo
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/omf/synaptic/*.omf
%{_datadir}/gnome/help/synaptic
%{_mandir}/man8/*
%{_mandir}/ja/man8/*

%changelog
* Sun Oct 14 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-21
- add patch29 to fix crash in "Lock package"

* Mon Sep 17 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-20
- rebuild with rpm-4.10.0

* Wed Jan 04 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.57.2-19
- fix Patch100

* Wed Jan 04 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.57.2-18
- add Patch100 (synaptic-0.57.2-build-with-rpm-4.9.patch) (fix <BTS:1244>)

* Thu Dec 22 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-17
- rebuild with rpm-4.9.1.2

* Wed Jun 01 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-16
- use config-util for pam/usermode settings

* Mon May 02 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-15
- rebuild with apt-0.5.15lorg3.95-10.git522

* Mon Apr 18 2011 Yasumichi Akahoshi <yasumichi@vinelinux.org> 0.57.2-14
- update Source10 and Source20.

* Wed Apr 13 2011 Yasumichi Akahoshi <yasumichi@vinelinux.org> 0.57.2-13
- fixed uri of manual. 

* Thu Jan 27 2011 Kazutaka HARADA <kazutaka@vinelinux.org> 0.57.2-12
- add Patch28: fix reinstall error (<BTS:VineLinux:356>)
- add BuildRequires: desktop-file-utils

* Fri Feb  5 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.57.2-11
- rebuilt with rpm-4.8.0-3 (on ppc)

* Tue Feb 02 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-10
- rebuild with rpm-4.8.0

* Fri Aug 21 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.57.2-9
- add %Patch26: fix segfault when changing repository order
  <BTS:VineLinux:0645>
- add %Patch27: fix crash when changing fonts <BTS:VineLinux:0751>

* Sun Aug 09 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.57.2-8
- add %Patch25: add custom filter for multiple verision package
- update Source10: add translation in ja.po
- update Patch24: not to skip multiple version warning dialog

* Sat Jul 11 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.57.2-7
- add Patch24: don't skip taskbar when main window is hidden

* Mon Jun 29 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-6
- add Patch23: fix assertion failure on gtk_widget_hide

* Sun Jun 07 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-5
- add Patch21: fix memory corruption bug.
- add Patch22: convert EUC text to UTF-8

* Mon May 04 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-4
- update ja.po
- don't apply patch12

* Tue Jul 08 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-3
- update pam.d/synaptic for pam-1.0

* Fri May 16 2008 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 0.57.2-2
- add BuildRequires perl-XML-Parser

* Sat May 10 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.57.2-1
- apply new versioning policy
- rebuild with apt-0.5.15lorg3.94a

* Wed Nov 21 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-0vl18
- add "Applications/Accessories" and "Restricted Software" to grouplist
- update ja.po

* Fri Oct 19 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-0vl17
- add Patch2,3,4 to support apt-0.5.15lorg3.93
- renumber Patch16 to Patch1
- add Patch16 to use firefox instead of mozilla

* Sun Oct 14 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-0vl16
- rebuild with apt-0.5.15lorg3.93

* Sun Oct 14 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-0vl15
- rebuild with rpm-4.4.2.2

* Thu May 10 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-0vl14
- rebuild with new environment
- add patch16 to build with gcc4
- add SOURCE30 to use vine icon for package-supported.png

* Sat Apr 28 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-0vl13
- rebuild with vte-0.16

* Sun Nov 05 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-0vl12
- add Patch15 to modify default windows size and treeview font size

* Sun Nov 05 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-0vl11
- add Patch14 to change default upgrade method to normal upgrade
  instead of dist-upgrade.

* Thu Nov 02 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.57.2-0vl10
- update required-version of apt (>= 0.5.15lorg3.2-0vl7)
  - comes from libapt-pkg(MountCdrom) API change

* Fri Oct 27 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-0vl9
- add Patch13 for libapt-pkg(MountCdrom) API change.

* Tue Sep 19 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-0vl8
- add Patch12 to fix broken summary and descriptions on UTF-8 locale.
  - convert rpm summaries and descriptions to UTF-8 from EUC-JP.

* Wed Aug 23 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.57.2-0vl7
- add BuildRequires: scrollkeeper

* Sun May 28 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.57.2-0vl6
- rebuilt with apt-0.5.15org3.1

* Sun May 21 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-0vl5
- add Patch11 to use locale to show help messages instead of utf-8.

* Tue Apr 11 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-0vl4
- rebuild with new apt
- change Group to Applications/Administration

* Sat Feb 11 2006 Yasumichi Akahoshi <yasumichi@vinelinux.org> 0.57.2-0vl3
- update ja.po from [VineSeed:10523] etc...

* Sat Feb 11 2006 Yasumichi Akahoshi <yasumichi@vinelinux.org> 0.57.2-0vl2
- update ja.po

* Fri Dec 16 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 0.57.2-0vl1
- new upstream release
- update ja.po
- build with rpm-4.4

* Sun May 08 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 0.56-0vl1
- new upstream release

* Thu Apr 07 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 0.56-0vl0
- new upstream version (0.56beta)

* Thu Nov 04 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.55.1-0vl1
- new upstream release

* Tue Nov 02 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.55-0vl1
- new upstream release
- update ja.po

* Mon Nov 01 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.53.4-0vl1
- new upstream release
- update ja.po

* Sun Aug 15 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.53-0vl1
- new upstream release
- update ja.po

* Tue Jul 06 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.52-0vl1
- new upstream release

* Fri Jun 25 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.51-0vl3
- do not run automake/autoconf in %%build

* Fri Jun 25 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.51-0vl2
- add japanese man page.

* Wed Jun 23 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.51-0vl1
- new upstream release

* Tue Jun 22 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.50-0vl2
- more update ja.po

* Tue Jun 22 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.50-0vl1
- new upstream release
- update ja.po (merged cvs head)
- add patch10 to fix 'filter' on non-UTF8 locale (merged in cvs head)

* Sat Apr 10 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.48.2-0vl1
- new upstream release
- remove obsolete ja.po that is included in upstream

* Sat Mar 13 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.48.1-0vl1
- new upstream release
- update ja.po
- add BuildRequires: xmlto to build manuals.

* Sat Feb 28 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.48-0vl0.2
- new upstream test release
  - fix desktopfile to use usermode instead of gksu.

* Thu Dec 11 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.47-0vl1
- new upstream release
  - Fixed many i18n issues (thanks to Ales Kapica and Jean-Michel Poure)
  - New Czech, Arabic translation
  - Updated Polish,Spanish,French,Japanese,Chinese,German translation
  - Minor documentation updates
  - Reworked the context menu for packages
  - Some ui improvements in the common tab
  - Use units according to the SI spec now
  - New summary window
  - A lot of minor bug and typo fixes

* Tue Nov 25 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.47-0vl0
- new upstream pre release

* Tue Nov 18 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.46-0vl1
- new upstream release
  - font selection added for default interface font and terminal
  - better support for translated descriptions (thanks johnnybgate)
  - dist-upgrade is gone from the menu, the user is asked what kind of
    upgrade he wants now
  - toolbar has a new style (text beside buttons) now
  - real docbook help added (yeah! thanks SEBASTIAN)
  - "hold" button gone from the gui, moved to menü
  - sections can translated and a more descriptive description is used
  - rpm-src-dir support added (thanks to Panu Matilainen)

* Sun Oct 19 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.45-0vl1
- fixed kanji code in spec file..
- new upstream release
  - proxy can be configured with the gui now
  - new preferences dialog layout (thanks Sebastian Heinlein)
  - new filter dialog layout  (thanks Sebastian Heinlein)
  - when adding filter, they are called "New Filter 1", "New Filter 2" etc
  - added "search lack", so that the interactive search does not start
    immediately
  - new quit dialog
  - speedup for the pattern filters
  - small ui-enhancements in the filter dialog
  - basic support for distribution selection (if you have more than one
    distro in your sources.list, you can choose which to use by default)
  - new about dialog (thanks Sebastian)
  - support to choose between different versions of a given package
  - updated japanese, chinese, polish, spanish, russian, frensh, german
    and italian translations
		
* Wed Sep 24 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.44-0vl1
- new upstream release
  - two alternative main layouts can be choosen now
  - "clean cache now" implemented" in preferences window
  - the search entry in the main window is interactive again
  - much improved preferences dialog (thanks to Sebastian Heinlein)
  - new italian, spanish, russian, chinese translation
  - new belarussian translation
  - improved main window design (thanks Sebastian Heinlein)
  - added "rpm-dir" repository support (thanks Panu)
  - prepeared a lot of strings for better i18n (thanks Jean-Michel POURE)

* Wed Sep 17 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.44-0vl0.pre3
- new upstream snapshot release

* Sun Aug 30 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.43.1-0vl1
- new upstream release
  - the descriptionParser for rpm has changed
    (the actuall parser is configurable now)
  - new find and changes dialog layout, more HIG compliant
  - more bugfixes in the PkgTreeView and the new sorting code

* Tue Aug 12 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.42-0vl1
- new upstream release
  - download percentage is now always calculated correctly
  - save selection on "pin", "update" and "proceed" now
  - some bugs fixed in the new sortable tree/list
  - the order of the columns in the treeview is configurable now
  - updated german/spanish/japanese/russian translation
  - [debian only] debian package tags support
  - sortable installed size column added
  - "Information" tab now scrollable

* Wed Jul 30 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.40-0vl1
- new upstream release

* Tue Jul  8 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.39-0vl2
- remove BuildRequires: libzvt

* Sat Jul  5 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.39-0vl1
- new upstream release
- update ja.po

* Sat Jun 21 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.38-0vl2
- update ja.po

* Sat Jun 21 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.38-0vl1
- new upstream release

* Thu Jun 19 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.37-0vl1
- new upstream release

* Fri Apr 25 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.36.1-0vl1
- new upstream release

* Thu Apr 17 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.36-0vl1
- new upstream release 0.36
- fixed usermode configuration file.

* Tue Apr 15 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.35.1-0vl2
- rebuild with apt-0.5.5.cnc.5-0vl1

* Wed Apr  2 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.35.1-0vl1
- new upstream release 0.35.1
- drop obsolete patch0 which included in upstream.
- add modified synaptic.desktop entry.

* Mon Mar 31 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.35-0vl2
- add patch0 to fix compilation failure on apt-rpm.
- add ja.po and patch10.

* Sun Mar 30 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.35-0vl1
- new upstream release

* Fri Mar 28 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.32-0vl1
- initial release.

