caja-admin:new package

This commit is contained in:
2020-03-19 00:25:02 +03:00
parent 1e34d68f93
commit d833e69fdc
12 changed files with 227879 additions and 227523 deletions
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import cmaketools
from pisi.actionsapi import get
def setup():
shelltools.makedirs("build")
shelltools.cd("build")
cmaketools.configure("-DCMAKE_INSTALL_PREFIX=/usr", sourceDir="..")
def build():
shelltools.cd("build")
cmaketools.make("..")
def install():
shelltools.cd("build")
cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
shelltools.cd("..")
pisitools.dodoc("AUTHORS", "LICENSE", "NEWS")
@@ -0,0 +1,42 @@
cmake_minimum_required(VERSION 2.6)
project(CajaAdmin NONE)
find_package(Gettext REQUIRED)
# Configurable paths
set(PKEXEC_PATH "/usr/bin/pkexec" CACHE FILEPATH "pkexec program path.")
set(CAJA_PATH "/usr/bin/caja" CACHE FILEPATH "caja program path.")
set(PLUMA_PATH "/usr/bin/pluma" CACHE FILEPATH "pluma program path.")
set(TERMINAL_PATH "/usr/bin/mate-terminal" CACHE FILEPATH "mate-terminal program path.")
# Configure files
configure_file(extension/caja-admin.py.in
extension/caja-admin.py)
configure_file(polkit/org.freedesktop.caja-admin.policy.in
polkit/org.freedesktop.caja-admin.policy)
# Update and compile the translations
gettext_create_translations(po/caja-admin.pot ALL
po/ar.po
po/de.po
po/es.po
po/fr.po
po/it.po
po/lt.po
po/pl.po
po/pt.po
po/ru.po
po/sk.po
po/tr.po
po/zh_CN.po)
# Install target
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/polkit/org.freedesktop.caja-admin.policy"
DESTINATION /usr/share/polkit-1/actions)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/extension/caja-admin.py"
DESTINATION /usr/share/caja-python/extensions)
# Uninstall target
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake" IMMEDIATE @ONLY)
add_custom_target(uninstall COMMAND ${CMAKE_COMMAND}
-P ${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake)
@@ -0,0 +1,41 @@
cmake_minimum_required(VERSION 2.6)
project(CajaAdmin NONE)
find_package(Gettext REQUIRED)
# Configurable paths
set(PKEXEC_PATH "/usr/bin/pkexec" CACHE FILEPATH "pkexec program path.")
set(CAJA_PATH "/usr/bin/caja" CACHE FILEPATH "caja program path.")
set(PLUMA_PATH "/usr/bin/pluma" CACHE FILEPATH "pluma program path.")
set(TERMINAL_PATH "/usr/bin/mate-terminal" CACHE FILEPATH "mate-terminal program path.")
# Configure files
configure_file(extension/caja-admin.py.in
extension/caja-admin.py)
configure_file(polkit/org.freedesktop.caja-admin.policy.in
polkit/org.freedesktop.caja-admin.policy)
# Update and compile the translations
gettext_create_translations(po/caja-admin.pot ALL
po/ar.po
po/de.po
po/es.po
po/fr.po
po/it.po
po/lt.po
po/pl.po
po/pt.po
po/ru.po
po/sk.po
po/zh_CN.po)
# Install target
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/polkit/org.freedesktop.caja-admin.policy"
DESTINATION /usr/share/polkit-1/actions)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/extension/caja-admin.py"
DESTINATION /usr/share/caja-python/extensions)
# Uninstall target
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake" IMMEDIATE @ONLY)
add_custom_target(uninstall COMMAND ${CMAKE_COMMAND}
-P ${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake)
@@ -0,0 +1,10 @@
--- CMakeLists_old.txt 2017-08-16 18:55:41.000000000 +0300
+++ CMakeLists.txt 2020-03-19 00:11:06.074179576 +0300
@@ -26,6 +26,7 @@
po/pt.po
po/ru.po
po/sk.po
+ po/tr.po
po/zh_CN.po)
# Install target
@@ -0,0 +1,34 @@
diff -Nuar a/extension/caja-admin.py.in b/extension/caja-admin.py.in
--- a/extension/caja-admin.py.in 2017-08-16 18:55:41.000000000 +0300
+++ b/extension/caja-admin.py.in 2020-03-18 23:41:45.604050174 +0300
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-import os, subprocess, urlparse, traceback
+import os, subprocess, traceback
from gi.repository import Caja, GObject, Gtk, GLib
from gettext import gettext, locale, bindtextdomain, textdomain
@@ -154,9 +154,7 @@
def _is_executable(self, file):
"""Returns whether the current user can execute the given file."""
try:
- uri = file.get_uri()
- p = urlparse.urlparse(uri)
- path = os.path.abspath(os.path.join(p.netloc, p.path))
+ path = file.get_location().get_path()
return os.access(path,os.X_OK)
except:
return False
@@ -165,9 +163,7 @@
"""'Run as Administrator' menu item callback."""
if self._show_warning_dialog():
try:
- uri = file.get_uri()
- p = urlparse.urlparse(uri)
- path = os.path.abspath(os.path.join(p.netloc, p.path))
+ path = file.get_location().get_path()
#is_app = not os.path.splitext(path)[-1]
cmd = [PKEXEC_PATH]
#cmd +=['env','DISPLAY='+os.environ['DISPLAY'],'XAUTHORITY='+os.environ['XAUTHORITY']]
+67
View File
@@ -0,0 +1,67 @@
# Copyright (C) YEAR Bruno Nova <brunomb.nova@gmail.com>
# This file is distributed under the same license as the caja-admin package.
#
# Ayhan Yalçınsoy <ayhanyalcinsoy@pisilinux.org>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: caja-admin 0.2.0\n"
"Report-Msgid-Bugs-To: https://github.com/infirit/caja-admin/issues\n"
"POT-Creation-Date: 2016-06-22 22:47+0100\n"
"PO-Revision-Date: 2020-03-19 00:02+0300\n"
"Last-Translator: Ayhan Yalçınsoy <ayhanyalcinsoy@pisilinux.org>\n"
"Language-Team: Turkish <kde-l10n-tr@kde.org>\n"
"Language: tr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Lokalize 19.08.1\n"
#: extension/caja-admin.py:122
msgid "CAUTION!"
msgstr "DİKKAT!"
#: extension/caja-admin.py:104
msgid "Edit as A_dministrator"
msgstr "Yönetici Olarak Düzenle"
#: extension/caja-admin.py:88
msgid "Open as A_dministrator"
msgstr "Yönetici Olarak Aç"
#: extension/caja-admin.py:105
msgid "Open this file in the text editor with root privileges"
msgstr "Bu dosyayı metin editöründe root yetkisi ile aç"
#: extension/caja-admin.py:89
msgid "Open this folder with root privileges"
msgstr "Bu dizini root yetkisiyle aç"
#: extension/caja-admin.py:96
msgid "Run as A_dministrator"
msgstr "Yönetici Olarak Çalıştır"
#: extension/caja-admin.py:97
msgid "Run this file with root privileges"
msgstr "Bu dosyayı root yetkisiyle çalıştır"
#: extension/caja-admin.py:123
msgid ""
"Running the File Manager, the Text Editor or an executable with "
"Administrator privileges <b>is dangerous</b>! <b>You can easily destroy your "
"system if you are not careful!</b>\n"
"<b>Think twice</b> before doing so, especially before running untrusted "
"executables downloaded from the Internet. <b>They can contain malware</b>, "
"which can do <b>irreversible damage to your system</b> when given "
"Administrator privileges!\n"
"Proceed only if you know what you are doing and understand the risks."
msgstr ""
"Yönetici yetkisiyle Dosya Yöneticisi, Metin Düzenleyici çalıştırmak ya da bir "
"dosya çalıştırmak <b>tehlikelidir</b>! <b>Eğer dikkatli olmazsanız kolaylıkla "
"sisteminize zarar verebilirsiniz!</b>\n"
"Özellikle, internetten güvenli olmayan bir kaynaktan çalıştırılabilir bir"
" dosya "
"indirmek gibi şeyler yaparken <b>iki kez düşünün</b>. Bu dosyalar yönetici "
"yetkisin verildiğinde <b>sisteminize telafi edemeyeceğiniz zararlar</b> veren "
"<b>malware</b> içerebilir!\n"
"Sadece ne yaptığınızı biliyor ve riskleri anlıyorsanız devam edin."
+53
View File
@@ -0,0 +1,53 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "https://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>caja-admin</Name>
<Homepage>https://github.com/infirit/caja-admin</Homepage>
<Packager>
<Name>Ayhan Yalçınsoy</Name>
<Email>ayhanyalcinsoy@pisilinux.org</Email>
</Packager>
<License>GPLv3</License>
<IsA>app:gui</IsA>
<Summary>Caja Admin is a simple Python extension for the Caja file manager.</Summary>
<Description>Caja Admin is a simple Python extension for the Caja file manager that adds some administrative actions to the right-click menu.</Description>
<Archive sha1sum="ae7d87985aa6ce6aab474c446aea12dafa89e9e1" type="targz">https://github.com/infirit/caja-admin/archive/0.0.1.tar.gz</Archive>
<AdditionalFiles>
<AdditionalFile target="po/tr.po">tr.po</AdditionalFile>
</AdditionalFiles>
<BuildDependencies>
<Dependency>python3-devel</Dependency>
<Dependency>python-caja</Dependency>
<Dependency>extra-cmake-modules</Dependency>
</BuildDependencies>
<Patches>
<Patch>python3_support.patch</Patch>
<Patch>added_tr.patch</Patch>
</Patches>
</Source>
<Package>
<Name>caja-admin</Name>
<RuntimeDependencies>
<Dependency>python-caja</Dependency>
<Dependency>mate-terminal</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="data">/usr/share/caja-python</Path>
<Path fileType="data">/usr/share/doc</Path>
<Path fileType="localedata">/usr/share/locale</Path>
<Path fileType="data">/usr/share/polkit-1</Path>
</Files>
</Package>
<History>
<Update release="1">
<Date>2020-03-18</Date>
<Version>0.0.1</Version>
<Comment>First release</Comment>
<Name>Ayhan Yalçınsoy</Name>
<Email>ayhanyalcinsoy@pisilinux.org</Email>
</Update>
</History>
</PISI>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>caja-admin</Name>
<Summary xml:lang="tr">Caja-admin Caja dosya yöneticisi için içerik menüsünde bazı yetkili kullanıcı eylemleri sunar</Summary>
<Description xml:lang="tr">Caja-admin Caja dosya yöneticisi için içerik menüsünde bazı yetkili kullanıcı eylemleri sunar</Description>
</Source>
</PISI>
+227595 -227521
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1 +1 @@
aee23ee58665b918bfb0a4a46689499aea7063ee
a4c96df8cd34f33fd2379970ba350e7f77cfece3
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
6e3c8835d570ed618510dd026f6e31c9c4fa0362
ce19fd5303acae49b4d8c04170b80ffc28a33b03