diff --git a/.gitignore b/.gitignore index e69de29..f540a03 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/caja-extensions-1.7.1-git20131201-298c725.tar.xz diff --git a/caja-extensions.spec b/caja-extensions.spec new file mode 100644 index 0000000..41e5803 --- /dev/null +++ b/caja-extensions.spec @@ -0,0 +1,230 @@ +# 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: 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 +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} + + +%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 +* Thu Dec 18 2013 Wolfgang Ulbrich - 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 - 1.7.0-0.3.git298c725 +- remove isa tags from obsoletes/provides + +* Fri Dec 06 2013 Wolfgang Ulbrich - 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 - 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 + diff --git a/caja-extensions_use-beesu-command-for-gksu.patch b/caja-extensions_use-beesu-command-for-gksu.patch new file mode 100644 index 0000000..910ff9e --- /dev/null +++ b/caja-extensions_use-beesu-command-for-gksu.patch @@ -0,0 +1,12 @@ +diff -upr caja-extensions-298c725-orig/gksu/libcaja-gksu.c caja-extensions-298c725/gksu/libcaja-gksu.c +--- caja-extensions-298c725-orig/gksu/libcaja-gksu.c 2013-11-03 16:10:13.000000000 +0100 ++++ caja-extensions-298c725/gksu/libcaja-gksu.c 2013-12-05 21:48:00.929591101 +0100 +@@ -159,7 +159,7 @@ start_gksu_thread (void *data) + gchar **argv = (gchar**) g_malloc (sizeof (gchar*) * 3); + gchar *full_cmd = (gchar*) data; + +- argv[0] = g_strdup ("gksu"); ++ argv[0] = g_strdup ("beesu"); + argv[1] = full_cmd; + argv[2] = NULL; + diff --git a/caja-share-setup-instructions b/caja-share-setup-instructions new file mode 100644 index 0000000..ec2fe02 --- /dev/null +++ b/caja-share-setup-instructions @@ -0,0 +1,39 @@ +== ENGLISH == + +First, edit you /etc/samba/smb.conf, ie. by replacing all content by /etc/samba/nautilus-share-smb.conf.example. Remember to change "#YOUR WORKGROUP" to your real workgroup and "#YOUR GUEST ACCOUNT" to selected guest account (you can also disable it). + +Then use few commands to make samba ready to support usershares (create directory, create special group, set owner(s) and permissions, add user(s) to the group). + +Ensure Samba services (smb, nmb, winbind) are disabled. + +$ export USERSHARES_DIR="/var/lib/samba/usershare" +$ export USERSHARES_GROUP="samba" + +$ mkdir -p ${USERSHARES_DIR} +$ groupadd ${USERSHARES_GROUP} +$ chown root:${USERSHARES_GROUP} ${USERSHARES_DIR} +$ chmod 01770 ${USERSHARES_DIR} + +$ usermod -a -G ${USERSHARES_GROUP} CHOOSED_USERNAME + +Do not forget to reboot system (safest method to make Samba work, if runned at startup). Sometimes "/sbin/service NAME restart" for Samba services doesn't work well (wanted effect is not given). + +== POLISH == + +Po pierwsze, edytuj /etc/samba/smb.conf, np. zastępując całą zawartość plikiem /etc/samba/nautilus-share-smb.conf.example. Pamiętaj, by zmienić "#YOUR WORKGROUP" na własną grupę roboczą i "#YOUR GUEST ACCOUNT" na wybrane konto gościa (możesz je również wyłączyć). + +Następnie wykonaj kilka komend, by włączyć obsługę mechanizmu udostępniania przez użytkowników. (utwórz katalog, utwórz specjalną grupę, ustaw właściciela(ów) i uprawnienia, dodaj użytkownika(ów) do grupy). + +Upewnij się, że usługi Samby (smb, nmb, winbind) są wyłączone. + +$ export USERSHARES_DIR="/var/lib/samba/usershare" +$ export USERSHARES_GROUP="samba" + +$ mkdir -p ${USERSHARES_DIR} +$ groupadd ${USERSHARES_GROUP} +$ chown root:${USERSHARES_GROUP} ${USERSHARES_DIR} +$ chmod 01770 ${USERSHARES_DIR} + +$ usermod -a -G ${USERSHARES_GROUP} WYBRANA_NAZWA_UŻYTKOWNIKA + +Nie zapomnij ponownie uruchomić systemu (najbezpieczniejsza metoda do uruchomienia Samby, jeśli uruchamiana na starcie). Czasami zdarza się, że "/sbin/service NAZWA restart" dla usług Samby nie daje efektu. diff --git a/caja-share-smb.conf.example b/caja-share-smb.conf.example new file mode 100644 index 0000000..1e7627d --- /dev/null +++ b/caja-share-smb.conf.example @@ -0,0 +1,9 @@ +[global] +workgroup = #YOUR WORKGROUP HERE +security = share + +usershare path = /var/lib/samba/usershare +usershare max shares = 100 +usershare allow guests = yes +usershare owner only = yes +guest account = #YOUR GUEST ACCOUNT diff --git a/sources b/sources index e69de29..5984e4a 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +7d513f7c5b9c7092943f9a5fffc20ad6 caja-extensions-1.7.1-git20131201-298c725.tar.xz