summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 79d9b40ff25a2b9aa13dd0bee8d17914865ddc82 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Maintainer: nyanpasu64 <nyanpasu64 at tuta dot io>
# Contributor: ValHue <vhuelamo at gmail dot com>
# https://github.com/ValHue/AUR-PKGBUILDs
#
_pkgname="archalien"
pkgname="${_pkgname}"-git
pkgver=c563489
pkgrel=1
pkgdesc="A tool you can use to convert a Debian package .deb to an Arch Linux package."
url="https://github.com/Asher256/archalien"
license=('GPL2')
arch=('i686' 'x86_64')
depends=('python')
makedepends=('git')
provides=("${_pkgname}")
source=("git+https://github.com/Asher256/${_pkgname}.git")
sha256sums=('SKIP')

_pkgname_bin="#! /usr/bin/python
# -*- python -*-
# -*- coding: utf-8 -*-

from archalien.archalien import command_required, fix_input_pkg, usage, more_informations, handle_arguments, read_debcontrol, write_archcontrol, convert

if __name__ == '__main__':
    try:
        command_required('ar', 'tar', 'find', 'sed')
        DATA = handle_arguments()
        convert(DATA['input_pkg'],
                DATA['output_pkg'])
    except KeyboardInterrupt:
        print(\"Interrupted.\")

# vim:ai:et:sw=4:ts=4:sts=4:tw=78:fenc=utf-8"

_python3_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')

pkgver() {
	cd "${_pkgname}"
	git describe --always | sed 's|-|.|g' | sed 's|_|.|g' | cut -d'.' -f2-
}

build() {
    cd "${_pkgname}"
    echo -e "$_pkgname_bin" | tee ${_pkgname}_bin
}

package() {
	cd "${_pkgname}"
	install -m 755 -D ${_pkgname}_bin "${pkgdir}/usr/bin/${_pkgname}"
	install -m 644 -D ${_pkgname}.py "${pkgdir}/usr/lib/python${_python3_version}/site-packages/${_pkgname}/${_pkgname}.py"
	install -m 644 -D LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
} 

# vim:set ts=4 sw=2 ft=sh et: