summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b6d1f7d553deaa8e1cbe23b1c928b25c9d5c1b8b (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
# Previous maintainer: Daniele Paolella <danpaolella@gmail.com>
# Maintainer: fenuks
pkgname=hg-fast-export
_pkgname=fast-export
pkgver=210917
pkgrel=1
pkgdesc="Mercurial to git converter using git-fast-import"
arch=('any')
url="https://repo.or.cz/fast-export.git"
license=('MIT' 'GPL2')
depends=('python')
changelog=$pkgname.changelog
source=("https://github.com/frej/fast-export/archive/v$pkgver.tar.gz")
md5sums=('d4cb1bfc5c43ee61b0350adaae848845')

prepare() {
       sed -i '1s/python2$/python/' "$srcdir/$_pkgname-$pkgver/"{hg-fast-export.py,hg2git.py}
}

package() {
	install -D -m 755 {"$srcdir/$_pkgname-$pkgver","$pkgdir/usr/share/hg-fast-export"}/hg-fast-export.py
	install -D -m 755 {"$srcdir/$_pkgname-$pkgver","$pkgdir/usr/share/hg-fast-export"}/hg-fast-export.sh
	install -D -m 755 {"$srcdir/$_pkgname-$pkgver","$pkgdir/usr/share/hg-fast-export"}/hg-reset.py
	install -D -m 755 {"$srcdir/$_pkgname-$pkgver","$pkgdir/usr/share/hg-fast-export"}/hg-reset.sh
	install -D -m 755 {"$srcdir/$_pkgname-$pkgver","$pkgdir/usr/share/hg-fast-export"}/hg2git.py
	install -D -m 644 {"$srcdir/$_pkgname-$pkgver","$pkgdir/usr/share/hg-fast-export"}/pluginloader/__init__.py
	install -D -m 644 {"$srcdir/$_pkgname-$pkgver","$pkgdir/usr/share/hg-fast-export"}/plugins/branch_name_in_commit/__init__.py
	install -D -m 644 {"$srcdir/$_pkgname-$pkgver","$pkgdir/usr/share/hg-fast-export"}/plugins/dos2unix/__init__.py
	install -D -m 644 {"$srcdir/$_pkgname-$pkgver","$pkgdir/usr/share/hg-fast-export"}/plugins/shell_filter_file_contents/__init__.py

	install -d "$pkgdir/usr/share/licenses/hg-fast-export"
	sed -n '/Legal/,/mit-license.php/p' "$srcdir/$_pkgname-$pkgver/README.md" > "$pkgdir/usr/share/licenses/hg-fast-export/LICENSE"

	install -d "$pkgdir/usr/bin"
	ln -s /usr/share/hg-fast-export/hg-fast-export.py "$pkgdir/usr/bin"
	ln -s /usr/share/hg-fast-export/hg-fast-export.sh "$pkgdir/usr/bin"
	ln -s /usr/share/hg-fast-export/hg-reset.py "$pkgdir/usr/bin"
	ln -s /usr/share/hg-fast-export/hg-reset.sh "$pkgdir/usr/bin"
	ln -s /usr/share/hg-fast-export/hg2git.py "$pkgdir/usr/bin"
}