aboutsummaryrefslogtreecommitdiffstats
path: root/testing/perl-file-rename/APKBUILD
blob: d93a92c2cac9d815aa69efc6b7d8b88f7cd56246 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Automatically generated by apkbuild-cpan, template 3
# Contributor: Milan P. Stanić <mps@arvanta.net>
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=perl-file-rename
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=File-Rename
pkgver=2.01
pkgrel=1
pkgdesc="Perl extension for renaming multiple files"
url="https://metacpan.org/pod/File::Rename"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
makedepends="perl-module-build"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/R/RM/RMBARKER/File-Rename-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	perl Makefile.PL --installdirs=vendor
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" INSTALLDIRS=vendor install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
	rm -rf $pkgdir/usr/lib
	mv $pkgdir/usr/bin/rename $pkgdir/usr/bin/file-rename
	mv $pkgdir/usr/share/man/man1/rename.1 $pkgdir/usr/share/man/man1/file-rename.1
	chmod 0755 $pkgdir/usr/bin/file-rename
}

sha512sums="
7cbb08facf94c1246a9a1bed6baa1a0e1eface35d5baab1726596daa51b1eb4beb2bfcc75de5945d4fcd265c5119db5e1ef5b9280fc4dbbc1735e2d80d922cae  File-Rename-2.01.tar.gz
"