# Conditional for release and snapshot builds. Uncomment for release-builds.
%global rel_build 1
# This is needed, because src-url contains branched part of versioning-scheme.
%global branch 1.7
# Settings used for build from snapshots.
%{!?rel_build:%global commit 298c7255b82986eeba72fff06f59479deae0b9d0}
%{!?rel_build:%global commit_date 20131201}
%{!?rel_build:%global shortcommit %(c=%{commit};echo ${c:0:7})}
%{!?rel_build:%global git_ver git%{commit_date}-%{shortcommit}}
%{!?rel_build:%global git_rel .git%{commit_date}.%{shortcommit}}
%{!?rel_build:%global git_tar %{name}-%{version}-%{git_ver}.tar.xz}
Name: caja-extensions
Summary: Set of extensions for caja file manager
Version: %{branch}.1
Release: 1%{?dist}
#Release: 0.4%{?git_rel}%{?dist}
License: GPLv2+
URL: http://mate-desktop.org
# for downloading the tarball use 'spectool -g -R caja.spec'
# Source for release-builds.
%{?rel_build:Source0: http://pub.mate-desktop.org/releases/%{branch}/%%{name}-%%{version}.tar.xz}
# Source for snapshot-builds.
%{!?rel_build:Source0: http://git.mate-desktop.org/%{name}/snapshot/%{name}-%{commit}.tar.xz#/%{git_tar}}
Source1: caja-share-setup-instructions
Source2: caja-share-smb.conf.example
Patch1: caja-extensions_use-beesu-command-for-gksu.patch
BuildRequires: mate-common
%if 0%{?fedora} > 20
BuildRequires: caja-devel
%else
BuildRequires: mate-file-manager-devel
%endif
BuildRequires: mate-desktop-devel
BuildRequires: dbus-glib-devel
BuildRequires: gtk2-devel
BuildRequires: gupnp-devel
%description
Extensions for the caja file-browser, open-terminal,
image-converter, sendto and share
%package common
Summary: Common files for %{name}
BuildArch: noarch
%description common
%{summary}.
%package -n caja-image-converter
Summary: MATE file manager image converter extension
Requires: %{name}-common = %{version}-%{release}
Requires: ImageMagick
Provides: mate-file-manager-image-converter%{?_isa} = %{version}-%{release}
Provides: mate-file-manager-image-converter = %{version}-%{release}
Obsoletes: mate-file-manager-image-converter < %{version}-%{release}
%description -n caja-image-converter
The caja-image-converter extension allows you to
re-size/rotate images from Caja.
%package -n caja-open-terminal
Summary: Mate-file-manager extension for an open terminal shortcut
Requires: %{name}-common = %{version}-%{release}
Provides: mate-file-manager-open-terminal%{?_isa} = %{version}-%{release}
Provides: mate-file-manager-open-terminal = %{version}-%{release}
Obsoletes: mate-file-manager-open-terminal < %{version}-%{release}
%description -n caja-open-terminal
The caja-open-terminal extension provides a right-click "Open
Terminal" option for mate-file-manager users who prefer that option.
%package -n caja-sendto
Summary: MATE file manager sendto
Requires: %{name}-common = %{version}-%{release}
Provides: mate-file-manager-sendto%{?_isa} = %{version}-%{release}
Provides: mate-file-manager-sendto = %{version}-%{release}
Obsoletes: mate-file-manager-sendto < %{version}-%{release}
%description -n caja-sendto
The caja-sendto extension provides 'send to' functionality
to the MATE Desktop file-manager, Caja.
%package -n caja-sendto-devel
Summary: Development libraries and headers for caja-sendto
Requires: %{name}-common = %{version}-%{release}
Requires: caja-sendto%{?_isa} = %{version}-%{release}
Provides: mate-file-manager-sendto-devel%{?_isa} = %{version}-%{release}
Provides: mate-file-manager-sendto-devel = %{version}-%{release}
Obsoletes: mate-file-manager-sendto-devel < %{version}-%{release}
%description -n caja-sendto-devel
Development libraries and headers for caja-sendto
%package -n caja-share
Summary: Easy sharing folder via Samba (CIFS protocol)
Requires: %{name}-common = %{version}-%{release}
Requires: samba
Provides: mate-file-manager-share%{?_isa} = %{version}-%{release}
Provides: mate-file-manager-share = %{version}-%{release}
Obsoletes: mate-file-manager-share < %{version}-%{release}
%description -n caja-share
Caja extension designed for easier folders
sharing via Samba (CIFS protocol) in *NIX systems.
%package -n caja-beesu
Summary: MATE file manager beesu
Requires: %{name}-common = %{version}-%{release}
Requires: beesu
%description -n caja-beesu
Caja beesu extension for open files as superuser
%prep
%setup -q%{!?rel_build:n %{name}-%{commit}}
%patch1 -p1 -b .beesu
cp %{SOURCE1} SETUP
# needed for git snapshots
#NOCONFIGURE=1 ./autogen.sh
%build
%configure \
--disable-schemas-compile \
--with-gtk=2.0 \
--enable-image-converter \
--enable-open-terminal \
--enable-sendto \
--enable-share \
--enable-gksu \
--disable-static
make %{?_smp_mflags} V=1
%install
%{make_install}
find %{buildroot} -name '*.la' -exec rm -f {} ';'
find %{buildroot} -name '*.a' -exec rm -f {} ';'
mkdir -p %{buildroot}/%{_sysconfdir}/samba/
cp %{SOURCE2} %{buildroot}/%{_sysconfdir}/samba/
# remove needless gsettings convert files
rm -f %{buildroot}%{_datadir}/MateConf/gsettings/caja-sendto-convert
rm -f %{buildroot}%{_datadir}/MateConf/gsettings/caja-open-terminal.convert
%find_lang %{name} --with-gnome --all-name
%postun -n caja-open-terminal
if [ $1 -eq 0 ] ; then
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
fi
%posttrans -n caja-open-terminal
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%postun -n caja-sendto
if [ $1 -eq 0 ] ; then
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
fi
%posttrans -n caja-sendto
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%files common -f %{name}.lang
%doc AUTHORS COPYING README SETUP
%dir %{_datadir}/caja-extensions
%files -n caja-image-converter
%{_libdir}/caja/extensions-2.0/libcaja-image-converter.so
%{_datadir}/caja-extensions/caja-image-resize.ui
%{_datadir}/caja-extensions/caja-image-rotate.ui
%files -n caja-open-terminal
%{_libdir}/caja/extensions-2.0/libcaja-open-terminal.so
%{_datadir}/glib-2.0/schemas/org.mate.caja-open-terminal.gschema.xml
%files -n caja-sendto
%{_bindir}/caja-sendto
%dir %{_libdir}/caja-sendto
%dir %{_libdir}/caja-sendto/plugins
%{_libdir}/caja-sendto/plugins/libnstburn.so
%{_libdir}/caja-sendto/plugins/libnstemailclient.so
%{_libdir}/caja-sendto/plugins/libnstgajim.so
%{_libdir}/caja-sendto/plugins/libnstpidgin.so
%{_libdir}/caja-sendto/plugins/libnstremovable_devices.so
%{_libdir}/caja-sendto/plugins/libnstupnp.so
%{_libdir}/caja/extensions-2.0/libcaja-sendto.so
%{_datadir}/glib-2.0/schemas/org.mate.Caja.Sendto.gschema.xml
%{_datadir}/caja-extensions/caja-sendto.ui
%dir %{_datadir}/gtk-doc/html/caja-sendto
%{_datadir}/gtk-doc/html/caja-sendto/*
%{_mandir}/man1/caja-sendto.1.gz
%files -n caja-sendto-devel
%dir %{_includedir}/caja-sendto
%{_includedir}/caja-sendto/caja-sendto-plugin.h
%{_libdir}/pkgconfig/caja-sendto.pc
%files -n caja-share
%config %{_sysconfdir}/samba/caja-share-smb.conf.example
%{_libdir}/caja/extensions-2.0/libcaja-share.so
%{_datadir}/caja-extensions/share-dialog.ui
%files -n caja-beesu
%{_libdir}/caja/extensions-2.0/libcaja-gksu.so
%changelog
* Fri Jan 24 2014 Wolfgang Ulbrich <chat-to-me@raveit.de> - 1.7.1-1
- update to 1.7.1
- add --with-gnome --all-name for find language
* Thu Dec 18 2013 Wolfgang Ulbrich <chat-to-me@raveit.de> - 1.7.0-0.4.git20131201.298c725
- make Maintainers life easier and use better git snapshot usage, Thanks to Björn Esser
- fix provides/obsoletes
* Sat Dec 14 2013 Wolfgang Ulbrich <chat-to-me@raveit.de> - 1.7.0-0.3.git298c725
- remove isa tags from obsoletes/provides
* Fri Dec 06 2013 Wolfgang Ulbrich <chat-to-me@raveit.de> - 1.7.1-0.2.git298c725
- fix all the macro-in-comment warnings
- add versioned provides for the obsoleted packages
- remove NEWS, zero-length
- fix spelling-errors
* Thu Dec 05 2013 Wolfgang Ulbrich <chat-to-me@raveit.de> - 1.7.1-0.1.git298c725
- initial build for fedora rawhide (f21)
- this package obsoletes mate-file-manager-image-converter,
- mate-file-manager-open-terminal, mate-file-manager-sendto,
- mate-file-manager-share
- add new extension caja-beesu