blob: 4f318b23f70dd04d7c46adbd06fee56e5027d684 (
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
# Maintainer: dreieck (https://aur.archlinux.org/account/dreieck)
# Contributer: Brian "Beej" Hall <beej@beej.us>
# Contributer: Raphael Dümig <raphael[AT]duemig-neufahrn[DOT]de>
_pkgname=ffgo
pkgname="${_pkgname}-git"
pkgver=1.12.8.r603.20241124.7696e60
pkgrel=1
pkgdesc="A graphical launcher for FlightGear, i.e., a program whose purpose is to allow easy assembling and running of an fgfs command line. (Fork of and replacement for 'FGo!'.)"
arch=('any')
url="http://frougon.net/projects/FFGo/"
# Git repository: https://github.com/frougon/FFGo
license=('LicenseRef-custom')
depends=(
'flightgear'
'python>=3.4'
'python-condconfigparser'
'python-geographiclib'
'python-pillow'
'tk>=8.5'
)
makedepends=(
"gettext"
"imagemagick"
"librsvg"
"python-build"
"python-installer"
"python-setuptools"
"python-sphinx" # For `make doc`.
"python-wheel"
)
optdepends=(
# "python-geographiclib: For more accurate location calculations."
"geographiclib: For 'MagneticField' executable. (Seems not to work out of the box, though!)"
# "python-pillow"
)
provides=(
"${_pkgname}=${pkgver}"
)
conflicts=(
"${_pkgname}"
)
source=(
"${_pkgname}::git+https://github.com/frougon/FFGo.git"
)
sha256sums=(
'SKIP'
)
prepare() {
cd "${srcdir}/${_pkgname}"
printf '%s\n' "${url}" > "upstream.url"
git log > git.log
}
pkgver() {
cd "${srcdir}/${_pkgname}"
_rev="$(git rev-list HEAD --count)"
_date="$(git log -1 --format=%cd --date=format:%Y%m%d)"
_hash="$(git rev-parse --short HEAD)"
cd ffgo
_ver="$(python -c 'import version; print(version.__version__)')"
if [ -z ${_ver} ]; then
error "Could not determine version."
exit 1
else
printf '%s' "${_ver}.r${_rev}.${_date}.${_hash}"
fi
}
build() {
cd "${srcdir}/${_pkgname}"
plain "Running 'make update-pot' ..."
make update-pot
plain "Running 'make update-po' ..."
make update-po
plain "Running 'make update-mo' ..."
make update-mo
plain "Running 'make icons' ..."
make icons
plain "Running 'make doc' ..."
make doc
plain "Running 'python -m build --wheel --no-isolation' ..."
python -m build --wheel --no-isolation
}
package() {
cd "${srcdir}/${_pkgname}"
_pysitepkgdir="$(python -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')"
plain "Running 'python -m installer --destdir="$pkgdir" --compile-bytecode=2 dist/*.whl' ..."
python -m installer --destdir="$pkgdir" --compile-bytecode=2 dist/*.whl
plain "Installing documentation ..."
install -dvm755 "${pkgdir}/usr/share/doc/${_pkgname}"
install -Dvm644 -t "${pkgdir}/usr/share/doc/${_pkgname}" upstream.url git.log ChangeLog ChangeLog.FGo README.rst
ln -svr "${pkgdir}/${_pysitepkgdir}/ffgo/data/config" "${pkgdir}/usr/share/doc/${_pkgname}"/config
ln -svr "${pkgdir}/${_pysitepkgdir}/ffgo/data/help" "${pkgdir}/usr/share/doc/${_pkgname}"/help
cp -rv docs "${pkgdir}/usr/share/doc/${_pkgname}/docs"
rm -f "${pkgdir}/usr/share/doc/${_pkgname}/docs/README"/*
for _lang in de en es fr it ja pl; do
ln -svr "${pkgdir}/usr/share/doc/${_pkgname}/help/help_${_lang}" "${pkgdir}/usr/share/doc/${_pkgname}/docs/README/README_${_lang}"
done
plain "Installing license ..."
install -D -v -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
ln -svr "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" "${pkgdir}/usr/share/doc/${_pkgname}/COPYING"
}
|