adb72cf
# Multiple files refers to the name "4Pane", not "4pane", so
adb72cf
# let's use 4Pane as %%{name}
adb72cf
adb72cf
# Explicitly declare this, as this package
adb72cf
# really expects this
adb72cf
# (expanded afterwards, use %%define)
adb72cf
%define	_docdir_fmt	%{NAME}
adb72cf
adb72cf
Name:			4Pane
0335169
Version:		4.0
ad06ca5
Release:		1%{?dist}
adb72cf
Summary:		Multi-pane, detailed-list file manager
adb72cf
adb72cf
License:		GPLv3
adb72cf
URL:			http://www.4pane.co.uk/
adb72cf
Source0:		http://downloads.sourceforge.net/fourpane/4pane-%{version}.tar.gz
adb72cf
adb72cf
BuildRequires:	bzip2-devel
adb72cf
BuildRequires:	xz-devel
adb72cf
BuildRequires:	wxGTK3-devel
0335169
BuildRequires:  %{_bindir}/desktop-file-install
0335169
BuildRequires:  %{_bindir}/appstream-util
5350dd7
BuildRequires:	git
adb72cf
adb72cf
%description
adb72cf
4Pane is a multi-pane, detailed-list file manager. It is designed
adb72cf
to be fully-featured without bloat, and aims for speed rather than
adb72cf
visual effects.
adb72cf
In addition to standard file manager things, it offers multiple
adb72cf
undo and redo of most operations (including deletions), archive
adb72cf
management including 'virtual browsing' inside archives, multiple
adb72cf
renaming/duplication of files, a terminal emulator and user-defined
adb72cf
tools.
adb72cf
adb72cf
%prep
adb72cf
%setup -q -n 4pane-%{version}
5350dd7
0335169
%if 0
5350dd7
cat > .gitignore <
5350dd7
configure
5350dd7
config.guess
5350dd7
config.sub
5350dd7
aclocal.m4
5350dd7
config.h.in
5350dd7
EOF
5350dd7
5350dd7
git init
5350dd7
git config user.email "4Pane-owner@fedoraproject.org"
5350dd7
git config user.name "4Pane owners"
5350dd7
git add .
5350dd7
git commit -m "base" -q
0335169
%endif
5350dd7
0335169
sed -i.cflags configure \
0335169
	-e '\@[ \t]\{5,\}C.*FLAGS[ \t]*=[ \t]*$@d'
adb72cf
adb72cf
%build
adb72cf
export WX_CONFIG_NAME=wx-config-3.0
adb72cf
export EXTRA_CXXFLAGS="%{optflags}"
adb72cf
adb72cf
# --without-builtin_bzip2 means using system bzip2
adb72cf
%configure\
adb72cf
	--disable-desktop \
98662dd
	--without-builtin_bzip2 || \
98662dd
	{ sleep 5 ; cat config.log ; sleep 10 ; exit 1; }
adb72cf
make %{?_smp_mflags}
adb72cf
adb72cf
%install
adb72cf
%make_install \
adb72cf
	INSTALL="install -p"
adb72cf
adb72cf
# Some manual installation
adb72cf
mkdir -p %{buildroot}%{_datadir}/applications
adb72cf
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/{48x48,32x32}/apps
adb72cf
adb72cf
install -cpm 644 rc/%{name}.desktop %{buildroot}%{_datadir}/applications/
adb72cf
install -cpm 644 bitmaps/%{name}Icon32.xpm %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}.xpm
adb72cf
install -cpm 644 bitmaps/%{name}Icon48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
adb72cf
a66d456
mkdir -p %{buildroot}%{_mandir}/man1
a66d456
install -cpm 644 4Pane.1 %{buildroot}%{_mandir}/man1/
a66d456
0335169
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
0335169
appstream-util validate-relax --nonet \
0335169
        %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
0335169
adb72cf
%find_lang %{name}
adb72cf
adb72cf
# Once remove document and let %%doc re-install them
adb72cf
rm -rf %{buildroot}%{_docdir}/%{name}
adb72cf
adb72cf
%post
adb72cf
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
adb72cf
adb72cf
%postun
adb72cf
if [ $1 -eq 0 ] ; then
adb72cf
	touch --no-create %{_datadir}/icons/hicolor &>/dev/null
adb72cf
	gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
adb72cf
fi
adb72cf
adb72cf
%posttrans
adb72cf
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
adb72cf
adb72cf
%files -f %{name}.lang
adb72cf
%license	LICENCE
adb72cf
%doc	doc/*
adb72cf
%doc	README
adb72cf
%doc	changelog
adb72cf
adb72cf
%{_bindir}/4pane
adb72cf
%{_bindir}/%{name}
adb72cf
a66d456
%{_mandir}/man1/%{name}.1*
a66d456
%{_datadir}/appdata/%{name}.appdata.xml
a66d456
adb72cf
%{_datadir}/%{name}/
adb72cf
%{_datadir}/applications/%{name}.desktop
adb72cf
%{_datadir}/icons/hicolor/*/apps/%{name}*
adb72cf
adb72cf
%changelog
0335169
* Thu Apr 07 2016 Mamoru TASAKA <mtasaka@fedoraproject.org> - 4.0-1
0335169
- 4.0
0335169
- Enable hardened build again
0335169
5cd0706
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-9
5cd0706
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
5cd0706
9fb68b5
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-8
9fb68b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
9fb68b5
98662dd
* Mon May  4 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0-7
98662dd
- Kill hardened build, does not build
98662dd
5350dd7
* Mon Dec 22 2014 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0-6
5350dd7
- Patch for toolbar issue, requested by the upstream
5350dd7
9e54726
* Sun Dec 21 2014 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0-5
9e54726
- Add man page, appdata (on F-21+)
a66d456
adb72cf
* Thu Dec 11 2014 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0-3
adb72cf
- Replace Patch0 with the one revised by the upstream
adb72cf
adb72cf
* Wed Dec 10 2014 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0-2
adb72cf
- Patch to fix crash with managing bookmark on non-English
adb72cf
  locale (sourceforge 767206)
adb72cf
adb72cf
* Tue Dec  9 2014 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0-1
adb72cf
- Initial package