Last active
May 11, 2018 11:52
-
-
Save davidovitch/1d7b0a3b0918d83d87c8bf5a9fe0b79a to your computer and use it in GitHub Desktop.
AUR nautilus-compare for python3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Pieter Goetschalckx <3.14.e.ter at gmail dot com> | |
pkgname=nautilus-compare | |
pkgver=0.0.5 | |
pkgrel=2 | |
pkgdesc='Simple context menu file comparison extension for Nautilus 3 and above.' | |
arch=('any') | |
url="http://launchpad.net/nautilus-compare/" | |
license=('GPL3') | |
depends=('python' 'nautilus' 'python-nautilus' 'python-xdg') | |
optdepends=('meld' 'kdiff3' 'diffuse' 'kompare' 'fldiff' 'tkdiff') | |
source=("https://launchpad.net/$pkgname/trunk/$pkgver/+download/$pkgname-$pkgver.tar.gz") | |
sha256sums=('16b52d8814d4aa41590d57f5390c6c5de7ecd5d91da9a47d80d9403bcc29c7a4') | |
prepare() { | |
cd "$pkgname-$pkgver" | |
# No need to point to python2 | |
#sed -i "s#/usr/bin/python#/usr/bin/python2#" src/*.py | |
} | |
package() { | |
cd "$pkgname-$pkgver" | |
install -dm755 "$pkgdir"/usr{/bin,/share/nautilus-python/extensions} | |
# this is a hack, but for now it works: use 2to3 to automagically make the | |
# source Python3 compliant | |
2to3 -wn src | |
chmod +x src/nautilus-compare.py | |
chmod +x src/nautilus-compare-preferences.py | |
cp -r src "$pkgdir/usr/share/nautilus-compare" | |
ln -s /usr/share/nautilus-compare/nautilus-compare.py "$pkgdir/usr/share/nautilus-python/extensions/nautilus-compare.py" | |
ln -s /usr/share/nautilus-compare/nautilus-compare-preferences.py "$pkgdir/usr/bin/nautilus-compare-preferences" | |
install -Dm644 data/nautilus-compare-preferences.desktop "$pkgdir/usr/share/applications/nautilus-compare-preferences.desktop" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment