Initial commit
This commit is contained in:
commit
86e06643d6
11 changed files with 244 additions and 0 deletions
21
.SRCINFO
Normal file
21
.SRCINFO
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
pkgbase = nautilus-copy-path
|
||||
pkgdesc = Configurable extension for Nautilus to copy path, URI, or name
|
||||
pkgver = 1.10.2
|
||||
pkgrel = 2
|
||||
url = https://github.com/chr314/nautilus-copy-path
|
||||
install = nautilus-copy-path.install
|
||||
arch = any
|
||||
license = MIT
|
||||
makedepends = git
|
||||
depends = glib2
|
||||
depends = libnautilus-extension
|
||||
depends = python
|
||||
depends = python-gobject
|
||||
depends = python-nautilus
|
||||
backup = usr/share/nautilus-python/extensions/nautilus-copy-path/config.json
|
||||
source = nautilus-copy-path-1.10.2::git+https://github.com/chr314/nautilus-copy-path.git#tag=1.10.2
|
||||
source = fix_error_with_gi.patch
|
||||
b2sums = 5f61d7f747b3cb5508b21111c4152d70ac0e68d00df97753209ba782d4d804a9c5b606c6017cbcd132e6b407305d2a5d3b4c71dd76bab15f2d246e198535542c
|
||||
b2sums = 3711400cd23775a813e1bb24a85610887b981c91106e71ac3d990b76e4f0b9226f63eaee61e3072ce968460c70d90329a998e9b1e6dfee20e88cb42030b27cbc
|
||||
|
||||
pkgname = nautilus-copy-path
|
||||
18
.gitignore
vendored
Normal file
18
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# Ignore everything
|
||||
*
|
||||
|
||||
# But not these files...
|
||||
!.gitignore
|
||||
!PKGBUILD
|
||||
!.SRCINFO
|
||||
!LICENSE
|
||||
!chroot-build
|
||||
!.nvchecker.toml
|
||||
!/keys
|
||||
!/keys/pgp
|
||||
!/keys/pgp/*.asc
|
||||
!/LICENSES
|
||||
!/LICENSES/*.txt
|
||||
!REUSE.toml
|
||||
!*.install
|
||||
!*.patch
|
||||
4
.nvchecker.toml
Normal file
4
.nvchecker.toml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[nautilus-copy-path]
|
||||
source = "git"
|
||||
git = "https://github.com/chr314/nautilus-copy-path.git"
|
||||
prefix = ""
|
||||
12
LICENSE
Normal file
12
LICENSE
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
Copyright Arch Linux Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for
|
||||
any purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL
|
||||
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
|
||||
FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
|
||||
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
|
||||
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
1
LICENSES/0BSD.txt
Symbolic link
1
LICENSES/0BSD.txt
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../LICENSE
|
||||
18
LICENSES/MIT.txt
Normal file
18
LICENSES/MIT.txt
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) <year> <copyright holders>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial
|
||||
portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
|
||||
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
45
PKGBUILD
Normal file
45
PKGBUILD
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
# Maintainer: Łukasz Moroz <lukaszmoroz@gmail.com>
|
||||
|
||||
pkgname=nautilus-copy-path
|
||||
pkgver=1.10.2
|
||||
pkgrel=2
|
||||
pkgdesc="Configurable extension for Nautilus to copy path, URI, or name"
|
||||
arch=('any')
|
||||
url="https://github.com/chr314/$pkgname"
|
||||
license=(
|
||||
MIT
|
||||
)
|
||||
depends=(
|
||||
glib2
|
||||
libnautilus-extension
|
||||
python
|
||||
python-gobject
|
||||
python-nautilus
|
||||
)
|
||||
makedepends=(
|
||||
git
|
||||
)
|
||||
backup=("usr/share/nautilus-python/extensions/$pkgname/config.json")
|
||||
install=$pkgname.install
|
||||
source=(
|
||||
"$pkgname-$pkgver::git+$url.git#tag=$pkgver"
|
||||
'fix_error_with_gi.patch'
|
||||
)
|
||||
b2sums=('5f61d7f747b3cb5508b21111c4152d70ac0e68d00df97753209ba782d4d804a9c5b606c6017cbcd132e6b407305d2a5d3b4c71dd76bab15f2d246e198535542c'
|
||||
'3711400cd23775a813e1bb24a85610887b981c91106e71ac3d990b76e4f0b9226f63eaee61e3072ce968460c70d90329a998e9b1e6dfee20e88cb42030b27cbc')
|
||||
|
||||
prepare() {
|
||||
cd "$pkgname-$pkgver"
|
||||
patch -p1 -i ../fix_error_with_gi.patch
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$pkgname-$pkgver"
|
||||
install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
|
||||
install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
|
||||
install -Dm0644 -t "$pkgdir/usr/share/nautilus-python/extensions" nautilus-copy-path.py
|
||||
install -Dm0644 -t "$pkgdir/usr/share/nautilus-python/extensions/$pkgname" nautilus_copy_path.py config.json translation.py
|
||||
install -Dm0644 -t "$pkgdir/usr/share/nautilus-python/extensions/$pkgname/translations" translations/*.json
|
||||
}
|
||||
|
||||
# vim: set ft=sh ts=4 sw=4 et:
|
||||
30
REUSE.toml
Normal file
30
REUSE.toml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
version = 1
|
||||
|
||||
[[annotations]]
|
||||
path = [
|
||||
"PKGBUILD",
|
||||
"README.md",
|
||||
"keys/**",
|
||||
".SRCINFO",
|
||||
".nvchecker.toml",
|
||||
".gitignore",
|
||||
"*.install",
|
||||
"*.sysusers",
|
||||
"*.tmpfiles",
|
||||
"*.logrotate",
|
||||
"*.pam",
|
||||
"*.service",
|
||||
"*.socket",
|
||||
"*.timer",
|
||||
"*.desktop",
|
||||
"*.hook",
|
||||
]
|
||||
SPDX-FileCopyrightText = "Arch Linux contributors"
|
||||
SPDX-License-Identifier = "0BSD"
|
||||
|
||||
[[annotations]]
|
||||
path = [
|
||||
"*.patch",
|
||||
]
|
||||
SPDX-FileCopyrightText = "nautilus-copy-path contributors"
|
||||
SPDX-License-Identifier = "MIT"
|
||||
65
chroot-build
Executable file
65
chroot-build
Executable file
|
|
@ -0,0 +1,65 @@
|
|||
#!/bin/bash
|
||||
|
||||
# SPDX-FileCopyrightText: Christian Schendel
|
||||
# SPDX-License-Identifier: 0BSD
|
||||
|
||||
set -euo pipefail
|
||||
use_tmpfs=true
|
||||
CHROOT="/tmp/mkarchroot"
|
||||
|
||||
check_available_ram() {
|
||||
if [ "$(awk '/^MemAvailable:/ { print $2; }' /proc/meminfo)" -lt 50000 ]; then
|
||||
use_tmpfs=false
|
||||
fi
|
||||
}
|
||||
|
||||
create_chroot_directory() {
|
||||
if [ $use_tmpfs ]; then
|
||||
sudo mount --mkdir -t tmpfs -o defaults,size=20G tmpfs $CHROOT
|
||||
else
|
||||
sudo mkdir -p "$CHROOT"
|
||||
fi
|
||||
}
|
||||
|
||||
create_chroot_environment() {
|
||||
if [[ ! -d "$CHROOT/root" ]]; then
|
||||
mkarchroot -M ~/.config/pacman/makepkg.conf "$CHROOT/root" base-devel
|
||||
fi
|
||||
}
|
||||
|
||||
build_package(){
|
||||
arch-nspawn "$CHROOT/root" pacman -Syu
|
||||
if makechrootpkg -c -r "$CHROOT" -- -Asf . ; then
|
||||
makepkg --printsrcinfo >.SRCINFO
|
||||
else
|
||||
delete_chroot_environment && echo -e "\n\e[1;31m==> BUILD FAILED: \e[1;37m$CHROOT removed\e[0m " && exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
sign_package(){
|
||||
PACKAGE="$(makepkg --packagelist)"
|
||||
gpg --use-agent --output "$PACKAGE.sig" --detach-sign "$PACKAGE"
|
||||
}
|
||||
|
||||
delete_chroot_environment() {
|
||||
if [ "$(stat -f --format=%T "$CHROOT")" == "btrfs" ]; then
|
||||
{
|
||||
sudo btrfs subvolume delete "$CHROOT/root/var/lib/portables"
|
||||
sudo btrfs subvolume delete "$CHROOT/root/var/lib/machines"
|
||||
sudo btrfs subvolume delete "$CHROOT/root"
|
||||
sudo rm -Rf $CHROOT
|
||||
} >>/dev/null 2>&1
|
||||
elif [ "$(stat -f --format=%T "$CHROOT")" == "tmpfs" ]; then
|
||||
sudo umount -f $CHROOT
|
||||
fi
|
||||
sudo rm -Rf $CHROOT
|
||||
}
|
||||
|
||||
check_available_ram
|
||||
create_chroot_directory
|
||||
create_chroot_environment
|
||||
build_package
|
||||
sign_package
|
||||
delete_chroot_environment
|
||||
|
||||
# vim: set ts=4 sw=4 et:
|
||||
19
fix_error_with_gi.patch
Normal file
19
fix_error_with_gi.patch
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
From bbc7ab347517c3842d9fb99bfae55661ff432450 Mon Sep 17 00:00:00 2001
|
||||
From: = <=>
|
||||
Date: Tue, 26 Nov 2024 10:31:44 +0300
|
||||
Subject: [PATCH] fix error with gi
|
||||
|
||||
---
|
||||
|
||||
diff --git a/nautilus_copy_path.py b/nautilus_copy_path.py
|
||||
index a5e2227..27230ad 100644
|
||||
--- a/nautilus_copy_path.py
|
||||
+++ b/nautilus_copy_path.py
|
||||
@@ -7,6 +7,7 @@
|
||||
import gi
|
||||
|
||||
require_version('Gtk', '4.0')
|
||||
+require_version('Nautilus', '4.0')
|
||||
from gi.repository import Nautilus, GObject, Gtk, Gdk, GLib
|
||||
|
||||
|
||||
11
nautilus-copy-path.install
Normal file
11
nautilus-copy-path.install
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
post_install() {
|
||||
echo "In order for the changes to take effect, please restart Nautilus with 'nautilus -q'"
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
post_install
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue