summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f02b96e9213f40391b55f3f17f14d3b3f5964143 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Maintainer: Jeong Arm <kjwonmail@gmail.com>
pkgname=ibus-hangul-3beol
_pkgname=ibus-hangul
pkgrel=1
pkgdesc="ibus-hangul from createsc/3beol PPA"
arch=('x86_64')
url="https://launchpad.net/~createsc/3beol"
license=('unknown')
groups=()
depends=('libhangul')
makedepends=('intltool' 'automake' 'autoconf' 'libhangul' 'gnome-common')
provides=('ibus-hangul')
conflicts=('ibus-hangul')
replaces=()
backup=()
options=()
install=
noextract=()

# XXX Disable this because new lines are joined into space
# INFO="$(
# 	curl -qs http://ppa.launchpad.net/createsc/3beol/ubuntu/dists/bionic/main/source/Sources.gz |\
# 	gunzip |\
# 	awk -v RS= '{ if ($2 == "ibus-hangul") { print $0 } }'
# 	)"


source_basedir=$(
    curl -qs http://ppa.launchpad.net/createsc/3beol/ubuntu/dists/bionic/main/source/Sources.gz |\
    gunzip |\
    awk -v RS= '{ if ($2 == "ibus-hangul") { print $0 } }' |\
    grep -e '^Directory' |\
    awk '{print $2}'
    )

source_info=($(
    curl -qs http://ppa.launchpad.net/createsc/3beol/ubuntu/dists/bionic/main/source/Sources.gz |\
    gunzip |\
    awk -v RS= '{ if ($2 == "ibus-hangul") { print $0 } }' |\
    sed -ne '/^ [0-9a-f]\{64\} [0-9]\+ .*/p' |\
    grep tar.xz
    ))

sha256sums=(
    ${source_info[0]}
    )

source_url="http://ppa.launchpad.net/createsc/3beol/ubuntu/${source_basedir}/${source_info[2]}"

source=("$source_url")

pkgver=$(
    curl -qs http://ppa.launchpad.net/createsc/3beol/ubuntu/dists/bionic/main/source/Sources.gz |\
    gunzip |\
    awk -v RS= '{ if ($2 == "ibus-hangul") { print $0 } }' |\
    grep -e '^Version' | awk '{print $2}' |\
    tr '-' '_'
    )

prepare() {
	cd "$srcdir/$_pkgname"
}

build() {
	cd "$srcdir/$_pkgname"
    # touch config.rpath
	./autogen.sh
	./configure --prefix=/usr
	make
}

check() {
	cd "$srcdir/$_pkgname"
	make -k check
}

package() {
	cd "$srcdir/$_pkgname"
	make DESTDIR="$pkgdir/" install
}