msys2 / MSYS2-packages

Package scripts for MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
1.3k stars 490 forks source link

PKGBUILDs for perl-rename and autojump... would adding these be possible? #574

Open EdenWise opened 8 years ago

EdenWise commented 8 years ago

I like both of these packages and find them beneficial; they do respectively:

1) rename multiple files using Perl regular expressions 2) a faster way to navigate your filesystem from the command line

Their original package sources can be found here and here.

Both are basically scripts so worrying about dependency won't be an issue. Additionally they likely won't go through many updates so maintenance should be light.

The original PKGBUILDS I have edited (for linking), and have built, installed, and tested them:

# $Id$
# Maintainer: Florian Pritz <flo@xinu.at>

pkgname=perl-rename
pkgver=1.9
pkgrel=1
pkgdesc="Rename multiple files using Perl regular expressions"
arch=(any)
url="http://search.cpan.org/~pederst/rename/"
license=('unknown')
depends=(perl)
options=(!emptydirs)
source=(http://search.cpan.org/CPAN/authors/id/P/PE/PEDERST/rename-$pkgver.tar.gz)
md5sums=('16df2adde955a6867701564e3d7c6a52')

build() {
    cd "$srcdir/rename-$pkgver"

    perl Makefile.PL PREFIX=/usr INSTALLDIRS=vendor
    make
}

package() {
    cd "$srcdir/rename-$pkgver"

    make DESTDIR="$pkgdir"/ install
    mv "$pkgdir"/usr/bin/vendor_perl/{rename,perl-rename}
    mv "$pkgdir"/usr/share/man/man1/{rename,perl-rename}.1p
}
# $Id$
# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: graysky <graysky AT archlnux DOT us>
# Contributor: Geoffroy Carrier <geoffroy@archlinux.org>
# Contributor: Joël Schaerer <joel.schaerer@laposte.net>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=autojump
pkgver=22.3.0
pkgrel=1
pkgdesc="A faster way to navigate your filesystem from the command line"
arch=('any')
url="https://github.com/wting/autojump"
license=('GPL3')
depends=('python')
source=($pkgname-$pkgver.tar.gz::https://github.com/wting/$pkgname/archive/release-v$pkgver.tar.gz)
sha256sums=('800f444b820b3a985e1da2d183fb5e2e23753a2ade53d6e1195678c650379a03')

prepare() {
  cd $pkgname-release-v$pkgver
  sed -i "s:/env python:/python3:g" bin/$pkgname
}

package() {
  cd $pkgname-release-v$pkgver

  SHELL=/bin/bash ./install.py --destdir "$pkgdir" \
                               --prefix 'usr/'     \
                               --zshshare 'usr/share/zsh/site-functions'

  cp "$pkgdir"/usr/share/$pkgname/"$pkgname"* "$pkgdir"/etc/profile.d/

#https://github.com/joelthelion/autojump/pull/339
  sed -i "s:/usr/local/:/usr/:g" "${pkgdir}"/etc/profile.d/$pkgname.sh
  sed -i "s:/build/autojump/pkg/autojump/:/:g" "${pkgdir}"/etc/profile.d/$pkgname.sh
#FS#43762
  sed -i '27,31d' "${pkgdir}"/etc/profile.d/$pkgname.sh
}
mkae commented 7 years ago

Just tested autojump and it works - after adding the following - appropriately adapted - shell commands into ~/.bashrc: [[ -s /etc/profile.d/autojump.sh ]] && source /etc/profile.d/autojump.sh

mkae commented 7 years ago

perl-rename installed fine.

mkae commented 7 years ago

As I've meant myself to introduce autojump into MSYS2, but see that it already existed here in this issue, I'll have a look into committing this as a PR soonish.

Thanks, @Todd-Weed, for contributing these PKGBUILDs!