File doublecmd-gtk.spec of Package doublecmd
# norootforbuild
%define doublecmd doublecmd
Name: doublecmd-gtk
Summary: Twin-panel (commander-style) file manager (GTK2)
Version: 1.1.0
Release: 1
URL: http://doublecmd.sourceforge.net
Source0: %{doublecmd}-%{version}.tar.gz
License: GPL
Group: Applications/File
BuildRequires: fpc >= 2.6.0 fpc-src glib2-devel gtk2-devel lazarus >= 1.0.0
%if 0%{?mandriva_version}
BuildRequires: libdbus-1-devel libbzip2-devel
%endif
%if 0%{?fedora_version} || 0%{?rhel}
BuildRequires: dbus-devel bzip2-devel
%endif
%if 0%{?suse_version} >= 1110
BuildRequires: dbus-1-devel libbz2-devel polkit libicu-devel
%endif
Provides: doublecmd
Conflicts: doublecmd-qt
BuildRoot: %{_tmppath}/%{doublecmd}-%{version}-build
%define debug_package %{nil}
%description
Double Commander is a cross platform open source file manager with two panels side by side.
It is inspired by Total Commander and features some new ideas.
%prep
%setup -q -n %{doublecmd}-%{version}
%build
# Get revision number
declare $(echo %{version} | awk -v FS="(+svn|+git)" '{print "REVISION="$2+1" COMMIT="$3}')
# Update dcrevision.inc
echo "// Created by Git2RevisionInc" > src/dcrevision.inc
echo "const dcRevision = '$REVISION';" >> src/dcrevision.inc
echo "const dcCommit = '$COMMIT';" >> src/dcrevision.inc
./build.sh beta gtk2
%install
install/linux/install.sh --install-prefix=%{buildroot}
stat %{buildroot}/usr/share/doublecmd/pixmaps/dctheme
stat %{buildroot}/usr/share/doublecmd/pixmaps/dctheme/icon-theme.cache
touch -t 201006110400 %{buildroot}/usr/share/doublecmd/pixmaps/dctheme
stat %{buildroot}/usr/share/doublecmd/pixmaps/dctheme
%post
touch -r %{_datadir}/doublecmd/pixmaps/dctheme %{_datadir}/doublecmd/pixmaps/dctheme/icon-theme.cache
%clean
echo "+++CLEAN"
stat %{buildroot}/usr/share/doublecmd/pixmaps/dctheme/icon-theme.cache
[ %{buildroot} != "/" ] && ( rm -rf %{buildroot} )
%files
%defattr(-,root,root)
%{_libdir}/%{doublecmd}
%{_bindir}/%{doublecmd}
%{_datadir}/%{doublecmd}
%{_datadir}/man/man1/%{doublecmd}.*
%{_datadir}/pixmaps/%{doublecmd}.*
%{_datadir}/applications/%{doublecmd}.desktop
%{_datadir}/polkit-1/actions/org.doublecmd.root.policy
%{_datadir}/icons/hicolor/scalable/apps/%{doublecmd}.svg
%changelog
* Fri Jun 11 2010 - Alexander Koblov <Alexx2000@mail.ru>
- Initial package, version 0.4.6